Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::JobService::Client (v0.14.0)

Reference documentation and code samples for the Vertex AI V1 API class Google::Cloud::AIPlatform::V1::JobService::Client.

Client for the JobService service.

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

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the JobService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all JobService clients
::Google::Cloud::AIPlatform::V1::JobService::Client.configure do |config|
  config.timeout = 10.0
end

#cancel_batch_prediction_job

def cancel_batch_prediction_job(request, options = nil) -> ::Google::Protobuf::Empty
def cancel_batch_prediction_job(name: nil) -> ::Google::Protobuf::Empty

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 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 is set to CANCELLED. Any files already outputted by the job are not deleted.

Overloads
def cancel_batch_prediction_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_batch_prediction_job via a request object, either of type CancelBatchPredictionJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CancelBatchPredictionJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_batch_prediction_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_batch_prediction_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the BatchPredictionJob to cancel. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelBatchPredictionJobRequest.new

# Call the cancel_batch_prediction_job method.
result = client.cancel_batch_prediction_job request

# The returned object is of type Google::Protobuf::Empty.
p result

#cancel_custom_job

def cancel_custom_job(request, options = nil) -> ::Google::Protobuf::Empty
def cancel_custom_job(name: nil) -> ::Google::Protobuf::Empty

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 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 value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and CustomJob.state is set to CANCELLED.

