Storage Batch Operations v1 API - Class StorageBatchOperationsClient (1.0.0-beta01)

public abstract class StorageBatchOperationsClient

Reference documentation and code samples for the Storage Batch Operations v1 API class StorageBatchOperationsClient.

StorageBatchOperations client wrapper, for convenient use.

Inheritance

object > StorageBatchOperationsClient

Namespace

Google.Cloud.StorageBatchOperations.V1

Assembly

Google.Cloud.StorageBatchOperations.V1.dll

Remarks

Storage Batch Operations offers a managed experience to perform batch operations on millions of Cloud Storage objects in a serverless fashion. With this service, you can automate and simplify large scale API operations performed on Cloud Storage objects.

Properties

CreateJobOperationsClient

public virtual OperationsClient CreateJobOperationsClient { get; }

The long-running operations client for CreateJob.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the StorageBatchOperations service, which is a host of "storagebatchoperations.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default StorageBatchOperations scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default StorageBatchOperations scopes are:

GrpcClient

public virtual StorageBatchOperations.StorageBatchOperationsClient GrpcClient { get; }

The underlying gRPC StorageBatchOperations client

Property Value
Type Description
StorageBatchOperationsStorageBatchOperationsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

CancelJob(CancelJobRequest, CallSettings)

public virtual CancelJobResponse CancelJob(CancelJobRequest request, CallSettings callSettings = null)

Cancels a batch job.

Parameters
Name Description
request CancelJobRequest

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
CancelJobResponse

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
CancelJobRequest request = new CancelJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    RequestId = "",
};
// Make the request
CancelJobResponse response = storageBatchOperationsClient.CancelJob(request);

CancelJob(JobName, CallSettings)

public virtual CancelJobResponse CancelJob(JobName name, CallSettings callSettings = null)

Cancels a batch job.

Parameters
Name Description
name JobName

Required. The name of the job to cancel. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CancelJobResponse

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
CancelJobResponse response = storageBatchOperationsClient.CancelJob(name);

CancelJob(string, CallSettings)

public virtual CancelJobResponse CancelJob(string name, CallSettings callSettings = null)

Cancels a batch job.

Parameters
Name Description
name string

Required. The name of the job to cancel. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CancelJobResponse

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
CancelJobResponse response = storageBatchOperationsClient.CancelJob(name);

CancelJobAsync(CancelJobRequest, CallSettings)

public virtual Task<CancelJobResponse> CancelJobAsync(CancelJobRequest request, CallSettings callSettings = null)

Cancels a batch job.

Parameters
Name Description
request CancelJobRequest

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
TaskCancelJobResponse

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
CancelJobRequest request = new CancelJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    RequestId = "",
};
// Make the request
CancelJobResponse response = await storageBatchOperationsClient.CancelJobAsync(request);

CancelJobAsync(CancelJobRequest, CancellationToken)

public virtual Task<CancelJobResponse> CancelJobAsync(CancelJobRequest request, CancellationToken cancellationToken)

Cancels a batch job.

Parameters
Name Description
request CancelJobRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCancelJobResponse

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
CancelJobRequest request = new CancelJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    RequestId = "",
};
// Make the request
CancelJobResponse response = await storageBatchOperationsClient.CancelJobAsync(request);

CancelJobAsync(JobName, CallSettings)

public virtual Task<CancelJobResponse> CancelJobAsync(JobName name, CallSettings callSettings = null)

Cancels a batch job.

Parameters
Name Description
name JobName

Required. The name of the job to cancel. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCancelJobResponse

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
CancelJobResponse response = await storageBatchOperationsClient.CancelJobAsync(name);

CancelJobAsync(JobName, CancellationToken)

public virtual Task<CancelJobResponse> CancelJobAsync(JobName name, CancellationToken cancellationToken)

Cancels a batch job.

Parameters
Name Description
name JobName

Required. The name of the job to cancel. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCancelJobResponse

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
CancelJobResponse response = await storageBatchOperationsClient.CancelJobAsync(name);

