Cloud AI Platform v1 API - Class JobServiceClient (2.4.0)

Stay organized with collections Save and categorize content based on your preferences.
public abstract class JobServiceClient

Reference documentation and code samples for the Cloud AI Platform v1 API class JobServiceClient.

JobService client wrapper, for convenient use.

Inheritance

Object > JobServiceClient

Derived Types

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

A service for creating and managing Vertex AI's jobs.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default JobService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default JobService scopes are:

DeleteBatchPredictionJobOperationsClient

public virtual OperationsClient DeleteBatchPredictionJobOperationsClient { get; }

The long-running operations client for DeleteBatchPredictionJob.

Property Value
TypeDescription
OperationsClient

DeleteCustomJobOperationsClient

public virtual OperationsClient DeleteCustomJobOperationsClient { get; }

The long-running operations client for DeleteCustomJob.

Property Value
TypeDescription
OperationsClient

DeleteDataLabelingJobOperationsClient

public virtual OperationsClient DeleteDataLabelingJobOperationsClient { get; }

The long-running operations client for DeleteDataLabelingJob.

Property Value
TypeDescription
OperationsClient

DeleteHyperparameterTuningJobOperationsClient

public virtual OperationsClient DeleteHyperparameterTuningJobOperationsClient { get; }

The long-running operations client for DeleteHyperparameterTuningJob.

Property Value
TypeDescription
OperationsClient

DeleteModelDeploymentMonitoringJobOperationsClient

public virtual OperationsClient DeleteModelDeploymentMonitoringJobOperationsClient { get; }

The long-running operations client for DeleteModelDeploymentMonitoringJob.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual JobService.JobServiceClient GrpcClient { get; }

The underlying gRPC JobService client

Property Value
TypeDescription
JobService.JobServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateModelDeploymentMonitoringJobOperationsClient

public virtual OperationsClient UpdateModelDeploymentMonitoringJobOperationsClient { get; }

The long-running operations client for UpdateModelDeploymentMonitoringJob.

Property Value
TypeDescription
OperationsClient

Methods

CancelBatchPredictionJob(BatchPredictionJobName, CallSettings)

