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

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
  • request (::Google::Cloud::AIPlatform::V1::GetModelDeploymentMonitoringJobRequest, ::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_model_deployment_monitoring_job(name: nil) -> ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob
Pass arguments to get_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 ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_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::GetModelDeploymentMonitoringJobRequest.new

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

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

#iam_policy_client

def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client

Get the associated client for mix-in of the IAMPolicy.

Returns
  • (Google::Iam::V1::IAMPolicy::Client)

#initialize

def initialize() { |config| ... } -> Client

Create a new JobService client object.

Yields
  • (config) — Configure the JobService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::AIPlatform::V1::JobService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::AIPlatform::V1::JobService::Client.new do |config|
  config.timeout = 10.0
end

#list_batch_prediction_jobs

def list_batch_prediction_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::BatchPredictionJob>
def list_batch_prediction_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::BatchPredictionJob>

Lists BatchPredictionJobs in a Location.

Overloads
def list_batch_prediction_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::BatchPredictionJob>
Pass arguments to list_batch_prediction_jobs via a request object, either of type ListBatchPredictionJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListBatchPredictionJobsRequest, ::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 list_batch_prediction_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::BatchPredictionJob>
Pass arguments to list_batch_prediction_jobs 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 list the BatchPredictionJobs from. Format: projects/{project}/locations/{location}
  • filter (::String) —

    The standard list filter.

    Supported fields:

    • display_name supports = and !=.

    • state supports = and !=.

    • model_display_name supports = and !=

    Some examples of using the filter are:

    • state="JOB_STATE_SUCCEEDED" AND display_name="my_job"

    • state="JOB_STATE_RUNNING" OR display_name="my_job"

    • NOT display_name="my_job"

    • state="JOB_STATE_FAILED"

  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token. Typically obtained via ListBatchPredictionJobsResponse.next_page_token of the previous JobService.ListBatchPredictionJobs call.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
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::ListBatchPredictionJobsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::BatchPredictionJob.
  p response
end

#list_custom_jobs

def list_custom_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::CustomJob>
def list_custom_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::CustomJob>

Lists CustomJobs in a Location.

Overloads
def list_custom_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::CustomJob>
Pass arguments to list_custom_jobs via a request object, either of type ListCustomJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListCustomJobsRequest, ::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 list_custom_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::CustomJob>
Pass arguments to list_custom_jobs 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 list the CustomJobs from. Format: projects/{project}/locations/{location}
  • filter (::String) —

    The standard list filter.

    Supported fields:

    • display_name supports = and !=.

    • state supports = and !=.

    Some examples of using the filter are:

    • state="JOB_STATE_SUCCEEDED" AND display_name="my_job"

    • state="JOB_STATE_RUNNING" OR display_name="my_job"

    • NOT display_name="my_job"

    • state="JOB_STATE_FAILED"

  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token. Typically obtained via ListCustomJobsResponse.next_page_token of the previous JobService.ListCustomJobs call.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
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::ListCustomJobsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::CustomJob.
  p response
end

#list_data_labeling_jobs

def list_data_labeling_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataLabelingJob>
def list_data_labeling_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataLabelingJob>

Lists DataLabelingJobs in a Location.

Overloads
def list_data_labeling_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataLabelingJob>
Pass arguments to list_data_labeling_jobs via a request object, either of type ListDataLabelingJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListDataLabelingJobsRequest, ::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 list_data_labeling_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataLabelingJob>
Pass arguments to list_data_labeling_jobs 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 parent of the DataLabelingJob. Format: projects/{project}/locations/{location}
  • filter (::String) —

    The standard list filter.

    Supported fields:

    • display_name supports = and !=.

    • state supports = and !=.

    Some examples of using the filter are:

    • state="JOB_STATE_SUCCEEDED" AND display_name="my_job"

    • state="JOB_STATE_RUNNING" OR display_name="my_job"

    • NOT display_name="my_job"

    • state="JOB_STATE_FAILED"

  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read. FieldMask represents a set of symbolic field paths. For example, the mask can be paths: "name". The "name" here is a field in DataLabelingJob. If this field is not set, all fields of the DataLabelingJob are returned.
  • order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order by default. Use desc after a field name for descending.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
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::ListDataLabelingJobsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::DataLabelingJob.
  p response
end

#list_hyperparameter_tuning_jobs

def list_hyperparameter_tuning_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob>
def list_hyperparameter_tuning_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob>

Lists HyperparameterTuningJobs in a Location.

Overloads
def list_hyperparameter_tuning_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob>
Pass arguments to list_hyperparameter_tuning_jobs via a request object, either of type ListHyperparameterTuningJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListHyperparameterTuningJobsRequest, ::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 list_hyperparameter_tuning_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob>
Pass arguments to list_hyperparameter_tuning_jobs 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 list the HyperparameterTuningJobs from. Format: projects/{project}/locations/{location}
  • filter (::String) —

    The standard list filter.

    Supported fields:

    • display_name supports = and !=.

    • state supports = and !=.

    Some examples of using the filter are:

    • state="JOB_STATE_SUCCEEDED" AND display_name="my_job"

    • state="JOB_STATE_RUNNING" OR display_name="my_job"

    • NOT display_name="my_job"

    • state="JOB_STATE_FAILED"

  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token. Typically obtained via ListHyperparameterTuningJobsResponse.next_page_token of the previous JobService.ListHyperparameterTuningJobs call.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
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::ListHyperparameterTuningJobsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob.
  p response
end

#list_model_deployment_monitoring_jobs

def list_model_deployment_monitoring_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob>
def list_model_deployment_monitoring_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob>

Lists ModelDeploymentMonitoringJobs in a Location.

Overloads
def list_model_deployment_monitoring_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob>
Pass arguments to list_model_deployment_monitoring_jobs via a request object, either of type ListModelDeploymentMonitoringJobsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListModelDeploymentMonitoringJobsRequest, ::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 list_model_deployment_monitoring_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob>
Pass arguments to list_model_deployment_monitoring_jobs 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 parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}
  • filter (::String) — The standard list filter.
  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read
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::ListModelDeploymentMonitoringJobsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob.
  p response
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Client)