CancelJobAsync(string, CallSettings)

public virtual Task<CancelJobResponse> CancelJobAsync(string name, CallSettings callSettings = null)

Cancels a batch job.

Parameters
Name Description
name string

Required. The name of the job to cancel. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id}.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCancelJobResponse

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
CancelJobResponse response = await storageBatchOperationsClient.CancelJobAsync(name);

CancelJobAsync(string, CancellationToken)

public virtual Task<CancelJobResponse> CancelJobAsync(string name, CancellationToken cancellationToken)

Cancels a batch job.

Parameters
Name Description
name string

Required. The name of the job to cancel. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id}.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCancelJobResponse

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
CancelJobResponse response = await storageBatchOperationsClient.CancelJobAsync(name);

Create()

public static StorageBatchOperationsClient Create()

Synchronously creates a StorageBatchOperationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use StorageBatchOperationsClientBuilder.

Returns
Type Description
StorageBatchOperationsClient

The created StorageBatchOperationsClient.

CreateAsync(CancellationToken)

public static Task<StorageBatchOperationsClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a StorageBatchOperationsClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use StorageBatchOperationsClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskStorageBatchOperationsClient

The task representing the created StorageBatchOperationsClient.

CreateJob(LocationName, Job, string, CallSettings)

public virtual Operation<Job, OperationMetadata> CreateJob(LocationName parent, Job job, string jobId, CallSettings callSettings = null)

Creates a batch job.

Parameters
Name Description
parent LocationName

Required. Value for parent.

job Job

Required. The resource being created

jobId string

Required. The optional job_id for this Job . If not specified, an id is generated. job_id should be no more than 128 characters and must include only characters available in DNS names, as defined by RFC-1123.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationJobOperationMetadata

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Job job = new Job();
string jobId = "";
// Make the request
Operation<Job, OperationMetadata> response = storageBatchOperationsClient.CreateJob(parent, job, jobId);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = storageBatchOperationsClient.PollOnceCreateJob(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

CreateJob(CreateJobRequest, CallSettings)

public virtual Operation<Job, OperationMetadata> CreateJob(CreateJobRequest request, CallSettings callSettings = null)

Creates a batch job.

Parameters
Name Description
request CreateJobRequest

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
OperationJobOperationMetadata

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    JobId = "",
    Job = new Job(),
    RequestId = "",
};
// Make the request
Operation<Job, OperationMetadata> response = storageBatchOperationsClient.CreateJob(request);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = storageBatchOperationsClient.PollOnceCreateJob(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

CreateJob(string, Job, string, CallSettings)

public virtual Operation<Job, OperationMetadata> CreateJob(string parent, Job job, string jobId, CallSettings callSettings = null)

Creates a batch job.

Parameters
Name Description
parent string

Required. Value for parent.

job Job

Required. The resource being created

jobId string

Required. The optional job_id for this Job . If not specified, an id is generated. job_id should be no more than 128 characters and must include only characters available in DNS names, as defined by RFC-1123.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationJobOperationMetadata

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Job job = new Job();
string jobId = "";
// Make the request
Operation<Job, OperationMetadata> response = storageBatchOperationsClient.CreateJob(parent, job, jobId);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = storageBatchOperationsClient.PollOnceCreateJob(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

CreateJobAsync(LocationName, Job, string, CallSettings)

public virtual Task<Operation<Job, OperationMetadata>> CreateJobAsync(LocationName parent, Job job, string jobId, CallSettings callSettings = null)

Creates a batch job.

Parameters
Name Description
parent LocationName

Required. Value for parent.

job Job

Required. The resource being created

jobId string

Required. The optional job_id for this Job . If not specified, an id is generated. job_id should be no more than 128 characters and must include only characters available in DNS names, as defined by RFC-1123.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationJobOperationMetadata

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Job job = new Job();
string jobId = "";
// Make the request
Operation<Job, OperationMetadata> response = await storageBatchOperationsClient.CreateJobAsync(parent, job, jobId);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = await storageBatchOperationsClient.PollOnceCreateJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

CreateJobAsync(LocationName, Job, string, CancellationToken)

public virtual Task<Operation<Job, OperationMetadata>> CreateJobAsync(LocationName parent, Job job, string jobId, CancellationToken cancellationToken)

Creates a batch job.

Parameters
Name Description
parent LocationName

Required. Value for parent.

job Job

Required. The resource being created

jobId string

Required. The optional job_id for this Job . If not specified, an id is generated. job_id should be no more than 128 characters and must include only characters available in DNS names, as defined by RFC-1123.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationJobOperationMetadata

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Job job = new Job();
string jobId = "";
// Make the request
Operation<Job, OperationMetadata> response = await storageBatchOperationsClient.CreateJobAsync(parent, job, jobId);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = await storageBatchOperationsClient.PollOnceCreateJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

CreateJobAsync(CreateJobRequest, CallSettings)

public virtual Task<Operation<Job, OperationMetadata>> CreateJobAsync(CreateJobRequest request, CallSettings callSettings = null)

Creates a batch job.

Parameters
Name Description
request CreateJobRequest

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
TaskOperationJobOperationMetadata

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    JobId = "",
    Job = new Job(),
    RequestId = "",
};
// Make the request
Operation<Job, OperationMetadata> response = await storageBatchOperationsClient.CreateJobAsync(request);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = await storageBatchOperationsClient.PollOnceCreateJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

CreateJobAsync(CreateJobRequest, CancellationToken)

public virtual Task<Operation<Job, OperationMetadata>> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken)