Overloads
def cancel_custom_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_custom_job via a request object, either of type CancelCustomJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CancelCustomJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_custom_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_custom_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the CustomJob to cancel. Format: projects/{project}/locations/{location}/customJobs/{custom_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelCustomJobRequest.new

# Call the cancel_custom_job method.
result = client.cancel_custom_job request

# The returned object is of type Google::Protobuf::Empty.
p result

#cancel_data_labeling_job

def cancel_data_labeling_job(request, options = nil) -> ::Google::Protobuf::Empty
def cancel_data_labeling_job(name: nil) -> ::Google::Protobuf::Empty

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Overloads
def cancel_data_labeling_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_data_labeling_job via a request object, either of type CancelDataLabelingJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CancelDataLabelingJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_data_labeling_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_data_labeling_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelDataLabelingJobRequest.new

# Call the cancel_data_labeling_job method.
result = client.cancel_data_labeling_job request

# The returned object is of type Google::Protobuf::Empty.
p result

#cancel_hyperparameter_tuning_job

def cancel_hyperparameter_tuning_job(request, options = nil) -> ::Google::Protobuf::Empty
def cancel_hyperparameter_tuning_job(name: nil) -> ::Google::Protobuf::Empty

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 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 value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED, and HyperparameterTuningJob.state is set to CANCELLED.

Overloads
def cancel_hyperparameter_tuning_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_hyperparameter_tuning_job via a request object, either of type CancelHyperparameterTuningJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CancelHyperparameterTuningJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_hyperparameter_tuning_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to cancel_hyperparameter_tuning_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the HyperparameterTuningJob to cancel. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CancelHyperparameterTuningJobRequest.new

# Call the cancel_hyperparameter_tuning_job method.
result = client.cancel_hyperparameter_tuning_job request

# The returned object is of type Google::Protobuf::Empty.
p result

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the JobService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_batch_prediction_job

def create_batch_prediction_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchPredictionJob
def create_batch_prediction_job(parent: nil, batch_prediction_job: nil) -> ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.

Overloads
def create_batch_prediction_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchPredictionJob
Pass arguments to create_batch_prediction_job via a request object, either of type CreateBatchPredictionJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateBatchPredictionJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_batch_prediction_job(parent: nil, batch_prediction_job: nil) -> ::Google::Cloud::AIPlatform::V1::BatchPredictionJob
Pass arguments to create_batch_prediction_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Location to create the BatchPredictionJob in. Format: projects/{project}/locations/{location}
  • batch_prediction_job (::Google::Cloud::AIPlatform::V1::BatchPredictionJob, ::Hash) — Required. The BatchPredictionJob to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateBatchPredictionJobRequest.new

# Call the create_batch_prediction_job method.
result = client.create_batch_prediction_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::BatchPredictionJob.
p result

#create_custom_job

def create_custom_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::CustomJob
def create_custom_job(parent: nil, custom_job: nil) -> ::Google::Cloud::AIPlatform::V1::CustomJob

Creates a CustomJob. A created CustomJob right away will be attempted to be run.

Overloads
def create_custom_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::CustomJob
Pass arguments to create_custom_job via a request object, either of type CreateCustomJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateCustomJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_custom_job(parent: nil, custom_job: nil) -> ::Google::Cloud::AIPlatform::V1::CustomJob
Pass arguments to create_custom_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Location to create the CustomJob in. Format: projects/{project}/locations/{location}
  • custom_job (::Google::Cloud::AIPlatform::V1::CustomJob, ::Hash) — Required. The CustomJob to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateCustomJobRequest.new

# Call the create_custom_job method.
result = client.create_custom_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::CustomJob.
p result

#create_data_labeling_job

def create_data_labeling_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::DataLabelingJob
def create_data_labeling_job(parent: nil, data_labeling_job: nil) -> ::Google::Cloud::AIPlatform::V1::DataLabelingJob

Creates a DataLabelingJob.

Overloads
def create_data_labeling_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::DataLabelingJob
Pass arguments to create_data_labeling_job via a request object, either of type CreateDataLabelingJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateDataLabelingJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_data_labeling_job(parent: nil, data_labeling_job: nil) -> ::Google::Cloud::AIPlatform::V1::DataLabelingJob
Pass arguments to create_data_labeling_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateDataLabelingJobRequest.new

# Call the create_data_labeling_job method.
result = client.create_data_labeling_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::DataLabelingJob.
p result

#create_hyperparameter_tuning_job

def create_hyperparameter_tuning_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob
def create_hyperparameter_tuning_job(parent: nil, hyperparameter_tuning_job: nil) -> ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

Creates a HyperparameterTuningJob

Overloads
def create_hyperparameter_tuning_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob
Pass arguments to create_hyperparameter_tuning_job via a request object, either of type CreateHyperparameterTuningJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateHyperparameterTuningJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_hyperparameter_tuning_job(parent: nil, hyperparameter_tuning_job: nil) -> ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob
Pass arguments to create_hyperparameter_tuning_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Location to create the HyperparameterTuningJob in. Format: projects/{project}/locations/{location}
  • hyperparameter_tuning_job (::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob, ::Hash) — Required. The HyperparameterTuningJob to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateHyperparameterTuningJobRequest.new

# Call the create_hyperparameter_tuning_job method.
result = client.create_hyperparameter_tuning_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::HyperparameterTuningJob.
p result

#create_model_deployment_monitoring_job

def create_model_deployment_monitoring_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob
def create_model_deployment_monitoring_job(parent: nil, model_deployment_monitoring_job: nil) -> ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob

Creates a ModelDeploymentMonitoringJob. It will run periodically on a configured interval.

Overloads
def create_model_deployment_monitoring_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob
Pass arguments to create_model_deployment_monitoring_job via a request object, either of type CreateModelDeploymentMonitoringJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateModelDeploymentMonitoringJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def create_model_deployment_monitoring_job(parent: nil, model_deployment_monitoring_job: nil) -> ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob
Pass arguments to create_model_deployment_monitoring_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::CreateModelDeploymentMonitoringJobRequest.new

# Call the create_model_deployment_monitoring_job method.
result = client.create_model_deployment_monitoring_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob.
p result

#delete_batch_prediction_job

def delete_batch_prediction_job(request, options = nil) -> ::Gapic::Operation
def delete_batch_prediction_job(name: nil) -> ::Gapic::Operation

Deletes a BatchPredictionJob. Can only be called on jobs that already finished.

Overloads
def delete_batch_prediction_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_batch_prediction_job via a request object, either of type DeleteBatchPredictionJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteBatchPredictionJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_batch_prediction_job(name: nil) -> ::Gapic::Operation
Pass arguments to delete_batch_prediction_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the BatchPredictionJob resource to be deleted. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteBatchPredictionJobRequest.new

# Call the delete_batch_prediction_job method.
result = client.delete_batch_prediction_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_custom_job

def delete_custom_job(request, options = nil) -> ::Gapic::Operation
def delete_custom_job(name: nil) -> ::Gapic::Operation

Deletes a CustomJob.

Overloads
def delete_custom_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_custom_job via a request object, either of type DeleteCustomJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteCustomJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_custom_job(name: nil) -> ::Gapic::Operation
Pass arguments to delete_custom_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the CustomJob resource to be deleted. Format: projects/{project}/locations/{location}/customJobs/{custom_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteCustomJobRequest.new

# Call the delete_custom_job method.
result = client.delete_custom_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_data_labeling_job

def delete_data_labeling_job(request, options = nil) -> ::Gapic::Operation
def delete_data_labeling_job(name: nil) -> ::Gapic::Operation

Deletes a DataLabelingJob.

Overloads
def delete_data_labeling_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_data_labeling_job via a request object, either of type DeleteDataLabelingJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteDataLabelingJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_data_labeling_job(name: nil) -> ::Gapic::Operation
Pass arguments to delete_data_labeling_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the DataLabelingJob to be deleted. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteDataLabelingJobRequest.new

# Call the delete_data_labeling_job method.
result = client.delete_data_labeling_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_hyperparameter_tuning_job

def delete_hyperparameter_tuning_job(request, options = nil) -> ::Gapic::Operation
def delete_hyperparameter_tuning_job(name: nil) -> ::Gapic::Operation

Deletes a HyperparameterTuningJob.

Overloads
def delete_hyperparameter_tuning_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_hyperparameter_tuning_job via a request object, either of type DeleteHyperparameterTuningJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteHyperparameterTuningJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_hyperparameter_tuning_job(name: nil) -> ::Gapic::Operation
Pass arguments to delete_hyperparameter_tuning_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the HyperparameterTuningJob resource to be deleted. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteHyperparameterTuningJobRequest.new

# Call the delete_hyperparameter_tuning_job method.
result = client.delete_hyperparameter_tuning_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_model_deployment_monitoring_job

def delete_model_deployment_monitoring_job(request, options = nil) -> ::Gapic::Operation
def delete_model_deployment_monitoring_job(name: nil) -> ::Gapic::Operation

Deletes a ModelDeploymentMonitoringJob.

Overloads
def delete_model_deployment_monitoring_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_model_deployment_monitoring_job via a request object, either of type DeleteModelDeploymentMonitoringJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteModelDeploymentMonitoringJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_model_deployment_monitoring_job(name: nil) -> ::Gapic::Operation
Pass arguments to delete_model_deployment_monitoring_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the model monitoring job to delete. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::DeleteModelDeploymentMonitoringJobRequest.new

# Call the delete_model_deployment_monitoring_job method.
result = client.delete_model_deployment_monitoring_job request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#get_batch_prediction_job

def get_batch_prediction_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchPredictionJob
def get_batch_prediction_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

Gets a BatchPredictionJob

Overloads
def get_batch_prediction_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::BatchPredictionJob
Pass arguments to get_batch_prediction_job via a request object, either of type GetBatchPredictionJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetBatchPredictionJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_batch_prediction_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::BatchPredictionJob
Pass arguments to get_batch_prediction_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the BatchPredictionJob resource. Format: projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetBatchPredictionJobRequest.new

# Call the get_batch_prediction_job method.
result = client.get_batch_prediction_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::BatchPredictionJob.
p result

#get_custom_job

def get_custom_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::CustomJob
def get_custom_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::CustomJob

Gets a CustomJob.

Overloads
def get_custom_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::CustomJob
Pass arguments to get_custom_job via a request object, either of type GetCustomJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetCustomJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_custom_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::CustomJob
Pass arguments to get_custom_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the CustomJob resource. Format: projects/{project}/locations/{location}/customJobs/{custom_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetCustomJobRequest.new

# Call the get_custom_job method.
result = client.get_custom_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::CustomJob.
p result

#get_data_labeling_job

def get_data_labeling_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::DataLabelingJob
def get_data_labeling_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::DataLabelingJob

Gets a DataLabelingJob.

Overloads
def get_data_labeling_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::DataLabelingJob
Pass arguments to get_data_labeling_job via a request object, either of type GetDataLabelingJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetDataLabelingJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_data_labeling_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::DataLabelingJob
Pass arguments to get_data_labeling_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetDataLabelingJobRequest.new

# Call the get_data_labeling_job method.
result = client.get_data_labeling_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::DataLabelingJob.
p result

#get_hyperparameter_tuning_job

def get_hyperparameter_tuning_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob
def get_hyperparameter_tuning_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

Gets a HyperparameterTuningJob

Overloads
def get_hyperparameter_tuning_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob
Pass arguments to get_hyperparameter_tuning_job via a request object, either of type GetHyperparameterTuningJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetHyperparameterTuningJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_hyperparameter_tuning_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob
Pass arguments to get_hyperparameter_tuning_job via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the HyperparameterTuningJob resource. Format: projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::AIPlatform::V1::GetHyperparameterTuningJobRequest.new

# Call the get_hyperparameter_tuning_job method.
result = client.get_hyperparameter_tuning_job request

# The returned object is of type Google::Cloud::AIPlatform::V1::HyperparameterTuningJob.
p result

#get_model_deployment_monitoring_job

def get_model_deployment_monitoring_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob
def get_model_deployment_monitoring_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob

Gets a ModelDeploymentMonitoringJob.

Overloads
def get_model_deployment_monitoring_job(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob
Pass arguments to get_model_deployment_monitoring_job via a request object, either of type GetModelDeploymentMonitoringJobRequest or an equivalent Hash.
Parameters