public abstract class BatchControllerClient
Reference documentation and code samples for the Google Cloud Dataproc v1 API class BatchControllerClient.
BatchController client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Dataproc.V1Assembly
Google.Cloud.Dataproc.V1.dll
Remarks
The BatchController provides methods to manage batch workloads.
Properties
CreateBatchOperationsClient
public virtual OperationsClient CreateBatchOperationsClient { get; }
The long-running operations client for CreateBatch
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the BatchController service, which is a host of "dataproc.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default BatchController scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default BatchController scopes are:
GrpcClient
public virtual BatchController.BatchControllerClient GrpcClient { get; }
The underlying gRPC BatchController client
Property Value | |
---|---|
Type | Description |
BatchControllerBatchControllerClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static BatchControllerClient Create()
Synchronously creates a BatchControllerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BatchControllerClientBuilder.
Returns | |
---|---|
Type | Description |
BatchControllerClient | The created BatchControllerClient. |
CreateAsync(CancellationToken)
public static Task<BatchControllerClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a BatchControllerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use BatchControllerClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskBatchControllerClient | The task representing the created BatchControllerClient. |
CreateBatch(LocationName, Batch, string, CallSettings)
public virtual Operation<Batch, BatchOperationMetadata> CreateBatch(LocationName parent, Batch batch, string batchId, CallSettings callSettings = null)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent resource where this batch will be created. |
batch | Batch Required. The batch to create. |
batchId | string Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchBatchOperationMetadata | The RPC response. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Batch batch = new Batch();
string batchId = "";
// Make the request
Operation<Batch, BatchOperationMetadata> response = batchControllerClient.CreateBatch(parent, batch, batchId);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = batchControllerClient.PollOnceCreateBatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
CreateBatch(CreateBatchRequest, CallSettings)
public virtual Operation<Batch, BatchOperationMetadata> CreateBatch(CreateBatchRequest request, CallSettings callSettings = null)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
request | CreateBatchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchBatchOperationMetadata | The RPC response. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
CreateBatchRequest request = new CreateBatchRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Batch = new Batch(),
BatchId = "",
RequestId = "",
};
// Make the request
Operation<Batch, BatchOperationMetadata> response = batchControllerClient.CreateBatch(request);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = batchControllerClient.PollOnceCreateBatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
CreateBatch(string, Batch, string, CallSettings)
public virtual Operation<Batch, BatchOperationMetadata> CreateBatch(string parent, Batch batch, string batchId, CallSettings callSettings = null)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
parent | string Required. The parent resource where this batch will be created. |
batch | Batch Required. The batch to create. |
batchId | string Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchBatchOperationMetadata | The RPC response. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Batch batch = new Batch();
string batchId = "";
// Make the request
Operation<Batch, BatchOperationMetadata> response = batchControllerClient.CreateBatch(parent, batch, batchId);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = batchControllerClient.PollOnceCreateBatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
CreateBatchAsync(LocationName, Batch, string, CallSettings)
public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(LocationName parent, Batch batch, string batchId, CallSettings callSettings = null)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent resource where this batch will be created. |
batch | Batch Required. The batch to create. |
batchId | string Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchBatchOperationMetadata | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Batch batch = new Batch();
string batchId = "";
// Make the request
Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(parent, batch, batchId);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
CreateBatchAsync(LocationName, Batch, string, CancellationToken)
public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(LocationName parent, Batch batch, string batchId, CancellationToken cancellationToken)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent resource where this batch will be created. |
batch | Batch Required. The batch to create. |
batchId | string Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchBatchOperationMetadata | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Batch batch = new Batch();
string batchId = "";
// Make the request
Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(parent, batch, batchId);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
CreateBatchAsync(CreateBatchRequest, CallSettings)
public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(CreateBatchRequest request, CallSettings callSettings = null)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
request | CreateBatchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchBatchOperationMetadata | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
CreateBatchRequest request = new CreateBatchRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Batch = new Batch(),
BatchId = "",
RequestId = "",
};
// Make the request
Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(request);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
CreateBatchAsync(CreateBatchRequest, CancellationToken)
public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(CreateBatchRequest request, CancellationToken cancellationToken)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
request | CreateBatchRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchBatchOperationMetadata | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
CreateBatchRequest request = new CreateBatchRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Batch = new Batch(),
BatchId = "",
RequestId = "",
};
// Make the request
Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(request);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
CreateBatchAsync(string, Batch, string, CallSettings)
public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(string parent, Batch batch, string batchId, CallSettings callSettings = null)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
parent | string Required. The parent resource where this batch will be created. |
batch | Batch Required. The batch to create. |
batchId | string Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchBatchOperationMetadata | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Batch batch = new Batch();
string batchId = "";
// Make the request
Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(parent, batch, batchId);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
CreateBatchAsync(string, Batch, string, CancellationToken)
public virtual Task<Operation<Batch, BatchOperationMetadata>> CreateBatchAsync(string parent, Batch batch, string batchId, CancellationToken cancellationToken)
Creates a batch workload that executes asynchronously.
Parameters | |
---|---|
Name | Description |
parent | string Required. The parent resource where this batch will be created. |
batch | Batch Required. The batch to create. |
batchId | string Optional. The ID to use for the batch, which will become the final component of the batch's resource name. This value must be 4-63 characters. Valid characters are |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchBatchOperationMetadata | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Batch batch = new Batch();
string batchId = "";
// Make the request
Operation<Batch, BatchOperationMetadata> response = await batchControllerClient.CreateBatchAsync(parent, batch, batchId);
// Poll until the returned long-running operation is complete
Operation<Batch, BatchOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Batch result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Batch, BatchOperationMetadata> retrievedResponse = await batchControllerClient.PollOnceCreateBatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Batch retrievedResult = retrievedResponse.Result;
}
DeleteBatch(BatchName, CallSettings)
public virtual void DeleteBatch(BatchName name, CallSettings callSettings = null)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
name | BatchName Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
// Make the request
batchControllerClient.DeleteBatch(name);
DeleteBatch(DeleteBatchRequest, CallSettings)
public virtual void DeleteBatch(DeleteBatchRequest request, CallSettings callSettings = null)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
request | DeleteBatchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
DeleteBatchRequest request = new DeleteBatchRequest
{
BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
};
// Make the request
batchControllerClient.DeleteBatch(request);
DeleteBatch(string, CallSettings)
public virtual void DeleteBatch(string name, CallSettings callSettings = null)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
name | string Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
// Make the request
batchControllerClient.DeleteBatch(name);
DeleteBatchAsync(BatchName, CallSettings)
public virtual Task DeleteBatchAsync(BatchName name, CallSettings callSettings = null)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
name | BatchName Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
// Make the request
await batchControllerClient.DeleteBatchAsync(name);
DeleteBatchAsync(BatchName, CancellationToken)
public virtual Task DeleteBatchAsync(BatchName name, CancellationToken cancellationToken)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
name | BatchName Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
// Make the request
await batchControllerClient.DeleteBatchAsync(name);
DeleteBatchAsync(DeleteBatchRequest, CallSettings)
public virtual Task DeleteBatchAsync(DeleteBatchRequest request, CallSettings callSettings = null)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
request | DeleteBatchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
DeleteBatchRequest request = new DeleteBatchRequest
{
BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
};
// Make the request
await batchControllerClient.DeleteBatchAsync(request);
DeleteBatchAsync(DeleteBatchRequest, CancellationToken)
public virtual Task DeleteBatchAsync(DeleteBatchRequest request, CancellationToken cancellationToken)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
request | DeleteBatchRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
DeleteBatchRequest request = new DeleteBatchRequest
{
BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
};
// Make the request
await batchControllerClient.DeleteBatchAsync(request);
DeleteBatchAsync(string, CallSettings)
public virtual Task DeleteBatchAsync(string name, CallSettings callSettings = null)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
name | string Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
// Make the request
await batchControllerClient.DeleteBatchAsync(name);
DeleteBatchAsync(string, CancellationToken)
public virtual Task DeleteBatchAsync(string name, CancellationToken cancellationToken)
Deletes the batch workload resource. If the batch is not in terminal state,
the delete fails and the response returns FAILED_PRECONDITION
.
Parameters | |
---|---|
Name | Description |
name | string Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
// Make the request
await batchControllerClient.DeleteBatchAsync(name);
GetBatch(BatchName, CallSettings)
public virtual Batch GetBatch(BatchName name, CallSettings callSettings = null)
Gets the batch workload resource representation.
Parameters | |
---|---|
Name | Description |
name | BatchName Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Batch | The RPC response. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
// Make the request
Batch response = batchControllerClient.GetBatch(name);
GetBatch(GetBatchRequest, CallSettings)
public virtual Batch GetBatch(GetBatchRequest request, CallSettings callSettings = null)
Gets the batch workload resource representation.
Parameters | |
---|---|
Name | Description |
request | GetBatchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Batch | The RPC response. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
GetBatchRequest request = new GetBatchRequest
{
BatchName = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]"),
};
// Make the request
Batch response = batchControllerClient.GetBatch(request);
GetBatch(string, CallSettings)
public virtual Batch GetBatch(string name, CallSettings callSettings = null)
Gets the batch workload resource representation.
Parameters | |
---|---|
Name | Description |
name | string Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Batch | The RPC response. |
// Create client
BatchControllerClient batchControllerClient = BatchControllerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/batches/[BATCH]";
// Make the request
Batch response = batchControllerClient.GetBatch(name);
GetBatchAsync(BatchName, CallSettings)
public virtual Task<Batch> GetBatchAsync(BatchName name, CallSettings callSettings = null)
Gets the batch workload resource representation.
Parameters | |
---|---|
Name | Description |
name | BatchName Required. The fully qualified name of the batch to retrieve in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID" |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatch | A Task containing the RPC response. |
// Create client
BatchControllerClient batchControllerClient = await BatchControllerClient.CreateAsync();
// Initialize request argument(s)
BatchName name = BatchName.FromProjectLocationBatch("[PROJECT]", "[LOCATION]", "[BATCH]");
// Make the request
Batch response = await batchControllerClient.GetBatchAsync(name);