Creates a batch job.

Parameters
Name Description
request CreateJobRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationJobOperationMetadata

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
CreateJobRequest request = new CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    JobId = "",
    Job = new Job(),
    RequestId = "",
};
// Make the request
Operation<Job, OperationMetadata> response = await storageBatchOperationsClient.CreateJobAsync(request);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = await storageBatchOperationsClient.PollOnceCreateJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

CreateJobAsync(string, Job, string, CallSettings)

public virtual Task<Operation<Job, OperationMetadata>> CreateJobAsync(string parent, Job job, string jobId, CallSettings callSettings = null)

Creates a batch job.

Parameters
Name Description
parent string

Required. Value for parent.

job Job

Required. The resource being created

jobId string

Required. The optional job_id for this Job . If not specified, an id is generated. job_id should be no more than 128 characters and must include only characters available in DNS names, as defined by RFC-1123.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationJobOperationMetadata

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Job job = new Job();
string jobId = "";
// Make the request
Operation<Job, OperationMetadata> response = await storageBatchOperationsClient.CreateJobAsync(parent, job, jobId);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = await storageBatchOperationsClient.PollOnceCreateJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

CreateJobAsync(string, Job, string, CancellationToken)

public virtual Task<Operation<Job, OperationMetadata>> CreateJobAsync(string parent, Job job, string jobId, CancellationToken cancellationToken)

Creates a batch job.

Parameters
Name Description
parent string

Required. Value for parent.

job Job

Required. The resource being created

jobId string

Required. The optional job_id for this Job . If not specified, an id is generated. job_id should be no more than 128 characters and must include only characters available in DNS names, as defined by RFC-1123.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationJobOperationMetadata

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Job job = new Job();
string jobId = "";
// Make the request
Operation<Job, OperationMetadata> response = await storageBatchOperationsClient.CreateJobAsync(parent, job, jobId);

// Poll until the returned long-running operation is complete
Operation<Job, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Job 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<Job, OperationMetadata> retrievedResponse = await storageBatchOperationsClient.PollOnceCreateJobAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Job retrievedResult = retrievedResponse.Result;
}

DeleteJob(DeleteJobRequest, CallSettings)

public virtual void DeleteJob(DeleteJobRequest request, CallSettings callSettings = null)

Deletes a batch job.

Parameters
Name Description
request DeleteJobRequest