public virtual void CancelBatchPredictionJob(BatchPredictionJobName name, CallSettings callSettings = null)

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
nameBatchPredictionJobName

Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
BatchPredictionJobName name = BatchPredictionJobName.FromProjectLocationBatchPredictionJob("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
// Make the request
jobServiceClient.CancelBatchPredictionJob(name);

CancelBatchPredictionJob(CancelBatchPredictionJobRequest, CallSettings)

public virtual void CancelBatchPredictionJob(CancelBatchPredictionJobRequest request, CallSettings callSettings = null)

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
requestCancelBatchPredictionJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
CancelBatchPredictionJobRequest request = new CancelBatchPredictionJobRequest
{
    BatchPredictionJobName = BatchPredictionJobName.FromProjectLocationBatchPredictionJob("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"),
};
// Make the request
jobServiceClient.CancelBatchPredictionJob(request);

CancelBatchPredictionJob(String, CallSettings)

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

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
nameString

Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/batchPredictionJobs/[BATCH_PREDICTION_JOB]";
// Make the request
jobServiceClient.CancelBatchPredictionJob(name);

CancelBatchPredictionJobAsync(BatchPredictionJobName, CallSettings)

public virtual Task CancelBatchPredictionJobAsync(BatchPredictionJobName name, CallSettings callSettings = null)

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
nameBatchPredictionJobName

Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
BatchPredictionJobName name = BatchPredictionJobName.FromProjectLocationBatchPredictionJob("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
// Make the request
await jobServiceClient.CancelBatchPredictionJobAsync(name);

CancelBatchPredictionJobAsync(BatchPredictionJobName, CancellationToken)

public virtual Task CancelBatchPredictionJobAsync(BatchPredictionJobName name, CancellationToken cancellationToken)

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
nameBatchPredictionJobName

Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
BatchPredictionJobName name = BatchPredictionJobName.FromProjectLocationBatchPredictionJob("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]");
// Make the request
await jobServiceClient.CancelBatchPredictionJobAsync(name);

CancelBatchPredictionJobAsync(CancelBatchPredictionJobRequest, CallSettings)

public virtual Task CancelBatchPredictionJobAsync(CancelBatchPredictionJobRequest request, CallSettings callSettings = null)

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
requestCancelBatchPredictionJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CancelBatchPredictionJobRequest request = new CancelBatchPredictionJobRequest
{
    BatchPredictionJobName = BatchPredictionJobName.FromProjectLocationBatchPredictionJob("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"),
};
// Make the request
await jobServiceClient.CancelBatchPredictionJobAsync(request);

CancelBatchPredictionJobAsync(CancelBatchPredictionJobRequest, CancellationToken)

public virtual Task CancelBatchPredictionJobAsync(CancelBatchPredictionJobRequest request, CancellationToken cancellationToken)

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
requestCancelBatchPredictionJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CancelBatchPredictionJobRequest request = new CancelBatchPredictionJobRequest
{
    BatchPredictionJobName = BatchPredictionJobName.FromProjectLocationBatchPredictionJob("[PROJECT]", "[LOCATION]", "[BATCH_PREDICTION_JOB]"),
};
// Make the request
await jobServiceClient.CancelBatchPredictionJobAsync(request);

CancelBatchPredictionJobAsync(String, CallSettings)

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

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
nameString

Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/batchPredictionJobs/[BATCH_PREDICTION_JOB]";
// Make the request
await jobServiceClient.CancelBatchPredictionJobAsync(name);

CancelBatchPredictionJobAsync(String, CancellationToken)

public virtual Task CancelBatchPredictionJobAsync(string name, CancellationToken cancellationToken)

Cancels a BatchPredictionJob.

Starts asynchronous cancellation on the BatchPredictionJob. The server makes the best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On a successful cancellation, the BatchPredictionJob is not deleted;instead its [BatchPredictionJob.state][google.cloud.aiplatform.v1.BatchPredictionJob.state] is set to CANCELLED. Any files already outputted by the job are not deleted.

Parameters
NameDescription
nameString

Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/batchPredictionJobs/[BATCH_PREDICTION_JOB]";
// Make the request
await jobServiceClient.CancelBatchPredictionJobAsync(name);

CancelCustomJob(CancelCustomJobRequest, CallSettings)

public virtual void CancelCustomJob(CancelCustomJobRequest request, CallSettings callSettings = null)

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
requestCancelCustomJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
CancelCustomJobRequest request = new CancelCustomJobRequest
{
    CustomJobName = CustomJobName.FromProjectLocationCustomJob("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"),
};
// Make the request
jobServiceClient.CancelCustomJob(request);

CancelCustomJob(CustomJobName, CallSettings)

public virtual void CancelCustomJob(CustomJobName name, CallSettings callSettings = null)

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
nameCustomJobName

Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
CustomJobName name = CustomJobName.FromProjectLocationCustomJob("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
// Make the request
jobServiceClient.CancelCustomJob(name);

CancelCustomJob(String, CallSettings)

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

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
nameString

Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customJobs/[CUSTOM_JOB]";
// Make the request
jobServiceClient.CancelCustomJob(name);

CancelCustomJobAsync(CancelCustomJobRequest, CallSettings)

public virtual Task CancelCustomJobAsync(CancelCustomJobRequest request, CallSettings callSettings = null)

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
requestCancelCustomJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CancelCustomJobRequest request = new CancelCustomJobRequest
{
    CustomJobName = CustomJobName.FromProjectLocationCustomJob("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"),
};
// Make the request
await jobServiceClient.CancelCustomJobAsync(request);

CancelCustomJobAsync(CancelCustomJobRequest, CancellationToken)

public virtual Task CancelCustomJobAsync(CancelCustomJobRequest request, CancellationToken cancellationToken)

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
requestCancelCustomJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CancelCustomJobRequest request = new CancelCustomJobRequest
{
    CustomJobName = CustomJobName.FromProjectLocationCustomJob("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]"),
};
// Make the request
await jobServiceClient.CancelCustomJobAsync(request);

CancelCustomJobAsync(CustomJobName, CallSettings)

public virtual Task CancelCustomJobAsync(CustomJobName name, CallSettings callSettings = null)

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
nameCustomJobName

Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CustomJobName name = CustomJobName.FromProjectLocationCustomJob("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
// Make the request
await jobServiceClient.CancelCustomJobAsync(name);

CancelCustomJobAsync(CustomJobName, CancellationToken)

public virtual Task CancelCustomJobAsync(CustomJobName name, CancellationToken cancellationToken)

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
nameCustomJobName

Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CustomJobName name = CustomJobName.FromProjectLocationCustomJob("[PROJECT]", "[LOCATION]", "[CUSTOM_JOB]");
// Make the request
await jobServiceClient.CancelCustomJobAsync(name);

CancelCustomJobAsync(String, CallSettings)

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

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
nameString

Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customJobs/[CUSTOM_JOB]";
// Make the request
await jobServiceClient.CancelCustomJobAsync(name);

CancelCustomJobAsync(String, CancellationToken)

public virtual Task CancelCustomJobAsync(string name, CancellationToken cancellationToken)

Cancels a CustomJob. Starts asynchronous cancellation on the CustomJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the CustomJob is not deleted; instead it becomes a job with a [CustomJob.error][google.cloud.aiplatform.v1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [CustomJob.state][google.cloud.aiplatform.v1.CustomJob.state] is set to CANCELLED.

Parameters
NameDescription
nameString

Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/customJobs/[CUSTOM_JOB]";
// Make the request
await jobServiceClient.CancelCustomJobAsync(name);

CancelDataLabelingJob(CancelDataLabelingJobRequest, CallSettings)

public virtual void CancelDataLabelingJob(CancelDataLabelingJobRequest request, CallSettings callSettings = null)

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
requestCancelDataLabelingJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
CancelDataLabelingJobRequest request = new CancelDataLabelingJobRequest
{
    DataLabelingJobName = DataLabelingJobName.FromProjectLocationDataLabelingJob("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"),
};
// Make the request
jobServiceClient.CancelDataLabelingJob(request);

CancelDataLabelingJob(DataLabelingJobName, CallSettings)

public virtual void CancelDataLabelingJob(DataLabelingJobName name, CallSettings callSettings = null)

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
nameDataLabelingJobName

Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
DataLabelingJobName name = DataLabelingJobName.FromProjectLocationDataLabelingJob("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
// Make the request
jobServiceClient.CancelDataLabelingJob(name);

CancelDataLabelingJob(String, CallSettings)

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

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
nameString

Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataLabelingJobs/[DATA_LABELING_JOB]";
// Make the request
jobServiceClient.CancelDataLabelingJob(name);

CancelDataLabelingJobAsync(CancelDataLabelingJobRequest, CallSettings)

public virtual Task CancelDataLabelingJobAsync(CancelDataLabelingJobRequest request, CallSettings callSettings = null)

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
requestCancelDataLabelingJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CancelDataLabelingJobRequest request = new CancelDataLabelingJobRequest
{
    DataLabelingJobName = DataLabelingJobName.FromProjectLocationDataLabelingJob("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"),
};
// Make the request
await jobServiceClient.CancelDataLabelingJobAsync(request);

CancelDataLabelingJobAsync(CancelDataLabelingJobRequest, CancellationToken)

public virtual Task CancelDataLabelingJobAsync(CancelDataLabelingJobRequest request, CancellationToken cancellationToken)

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
requestCancelDataLabelingJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CancelDataLabelingJobRequest request = new CancelDataLabelingJobRequest
{
    DataLabelingJobName = DataLabelingJobName.FromProjectLocationDataLabelingJob("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]"),
};
// Make the request
await jobServiceClient.CancelDataLabelingJobAsync(request);

CancelDataLabelingJobAsync(DataLabelingJobName, CallSettings)

public virtual Task CancelDataLabelingJobAsync(DataLabelingJobName name, CallSettings callSettings = null)

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
nameDataLabelingJobName

Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
DataLabelingJobName name = DataLabelingJobName.FromProjectLocationDataLabelingJob("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
// Make the request
await jobServiceClient.CancelDataLabelingJobAsync(name);

CancelDataLabelingJobAsync(DataLabelingJobName, CancellationToken)

public virtual Task CancelDataLabelingJobAsync(DataLabelingJobName name, CancellationToken cancellationToken)

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
nameDataLabelingJobName

Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
DataLabelingJobName name = DataLabelingJobName.FromProjectLocationDataLabelingJob("[PROJECT]", "[LOCATION]", "[DATA_LABELING_JOB]");
// Make the request
await jobServiceClient.CancelDataLabelingJobAsync(name);

CancelDataLabelingJobAsync(String, CallSettings)

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

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
nameString

Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataLabelingJobs/[DATA_LABELING_JOB]";
// Make the request
await jobServiceClient.CancelDataLabelingJobAsync(name);

CancelDataLabelingJobAsync(String, CancellationToken)

public virtual Task CancelDataLabelingJobAsync(string name, CancellationToken cancellationToken)

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Parameters
NameDescription
nameString

Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataLabelingJobs/[DATA_LABELING_JOB]";
// Make the request
await jobServiceClient.CancelDataLabelingJobAsync(name);

CancelHyperparameterTuningJob(CancelHyperparameterTuningJobRequest, CallSettings)

public virtual void CancelHyperparameterTuningJob(CancelHyperparameterTuningJobRequest request, CallSettings callSettings = null)

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to CANCELLED.

Parameters
NameDescription
requestCancelHyperparameterTuningJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
CancelHyperparameterTuningJobRequest request = new CancelHyperparameterTuningJobRequest
{
    HyperparameterTuningJobName = HyperparameterTuningJobName.FromProjectLocationHyperparameterTuningJob("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"),
};
// Make the request
jobServiceClient.CancelHyperparameterTuningJob(request);

CancelHyperparameterTuningJob(HyperparameterTuningJobName, CallSettings)

public virtual void CancelHyperparameterTuningJob(HyperparameterTuningJobName name, CallSettings callSettings = null)

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to CANCELLED.

Parameters
NameDescription
nameHyperparameterTuningJobName

Required. The name of the HyperparameterTuningJob to cancel. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
HyperparameterTuningJobName name = HyperparameterTuningJobName.FromProjectLocationHyperparameterTuningJob("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]");
// Make the request
jobServiceClient.CancelHyperparameterTuningJob(name);

CancelHyperparameterTuningJob(String, CallSettings)

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

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to CANCELLED.

Parameters
NameDescription
nameString

Required. The name of the HyperparameterTuningJob to cancel. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
JobServiceClient jobServiceClient = JobServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/hyperparameterTuningJobs/[HYPERPARAMETER_TUNING_JOB]";
// Make the request
jobServiceClient.CancelHyperparameterTuningJob(name);

CancelHyperparameterTuningJobAsync(CancelHyperparameterTuningJobRequest, CallSettings)

public virtual Task CancelHyperparameterTuningJobAsync(CancelHyperparameterTuningJobRequest request, CallSettings callSettings = null)

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to CANCELLED.

Parameters
NameDescription
requestCancelHyperparameterTuningJobRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
JobServiceClient jobServiceClient = await JobServiceClient.CreateAsync();
// Initialize request argument(s)
CancelHyperparameterTuningJobRequest request = new CancelHyperparameterTuningJobRequest
{
    HyperparameterTuningJobName = HyperparameterTuningJobName.FromProjectLocationHyperparameterTuningJob("[PROJECT]", "[LOCATION]", "[HYPERPARAMETER_TUNING_JOB]"),
};
// Make the request
await jobServiceClient.CancelHyperparameterTuningJobAsync(request);

CancelHyperparameterTuningJobAsync(CancelHyperparameterTuningJobRequest, CancellationToken)

public virtual Task CancelHyperparameterTuningJobAsync(CancelHyperparameterTuningJobRequest request, CancellationToken cancellationToken)

Cancels a HyperparameterTuningJob. Starts asynchronous cancellation on the HyperparameterTuningJob. The server makes a best effort to cancel the job, but success is not guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob] or other methods to check whether the cancellation succeeded or whether the job completed despite cancellation. On successful cancellation, the HyperparameterTuningJob is not deleted; instead it becomes a job with a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to Code.CANCELLED, and [HyperparameterTuningJob.state][google.cloud.aiplatform.v1.HyperparameterTuningJob.state] is set to CANCELLED.

Parameters
NameDescription
requestCancelHyperparameterTuningJobRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription