Cloud Run Admin v2 API - Class JobsClient (2.5.0)

public abstract class JobsClient

Reference documentation and code samples for the Cloud Run Admin v2 API class JobsClient.

Jobs client wrapper, for convenient use.

Inheritance

object > JobsClient

Derived Types

Namespace

Google.Cloud.Run.V2

Assembly

Google.Cloud.Run.V2.dll

Remarks

Cloud Run Job Control Plane API.

Properties

CreateJobOperationsClient

public virtual OperationsClient CreateJobOperationsClient { get; }

The long-running operations client for CreateJob.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Jobs scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

DeleteJobOperationsClient

public virtual OperationsClient DeleteJobOperationsClient { get; }

The long-running operations client for DeleteJob.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Jobs.JobsClient GrpcClient { get; }

The underlying gRPC Jobs client

Property Value
TypeDescription
JobsJobsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

RunJobOperationsClient

public virtual OperationsClient RunJobOperationsClient { get; }

The long-running operations client for RunJob.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateJobOperationsClient

public virtual OperationsClient UpdateJobOperationsClient { get; }

The long-running operations client for UpdateJob.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static JobsClient Create()

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

Returns
TypeDescription
JobsClient

The created JobsClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskJobsClient

The task representing the created JobsClient.

CreateJob(LocationName, Job, string, CallSettings)

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

Creates a Job.

Parameters
NameDescription
parentLocationName

Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

jobJob

Required. The Job instance to create.

jobIdstring

Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The RPC response.

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

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

CreateJob(CreateJobRequest, CallSettings)

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

Creates a Job.

Parameters
NameDescription
requestCreateJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
gcrv::CreateJobRequest request = new gcrv::CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Job = new gcrv::Job(),
    JobId = "",
    ValidateOnly = false,
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = jobsClient.CreateJob(request);

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

CreateJob(string, Job, string, CallSettings)

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

Creates a Job.

Parameters
NameDescription
parentstring

Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

jobJob

Required. The Job instance to create.

jobIdstring

Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The RPC response.

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

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

CreateJobAsync(LocationName, Job, string, CallSettings)

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

Creates a Job.

Parameters
NameDescription
parentLocationName

Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

jobJob

Required. The Job instance to create.

jobIdstring

Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

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

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

CreateJobAsync(LocationName, Job, string, CancellationToken)

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

Creates a Job.

Parameters
NameDescription
parentLocationName

Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

jobJob

Required. The Job instance to create.

jobIdstring

Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

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

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

CreateJobAsync(CreateJobRequest, CallSettings)

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

Creates a Job.

Parameters
NameDescription
requestCreateJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::CreateJobRequest request = new gcrv::CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Job = new gcrv::Job(),
    JobId = "",
    ValidateOnly = false,
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.CreateJobAsync(request);

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

CreateJobAsync(CreateJobRequest, CancellationToken)

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

Creates a Job.

Parameters
NameDescription
requestCreateJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::CreateJobRequest request = new gcrv::CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Job = new gcrv::Job(),
    JobId = "",
    ValidateOnly = false,
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.CreateJobAsync(request);

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

CreateJobAsync(string, Job, string, CallSettings)

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

Creates a Job.

Parameters
NameDescription
parentstring

Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

jobJob

Required. The Job instance to create.

jobIdstring

Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

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

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

CreateJobAsync(string, Job, string, CancellationToken)

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

Creates a Job.

Parameters
NameDescription
parentstring

Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

jobJob

Required. The Job instance to create.

jobIdstring

Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

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

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

DeleteJob(DeleteJobRequest, CallSettings)

public virtual Operation<Job, Job> DeleteJob(DeleteJobRequest request, CallSettings callSettings = null)

Deletes a Job.