The request object containing all of the parameters for the API call.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
DeleteJobRequest request = new DeleteJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    RequestId = "",
};
// Make the request
storageBatchOperationsClient.DeleteJob(request);

DeleteJob(JobName, CallSettings)

public virtual void DeleteJob(JobName name, CallSettings callSettings = null)

Deletes a batch job.

Parameters
Name Description
name JobName

Required. The name of the job to delete. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
storageBatchOperationsClient.DeleteJob(name);

DeleteJob(string, CallSettings)

public virtual void DeleteJob(string name, CallSettings callSettings = null)

Deletes a batch job.

Parameters
Name Description
name string

Required. The name of the job to delete. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
storageBatchOperationsClient.DeleteJob(name);

DeleteJobAsync(DeleteJobRequest, CallSettings)

public virtual Task DeleteJobAsync(DeleteJobRequest request, CallSettings callSettings = null)

Deletes a batch job.

Parameters
Name Description
request DeleteJobRequest

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.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
DeleteJobRequest request = new DeleteJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    RequestId = "",
};
// Make the request
await storageBatchOperationsClient.DeleteJobAsync(request);

DeleteJobAsync(DeleteJobRequest, CancellationToken)

public virtual Task DeleteJobAsync(DeleteJobRequest request, CancellationToken cancellationToken)

Deletes a batch job.

Parameters
Name Description
request DeleteJobRequest

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.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
DeleteJobRequest request = new DeleteJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    RequestId = "",
};
// Make the request
await storageBatchOperationsClient.DeleteJobAsync(request);

DeleteJobAsync(JobName, CallSettings)

public virtual Task DeleteJobAsync(JobName name, CallSettings callSettings = null)

Deletes a batch job.

Parameters
Name Description
name JobName

Required. The name of the job to delete. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
await storageBatchOperationsClient.DeleteJobAsync(name);

DeleteJobAsync(JobName, CancellationToken)

public virtual Task DeleteJobAsync(JobName name, CancellationToken cancellationToken)

Deletes a batch job.

Parameters
Name Description
name JobName

Required. The name of the job to delete. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
await storageBatchOperationsClient.DeleteJobAsync(name);

DeleteJobAsync(string, CallSettings)

public virtual Task DeleteJobAsync(string name, CallSettings callSettings = null)

Deletes a batch job.

Parameters
Name Description
name string

Required. The name of the job to delete. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
await storageBatchOperationsClient.DeleteJobAsync(name);

DeleteJobAsync(string, CancellationToken)

public virtual Task DeleteJobAsync(string name, CancellationToken cancellationToken)

Deletes a batch job.

Parameters
Name Description
name string

Required. The name of the job to delete. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
await storageBatchOperationsClient.DeleteJobAsync(name);

GetJob(GetJobRequest, CallSettings)

public virtual Job GetJob(GetJobRequest request, CallSettings callSettings = null)

Gets a batch job.

Parameters
Name Description
request GetJobRequest

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
Job

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = storageBatchOperationsClient.GetJob(request);

GetJob(JobName, CallSettings)

public virtual Job GetJob(JobName name, CallSettings callSettings = null)

Gets a batch job.

Parameters
Name Description
name JobName

Required. name of the job to retrieve. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Job

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = storageBatchOperationsClient.GetJob(name);

GetJob(string, CallSettings)

public virtual Job GetJob(string name, CallSettings callSettings = null)

Gets a batch job.

Parameters
Name Description
name string

Required. name of the job to retrieve. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Job

The RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = storageBatchOperationsClient.GetJob(name);

GetJobAsync(GetJobRequest, CallSettings)

public virtual Task<Job> GetJobAsync(GetJobRequest request, CallSettings callSettings = null)

Gets a batch job.

Parameters
Name Description
request GetJobRequest

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
TaskJob

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await storageBatchOperationsClient.GetJobAsync(request);

GetJobAsync(GetJobRequest, CancellationToken)

public virtual Task<Job> GetJobAsync(GetJobRequest request, CancellationToken cancellationToken)

Gets a batch job.

Parameters
Name Description
request GetJobRequest