#operations_client

def operations_client() -> ::Google::Cloud::AIPlatform::V1::JobService::Operations

Get the associated client for long-running operations.

#pause_model_deployment_monitoring_job

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

Pauses a ModelDeploymentMonitoringJob. If the job is running, the server makes a best effort to cancel the job. Will mark ModelDeploymentMonitoringJob.state to 'PAUSED'.

Overloads
def pause_model_deployment_monitoring_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to pause_model_deployment_monitoring_job via a request object, either of type PauseModelDeploymentMonitoringJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::PauseModelDeploymentMonitoringJobRequest, ::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 pause_model_deployment_monitoring_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to pause_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 ModelDeploymentMonitoringJob to pause. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_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::PauseModelDeploymentMonitoringJobRequest.new

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

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

#resume_model_deployment_monitoring_job

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

Resumes a paused ModelDeploymentMonitoringJob. It will start to run from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be resumed.

Overloads
def resume_model_deployment_monitoring_job(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to resume_model_deployment_monitoring_job via a request object, either of type ResumeModelDeploymentMonitoringJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ResumeModelDeploymentMonitoringJobRequest, ::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 resume_model_deployment_monitoring_job(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to resume_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 ModelDeploymentMonitoringJob to resume. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_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::ResumeModelDeploymentMonitoringJobRequest.new

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

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

#search_model_deployment_monitoring_stats_anomalies

def search_model_deployment_monitoring_stats_anomalies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies>
def search_model_deployment_monitoring_stats_anomalies(model_deployment_monitoring_job: nil, deployed_model_id: nil, feature_display_name: nil, objectives: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies>

Searches Model Monitoring Statistics generated within a given time window.

Overloads
def search_model_deployment_monitoring_stats_anomalies(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies>
Pass arguments to search_model_deployment_monitoring_stats_anomalies via a request object, either of type SearchModelDeploymentMonitoringStatsAnomaliesRequest or an equivalent Hash.
Parameters
def search_model_deployment_monitoring_stats_anomalies(model_deployment_monitoring_job: nil, deployed_model_id: nil, feature_display_name: nil, objectives: nil, page_size: nil, page_token: nil, start_time: nil, end_time: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies>
Pass arguments to search_model_deployment_monitoring_stats_anomalies 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::SearchModelDeploymentMonitoringStatsAnomaliesRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies.
  p response
end

#update_model_deployment_monitoring_job

def update_model_deployment_monitoring_job(request, options = nil) -> ::Gapic::Operation
def update_model_deployment_monitoring_job(model_deployment_monitoring_job: nil, update_mask: nil) -> ::Gapic::Operation

Updates a ModelDeploymentMonitoringJob.

Overloads
def update_model_deployment_monitoring_job(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_model_deployment_monitoring_job via a request object, either of type UpdateModelDeploymentMonitoringJobRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::UpdateModelDeploymentMonitoringJobRequest, ::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 update_model_deployment_monitoring_job(model_deployment_monitoring_job: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_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
  • model_deployment_monitoring_job (::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob, ::Hash) — Required. The model monitoring configuration which replaces the resource on the server.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) —

    Required. The update mask is used to specify the fields to be overwritten in the ModelDeploymentMonitoringJob resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then only the non-empty fields present in the request will be overwritten. Set the update_mask to * to override all fields. For the objective config, the user can either provide the update mask for model_deployment_monitoring_objective_configs or any combination of its nested fields, such as: model_deployment_monitoring_objective_configs.objective_config.training_dataset.

    Updatable fields:

    • display_name
    • model_deployment_monitoring_schedule_config
    • model_monitoring_alert_config
    • logging_sampling_strategy
    • labels
    • log_ttl
    • enable_monitoring_pipeline_logs . and
    • model_deployment_monitoring_objective_configs . or
    • model_deployment_monitoring_objective_configs.objective_config.training_dataset
    • model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config
    • model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config
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::UpdateModelDeploymentMonitoringJobRequest.new

# Call the update_model_deployment_monitoring_job method.
result = client.update_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