Parameters
NameDescription
requestDeleteJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
gcrv::DeleteJobRequest request = new gcrv::DeleteJobRequest
{
    JobName = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = jobsClient.DeleteJob(request);

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

DeleteJob(JobName, CallSettings)

public virtual Operation<Job, Job> DeleteJob(JobName name, CallSettings callSettings = null)

Deletes a Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
gcrv::JobName name = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Operation<gcrv::Job, gcrv::Job> response = jobsClient.DeleteJob(name);

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

DeleteJob(string, CallSettings)

public virtual Operation<Job, Job> DeleteJob(string name, CallSettings callSettings = null)

Deletes a Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Operation<gcrv::Job, gcrv::Job> response = jobsClient.DeleteJob(name);

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

DeleteJobAsync(DeleteJobRequest, CallSettings)

public virtual Task<Operation<Job, Job>> DeleteJobAsync(DeleteJobRequest request, CallSettings callSettings = null)

Deletes a Job.

Parameters
NameDescription
requestDeleteJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::DeleteJobRequest request = new gcrv::DeleteJobRequest
{
    JobName = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.DeleteJobAsync(request);

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

DeleteJobAsync(DeleteJobRequest, CancellationToken)

public virtual Task<Operation<Job, Job>> DeleteJobAsync(DeleteJobRequest request, CancellationToken cancellationToken)

Deletes a Job.

Parameters
NameDescription
requestDeleteJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::DeleteJobRequest request = new gcrv::DeleteJobRequest
{
    JobName = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    ValidateOnly = false,
    Etag = "",
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.DeleteJobAsync(request);

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

DeleteJobAsync(JobName, CallSettings)

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

Deletes a Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::JobName name = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.DeleteJobAsync(name);

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

DeleteJobAsync(JobName, CancellationToken)

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

Deletes a Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::JobName name = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.DeleteJobAsync(name);

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

DeleteJobAsync(string, CallSettings)

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

Deletes a Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.DeleteJobAsync(name);

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

DeleteJobAsync(string, CancellationToken)

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

Deletes a Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.DeleteJobAsync(name);

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

GetIamPolicy(GetIamPolicyRequest, CallSettings)

public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the IAM Access Control policy currently in effect for the given Job. This result does not include any inherited policies.

Parameters
NameDescription
requestGetIamPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = jobsClient.GetIamPolicy(request);

GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the IAM Access Control policy currently in effect for the given Job. This result does not include any inherited policies.

Parameters
NameDescription
requestGetIamPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await jobsClient.GetIamPolicyAsync(request);

GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)

public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)

Gets the IAM Access Control policy currently in effect for the given Job. This result does not include any inherited policies.

Parameters
NameDescription
requestGetIamPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await jobsClient.GetIamPolicyAsync(request);

GetJob(GetJobRequest, CallSettings)

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

Gets information about a Job.

Parameters
NameDescription
requestGetJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

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

GetJob(JobName, CallSettings)

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

Gets information about a Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

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

GetJob(string, CallSettings)

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

Gets information about a Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Job

The RPC response.

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

GetJobAsync(GetJobRequest, CallSettings)

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

Gets information about a Job.

Parameters
NameDescription
requestGetJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskJob

A Task containing the RPC response.

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

GetJobAsync(GetJobRequest, CancellationToken)

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

Gets information about a Job.

Parameters
NameDescription
requestGetJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskJob

A Task containing the RPC response.

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

GetJobAsync(JobName, CallSettings)

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

Gets information about a Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskJob

A Task containing the RPC response.

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

GetJobAsync(JobName, CancellationToken)

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

Gets information about a Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskJob

A Task containing the RPC response.

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

GetJobAsync(string, CallSettings)

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

Gets information about a Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskJob

A Task containing the RPC response.

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

GetJobAsync(string, CancellationToken)

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

Gets information about a Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
gcrv::Job response = await jobsClient.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.

Parameters
NameDescription
parentLocationName

Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

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

// Iterate over all response items, lazily performing RPCs as required
foreach (gcrv::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 (gcrv::ListJobsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcrv::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<gcrv::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 (gcrv::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.

Parameters
NameDescription
requestListJobsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
gcrv::ListJobsRequest request = new gcrv::ListJobsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ShowDeleted = false,
};
// Make the request
PagedEnumerable<gcrv::ListJobsResponse, gcrv::Job> response = jobsClient.ListJobs(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (gcrv::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 (gcrv::ListJobsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcrv::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<gcrv::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 (gcrv::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.

Parameters
NameDescription
parentstring

Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

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

// Iterate over all response items, lazily performing RPCs as required
foreach (gcrv::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 (gcrv::ListJobsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcrv::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<gcrv::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 (gcrv::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.

Parameters
NameDescription
parentLocationName

Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

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

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcrv::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((gcrv::ListJobsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcrv::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<gcrv::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 (gcrv::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.

Parameters
NameDescription
requestListJobsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::ListJobsRequest request = new gcrv::ListJobsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ShowDeleted = false,
};
// Make the request
PagedAsyncEnumerable<gcrv::ListJobsResponse, gcrv::Job> response = jobsClient.ListJobsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcrv::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((gcrv::ListJobsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcrv::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<gcrv::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 (gcrv::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.

Parameters
NameDescription
parentstring

Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number.

pageTokenstring

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

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

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

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((gcrv::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((gcrv::ListJobsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (gcrv::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<gcrv::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 (gcrv::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, Job> PollOnceCreateJob(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The result of polling the operation.

PollOnceCreateJobAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A task representing the result of polling the operation.

PollOnceDeleteJob(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The result of polling the operation.

PollOnceDeleteJobAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A task representing the result of polling the operation.

PollOnceRunJob(string, CallSettings)

public virtual Operation<Execution, Execution> PollOnceRunJob(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationExecutionExecution

The result of polling the operation.

PollOnceRunJobAsync(string, CallSettings)

public virtual Task<Operation<Execution, Execution>> PollOnceRunJobAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationExecutionExecution

A task representing the result of polling the operation.

PollOnceUpdateJob(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The result of polling the operation.

PollOnceUpdateJobAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A task representing the result of polling the operation.

RunJob(JobName, CallSettings)

public virtual Operation<Execution, Execution> RunJob(JobName name, CallSettings callSettings = null)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationExecutionExecution

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
gcrv::JobName name = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = jobsClient.RunJob(name);

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

RunJob(RunJobRequest, CallSettings)

public virtual Operation<Execution, Execution> RunJob(RunJobRequest request, CallSettings callSettings = null)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
requestRunJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationExecutionExecution

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
gcrv::RunJobRequest request = new gcrv::RunJobRequest
{
    JobName = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    ValidateOnly = false,
    Etag = "",
    Overrides = new gcrv::RunJobRequest.Types.Overrides(),
};
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = jobsClient.RunJob(request);

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

RunJob(string, CallSettings)

public virtual Operation<Execution, Execution> RunJob(string name, CallSettings callSettings = null)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationExecutionExecution

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = jobsClient.RunJob(name);

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

RunJobAsync(JobName, CallSettings)

public virtual Task<Operation<Execution, Execution>> RunJobAsync(JobName name, CallSettings callSettings = null)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationExecutionExecution

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::JobName name = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await jobsClient.RunJobAsync(name);

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

RunJobAsync(JobName, CancellationToken)

public virtual Task<Operation<Execution, Execution>> RunJobAsync(JobName name, CancellationToken cancellationToken)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
nameJobName

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationExecutionExecution

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::JobName name = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await jobsClient.RunJobAsync(name);

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

RunJobAsync(RunJobRequest, CallSettings)

public virtual Task<Operation<Execution, Execution>> RunJobAsync(RunJobRequest request, CallSettings callSettings = null)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
requestRunJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationExecutionExecution

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::RunJobRequest request = new gcrv::RunJobRequest
{
    JobName = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    ValidateOnly = false,
    Etag = "",
    Overrides = new gcrv::RunJobRequest.Types.Overrides(),
};
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await jobsClient.RunJobAsync(request);

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

RunJobAsync(RunJobRequest, CancellationToken)

public virtual Task<Operation<Execution, Execution>> RunJobAsync(RunJobRequest request, CancellationToken cancellationToken)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
requestRunJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationExecutionExecution

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::RunJobRequest request = new gcrv::RunJobRequest
{
    JobName = gcrv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
    ValidateOnly = false,
    Etag = "",
    Overrides = new gcrv::RunJobRequest.Types.Overrides(),
};
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await jobsClient.RunJobAsync(request);

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

RunJobAsync(string, CallSettings)

public virtual Task<Operation<Execution, Execution>> RunJobAsync(string name, CallSettings callSettings = null)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationExecutionExecution

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await jobsClient.RunJobAsync(name);

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

RunJobAsync(string, CancellationToken)

public virtual Task<Operation<Execution, Execution>> RunJobAsync(string name, CancellationToken cancellationToken)

Triggers creation of a new Execution of this Job.

Parameters
NameDescription
namestring

Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationExecutionExecution

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
Operation<gcrv::Execution, gcrv::Execution> response = await jobsClient.RunJobAsync(name);

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

SetIamPolicy(SetIamPolicyRequest, CallSettings)

public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the IAM Access control policy for the specified Job. Overwrites any existing policy.

Parameters
NameDescription
requestSetIamPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = jobsClient.SetIamPolicy(request);

SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the IAM Access control policy for the specified Job. Overwrites any existing policy.

Parameters
NameDescription
requestSetIamPolicyRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await jobsClient.SetIamPolicyAsync(request);

SetIamPolicyAsync(SetIamPolicyRequest, CancellationToken)

public virtual Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CancellationToken cancellationToken)

Sets the IAM Access control policy for the specified Job. Overwrites any existing policy.

Parameters
NameDescription
requestSetIamPolicyRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskPolicy

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Policy = new Policy(),
    UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await jobsClient.SetIamPolicyAsync(request);

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
TypeDescription
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.

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified Project.

There are no permissions required for making this API call.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = jobsClient.TestIamPermissions(request);

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified Project.

There are no permissions required for making this API call.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await jobsClient.TestIamPermissionsAsync(request);

TestIamPermissionsAsync(TestIamPermissionsRequest, CancellationToken)

public virtual Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CancellationToken cancellationToken)

Returns permissions that a caller has on the specified Project.

There are no permissions required for making this API call.

Parameters
NameDescription
requestTestIamPermissionsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTestIamPermissionsResponse

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
    ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
    Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await jobsClient.TestIamPermissionsAsync(request);

UpdateJob(Job, CallSettings)

public virtual Operation<Job, Job> UpdateJob(Job job, CallSettings callSettings = null)

Updates a Job.

Parameters
NameDescription
jobJob

Required. The Job to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
gcrv::Job job = new gcrv::Job();
// Make the request
Operation<gcrv::Job, gcrv::Job> response = jobsClient.UpdateJob(job);

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

UpdateJob(UpdateJobRequest, CallSettings)

public virtual Operation<Job, Job> UpdateJob(UpdateJobRequest request, CallSettings callSettings = null)

Updates a Job.

Parameters
NameDescription
requestUpdateJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationJobJob

The RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = gcrv::JobsClient.Create();
// Initialize request argument(s)
gcrv::UpdateJobRequest request = new gcrv::UpdateJobRequest
{
    Job = new gcrv::Job(),
    ValidateOnly = false,
    AllowMissing = false,
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = jobsClient.UpdateJob(request);

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

UpdateJobAsync(Job, CallSettings)

public virtual Task<Operation<Job, Job>> UpdateJobAsync(Job job, CallSettings callSettings = null)

Updates a Job.

Parameters
NameDescription
jobJob

Required. The Job to be updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::Job job = new gcrv::Job();
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.UpdateJobAsync(job);

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

UpdateJobAsync(Job, CancellationToken)

public virtual Task<Operation<Job, Job>> UpdateJobAsync(Job job, CancellationToken cancellationToken)

Updates a Job.

Parameters
NameDescription
jobJob

Required. The Job to be updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::Job job = new gcrv::Job();
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.UpdateJobAsync(job);

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

UpdateJobAsync(UpdateJobRequest, CallSettings)

public virtual Task<Operation<Job, Job>> UpdateJobAsync(UpdateJobRequest request, CallSettings callSettings = null)

Updates a Job.

Parameters
NameDescription
requestUpdateJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::UpdateJobRequest request = new gcrv::UpdateJobRequest
{
    Job = new gcrv::Job(),
    ValidateOnly = false,
    AllowMissing = false,
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.UpdateJobAsync(request);

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

UpdateJobAsync(UpdateJobRequest, CancellationToken)

public virtual Task<Operation<Job, Job>> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken)

Updates a Job.

Parameters
NameDescription
requestUpdateJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationJobJob

A Task containing the RPC response.

Example
// Create client
gcrv::JobsClient jobsClient = await gcrv::JobsClient.CreateAsync();
// Initialize request argument(s)
gcrv::UpdateJobRequest request = new gcrv::UpdateJobRequest
{
    Job = new gcrv::Job(),
    ValidateOnly = false,
    AllowMissing = false,
};
// Make the request
Operation<gcrv::Job, gcrv::Job> response = await jobsClient.UpdateJobAsync(request);

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