The request object containing all of the parameters for the API call.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
GetJobRequest request = new GetJobRequest
{
    JobName = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
Job response = await storageBatchOperationsClient.GetJobAsync(request);

GetJobAsync(JobName, CallSettings)

public virtual Task<Job> GetJobAsync(JobName name, CallSettings callSettings = null)

Gets a batch job.

Parameters
Name Description
name JobName

Required. name of the job to retrieve. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await storageBatchOperationsClient.GetJobAsync(name);

GetJobAsync(JobName, CancellationToken)

public virtual Task<Job> GetJobAsync(JobName name, CancellationToken cancellationToken)

Gets a batch job.

Parameters
Name Description
name JobName

Required. name of the job to retrieve. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
JobName name = JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Job response = await storageBatchOperationsClient.GetJobAsync(name);

GetJobAsync(string, CallSettings)

public virtual Task<Job> GetJobAsync(string name, CallSettings callSettings = null)

Gets a batch job.

Parameters
Name Description
name string

Required. name of the job to retrieve. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await storageBatchOperationsClient.GetJobAsync(name);

GetJobAsync(string, CancellationToken)

public virtual Task<Job> GetJobAsync(string name, CancellationToken cancellationToken)

Gets a batch job.

Parameters
Name Description
name string

Required. name of the job to retrieve. Format: projects/{project_id}/locations/{location_id}/jobs/{job_id} .

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Job response = await storageBatchOperationsClient.GetJobAsync(name);

ListJobs(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListJobsResponse, Job> ListJobs(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Jobs in a given project and location.

Parameters
Name Description
parent LocationName

Required. Format: projects/{project_id}/locations/{location_id} .

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListJobsResponse, Job> response = storageBatchOperationsClient.ListJobs(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Job item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListJobsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Job item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListJobs(ListJobsRequest, CallSettings)

public virtual PagedEnumerable<ListJobsResponse, Job> ListJobs(ListJobsRequest request, CallSettings callSettings = null)

Lists Jobs in a given project and location.

Parameters
Name Description
request ListJobsRequest

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
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
ListJobsRequest request = new ListJobsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListJobsResponse, Job> response = storageBatchOperationsClient.ListJobs(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Job item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListJobsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Job item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListJobs(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListJobsResponse, Job> ListJobs(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Jobs in a given project and location.

Parameters
Name Description
parent string

Required. Format: projects/{project_id}/locations/{location_id} .

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = StorageBatchOperationsClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListJobsResponse, Job> response = storageBatchOperationsClient.ListJobs(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Job item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListJobsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Job item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListJobsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Jobs in a given project and location.

Parameters
Name Description
parent LocationName

Required. Format: projects/{project_id}/locations/{location_id} .

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListJobsResponse, Job> response = storageBatchOperationsClient.ListJobsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Job item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListJobsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Job item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListJobsAsync(ListJobsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(ListJobsRequest request, CallSettings callSettings = null)

Lists Jobs in a given project and location.

Parameters
Name Description
request ListJobsRequest

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
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
ListJobsRequest request = new ListJobsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListJobsResponse, Job> response = storageBatchOperationsClient.ListJobsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Job item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListJobsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Job item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListJobsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Jobs in a given project and location.

Parameters
Name Description
parent string

Required. Format: projects/{project_id}/locations/{location_id} .

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

Example
// Create client
StorageBatchOperationsClient storageBatchOperationsClient = await StorageBatchOperationsClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListJobsResponse, Job> response = storageBatchOperationsClient.ListJobsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Job item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListJobsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Job item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Job> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Job item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceCreateJob(string, CallSettings)

public virtual Operation<Job, OperationMetadata> PollOnceCreateJob(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateJob.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationJobOperationMetadata

The result of polling the operation.

PollOnceCreateJobAsync(string, CallSettings)

public virtual Task<Operation<Job, OperationMetadata>> PollOnceCreateJobAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateJob.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationJobOperationMetadata

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.