Class: Google::Cloud::AIPlatform::V1::JobService::Rest::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/ai_platform/v1/job_service/rest/client.rb

Overview

REST client for the JobService service.

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

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#batch_prediction_job_path, #context_path, #custom_job_path, #data_labeling_job_path, #dataset_path, #endpoint_path, #hyperparameter_tuning_job_path, #location_path, #model_deployment_monitoring_job_path, #model_path, #nas_job_path, #nas_trial_detail_path, #network_path, #notification_channel_path, #persistent_resource_path, #reservation_path, #tensorboard_path, #trial_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new JobService REST client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::AIPlatform::V1::JobService::Rest::Client.new

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

Yields:

  • (config)

    Configure the JobService client.

Yield Parameters:



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 128

def initialize
  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end

  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = ::Google::Cloud::AIPlatform::V1::JobService::Rest::Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @job_service_stub = ::Google::Cloud::AIPlatform::V1::JobService::Rest::ServiceStub.new(
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    credentials: credentials
  )

  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @job_service_stub.endpoint
    config.universe_domain = @job_service_stub.universe_domain
    config.bindings_override = @config.bindings_override
  end

  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @job_service_stub.endpoint
    config.universe_domain = @job_service_stub.universe_domain
    config.bindings_override = @config.bindings_override
  end
end

Instance Attribute Details

#iam_policy_clientGoogle::Iam::V1::IAMPolicy::Rest::Client (readonly)

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

Returns:

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


201
202
203
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 201

def iam_policy_client
  @iam_policy_client
end

#location_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

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

Returns:

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


194
195
196
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 194

def location_client
  @location_client
end

#operations_client::Google::Cloud::AIPlatform::V1::JobService::Rest::Operations (readonly)

Get the associated client for long-running operations.



187
188
189
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 187

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the JobService Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all JobService clients
::Google::Cloud::AIPlatform::V1::JobService::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 66

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "AIPlatform", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#cancel_batch_prediction_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2651

def cancel_batch_prediction_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelBatchPredictionJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_batch_prediction_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_batch_prediction_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_batch_prediction_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.cancel_batch_prediction_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_custom_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 632

def cancel_custom_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelCustomJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_custom_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_custom_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_custom_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.cancel_custom_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_data_labeling_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #cancel_data_labeling_job(name: nil) ⇒ ::Google::Protobuf::Empty

Cancels a DataLabelingJob. Success of cancellation is not guaranteed.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1084

def cancel_data_labeling_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelDataLabelingJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_data_labeling_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_data_labeling_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_data_labeling_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.cancel_data_labeling_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1549

def cancel_hyperparameter_tuning_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelHyperparameterTuningJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_hyperparameter_tuning_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_hyperparameter_tuning_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_hyperparameter_tuning_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.cancel_hyperparameter_tuning_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#cancel_nas_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #cancel_nas_job(name: nil) ⇒ ::Google::Protobuf::Empty

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

Examples:

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::Rest::Client.new

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

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

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

Overloads:

  • #cancel_nas_job(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_nas_job via a request object, either of type CancelNasJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CancelNasJobRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #cancel_nas_job(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to cancel_nas_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:

    • name (::String) (defaults to: nil)

      Required. The name of the NasJob to cancel. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2011

def cancel_nas_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CancelNasJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.cancel_nas_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.cancel_nas_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.cancel_nas_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.cancel_nas_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#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 configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



98
99
100
101
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 98

def configure
  yield @config if block_given?
  @config
end

#create_batch_prediction_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob #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.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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) (defaults to: nil)

      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) (defaults to: nil)

      Required. The BatchPredictionJob to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2270

def create_batch_prediction_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateBatchPredictionJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_batch_prediction_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_batch_prediction_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_batch_prediction_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.create_batch_prediction_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_custom_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob #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.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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) (defaults to: nil)

      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) (defaults to: nil)

      Required. The CustomJob to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 252

def create_custom_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateCustomJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_custom_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_custom_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_custom_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.create_custom_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_data_labeling_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob #create_data_labeling_job(parent: nil, data_labeling_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob

Creates a DataLabelingJob.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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:

    • parent (::String) (defaults to: nil)

      Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}

    • data_labeling_job (::Google::Cloud::AIPlatform::V1::DataLabelingJob, ::Hash) (defaults to: nil)

      Required. The DataLabelingJob to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 714

def create_data_labeling_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateDataLabelingJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_data_labeling_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_data_labeling_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_data_labeling_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.create_data_labeling_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob #create_hyperparameter_tuning_job(parent: nil, hyperparameter_tuning_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

Creates a HyperparameterTuningJob

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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) (defaults to: nil)

      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) (defaults to: nil)

      Required. The HyperparameterTuningJob to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1167

def create_hyperparameter_tuning_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateHyperparameterTuningJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_hyperparameter_tuning_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_hyperparameter_tuning_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_hyperparameter_tuning_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.create_hyperparameter_tuning_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob #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.

Examples:

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::Rest::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

Overloads:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2734

def create_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.create_model_deployment_monitoring_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_nas_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob #create_nas_job(parent: nil, nas_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

Creates a NasJob

Examples:

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::Rest::Client.new

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

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

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

Overloads:

  • #create_nas_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

    Pass arguments to create_nas_job via a request object, either of type CreateNasJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::CreateNasJobRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_nas_job(parent: nil, nas_job: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

    Pass arguments to create_nas_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) (defaults to: nil)

      Required. The resource name of the Location to create the NasJob in. Format: projects/{project}/locations/{location}

    • nas_job (::Google::Cloud::AIPlatform::V1::NasJob, ::Hash) (defaults to: nil)

      Required. The NasJob to create.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1631

def create_nas_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateNasJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_nas_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_nas_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_nas_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.create_nas_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_batch_prediction_job(request, options = nil) ⇒ ::Gapic::Operation #delete_batch_prediction_job(name: nil) ⇒ ::Gapic::Operation

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

Examples:

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::Rest::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 it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2558

def delete_batch_prediction_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteBatchPredictionJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_batch_prediction_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_batch_prediction_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_batch_prediction_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.delete_batch_prediction_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_custom_job(request, options = nil) ⇒ ::Gapic::Operation #delete_custom_job(name: nil) ⇒ ::Gapic::Operation

Deletes a CustomJob.

Examples:

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::Rest::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 it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 538

def delete_custom_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteCustomJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_custom_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_custom_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_custom_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.delete_custom_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_data_labeling_job(request, options = nil) ⇒ ::Gapic::Operation #delete_data_labeling_job(name: nil) ⇒ ::Gapic::Operation

Deletes a DataLabelingJob.

Examples:

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::Rest::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 it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1002

def delete_data_labeling_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteDataLabelingJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_data_labeling_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_data_labeling_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_data_labeling_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.delete_data_labeling_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_hyperparameter_tuning_job(request, options = nil) ⇒ ::Gapic::Operation #delete_hyperparameter_tuning_job(name: nil) ⇒ ::Gapic::Operation

Deletes a HyperparameterTuningJob.

Examples:

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::Rest::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 it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1454

def delete_hyperparameter_tuning_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteHyperparameterTuningJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_hyperparameter_tuning_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_hyperparameter_tuning_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_hyperparameter_tuning_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.delete_hyperparameter_tuning_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_model_deployment_monitoring_job(request, options = nil) ⇒ ::Gapic::Operation #delete_model_deployment_monitoring_job(name: nil) ⇒ ::Gapic::Operation

Deletes a ModelDeploymentMonitoringJob.

Examples:

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::Rest::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 it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the model monitoring job to delete. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 3238

def delete_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.delete_model_deployment_monitoring_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_nas_job(request, options = nil) ⇒ ::Gapic::Operation #delete_nas_job(name: nil) ⇒ ::Gapic::Operation

Deletes a NasJob.

Examples:

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::Rest::Client.new

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

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

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

Overloads:

  • #delete_nas_job(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_nas_job via a request object, either of type DeleteNasJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::DeleteNasJobRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_nas_job(name: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_nas_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:

    • name (::String) (defaults to: nil)

      Required. The name of the NasJob resource to be deleted. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1917

def delete_nas_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteNasJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_nas_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_nas_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_nas_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.delete_nas_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_batch_prediction_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob #get_batch_prediction_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::BatchPredictionJob

Gets a BatchPredictionJob

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2351

def get_batch_prediction_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetBatchPredictionJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_batch_prediction_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_batch_prediction_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_batch_prediction_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.get_batch_prediction_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_custom_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob #get_custom_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::CustomJob

Gets a CustomJob.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 333

def get_custom_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetCustomJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_custom_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_custom_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_custom_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.get_custom_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_data_labeling_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob #get_data_labeling_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::DataLabelingJob

Gets a DataLabelingJob.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 795

def get_data_labeling_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetDataLabelingJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_data_labeling_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_data_labeling_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_data_labeling_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.get_data_labeling_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_hyperparameter_tuning_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob #get_hyperparameter_tuning_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob

Gets a HyperparameterTuningJob

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

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

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1248

def get_hyperparameter_tuning_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetHyperparameterTuningJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_hyperparameter_tuning_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_hyperparameter_tuning_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_hyperparameter_tuning_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.get_hyperparameter_tuning_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob #get_model_deployment_monitoring_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob

Gets a ModelDeploymentMonitoringJob.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2923

def get_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.get_model_deployment_monitoring_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_nas_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob #get_nas_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

Gets a NasJob

Examples:

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::Rest::Client.new

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

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

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

Overloads:

  • #get_nas_job(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

    Pass arguments to get_nas_job via a request object, either of type GetNasJobRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetNasJobRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_nas_job(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasJob

    Pass arguments to get_nas_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:

    • name (::String) (defaults to: nil)

      Required. The name of the NasJob resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1712

def get_nas_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetNasJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_nas_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_nas_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_nas_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.get_nas_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_nas_trial_detail(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasTrialDetail #get_nas_trial_detail(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasTrialDetail

Gets a NasTrialDetail.

Examples:

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::Rest::Client.new

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

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

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

Overloads:

  • #get_nas_trial_detail(request, options = nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasTrialDetail

    Pass arguments to get_nas_trial_detail via a request object, either of type GetNasTrialDetailRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::GetNasTrialDetailRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_nas_trial_detail(name: nil) ⇒ ::Google::Cloud::AIPlatform::V1::NasTrialDetail

    Pass arguments to get_nas_trial_detail 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:

    • name (::String) (defaults to: nil)

      Required. The name of the NasTrialDetail resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2092

def get_nas_trial_detail request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetNasTrialDetailRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_nas_trial_detail..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_nas_trial_detail.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_nas_trial_detail.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.get_nas_trial_detail request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

Lists BatchPredictionJobs in a Location.

Examples:

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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::BatchPredictionJob.
  p item
end

Overloads:

  • #list_batch_prediction_jobs(request, options = nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_batch_prediction_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Required. The resource name of the Location to list the BatchPredictionJobs from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • model_display_name supports =, != comparisons.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListBatchPredictionJobsResponse.next_page_token of the previous JobService.ListBatchPredictionJobs call.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2468

def list_batch_prediction_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListBatchPredictionJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_batch_prediction_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_batch_prediction_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_batch_prediction_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.list_batch_prediction_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_batch_prediction_jobs, "batch_prediction_jobs", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

Lists CustomJobs in a Location.

Examples:

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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::CustomJob.
  p item
end

Overloads:

  • #list_custom_jobs(request, options = nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_custom_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Required. The resource name of the Location to list the CustomJobs from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListCustomJobsResponse.next_page_token of the previous JobService.ListCustomJobs call.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 449

def list_custom_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListCustomJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_custom_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_custom_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_custom_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.list_custom_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_custom_jobs, "custom_jobs", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

Lists DataLabelingJobs in a Location.

Examples:

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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::DataLabelingJob.
  p item
end

Overloads:

  • #list_data_labeling_jobs(request, options = nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_data_labeling_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Required. The parent of the DataLabelingJob. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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) (defaults to: nil)

      A comma-separated list of fields to order by, sorted in ascending order by default. Use desc after a field name for descending.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 913

def list_data_labeling_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListDataLabelingJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_data_labeling_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_data_labeling_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_data_labeling_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.list_data_labeling_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_data_labeling_jobs, "data_labeling_jobs", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

Lists HyperparameterTuningJobs in a Location.

Examples:

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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::HyperparameterTuningJob.
  p item
end

Overloads:

  • #list_hyperparameter_tuning_jobs(request, options = nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_hyperparameter_tuning_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Required. The resource name of the Location to list the HyperparameterTuningJobs from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListHyperparameterTuningJobsResponse.next_page_token of the previous JobService.ListHyperparameterTuningJobs call.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1365

def list_hyperparameter_tuning_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListHyperparameterTuningJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_hyperparameter_tuning_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_hyperparameter_tuning_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_hyperparameter_tuning_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.list_hyperparameter_tuning_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_hyperparameter_tuning_jobs, "hyperparameter_tuning_jobs", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

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

Lists ModelDeploymentMonitoringJobs in a Location.

Examples:

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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelDeploymentMonitoringJob.
  p item
end

Overloads:

  • #list_model_deployment_monitoring_jobs(request, options = nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_model_deployment_monitoring_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::Rest::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) (defaults to: nil)

      Required. The parent of the ModelDeploymentMonitoringJob. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 3034

def list_model_deployment_monitoring_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelDeploymentMonitoringJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_model_deployment_monitoring_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_model_deployment_monitoring_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_model_deployment_monitoring_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.list_model_deployment_monitoring_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_model_deployment_monitoring_jobs, "model_deployment_monitoring_jobs", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_nas_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasJob> #list_nas_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasJob>

Lists NasJobs in a Location.

Examples:

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::Rest::Client.new

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::NasJob.
  p item
end

Overloads:

  • #list_nas_jobs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasJob>

    Pass arguments to list_nas_jobs via a request object, either of type ListNasJobsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListNasJobsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_nas_jobs(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasJob>

    Pass arguments to list_nas_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) (defaults to: nil)

      Required. The resource name of the Location to list the NasJobs from. Format: projects/{project}/locations/{location}

    • filter (::String) (defaults to: nil)

      The standard list filter.

      Supported fields:

      • display_name supports =, != comparisons, and : wildcard.
      • state supports =, != comparisons.
      • create_time supports =, !=,<, <=,>, >= comparisons. create_time must be in RFC 3339 format.
      • labels supports general map functions that is: labels.key=value - key:value equality `labels.key:* - key existence

      Some examples of using the filter are:

      • state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"
      • state!="JOB_STATE_FAILED" OR display_name="my_job"
      • NOT display_name="my_job"
      • create_time>"2021-05-18T00:00:00Z"
      • labels.keyA=valueA
      • labels.keyB:*
    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListNasJobsResponse.next_page_token of the previous JobService.ListNasJobs call.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Mask specifying which fields to read.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 1828

def list_nas_jobs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListNasJobsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_nas_jobs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_nas_jobs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_nas_jobs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.list_nas_jobs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_nas_jobs, "nas_jobs", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_nas_trial_details(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasTrialDetail> #list_nas_trial_details(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasTrialDetail>

List top NasTrialDetails of a NasJob.

Examples:

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::Rest::Client.new

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

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::NasTrialDetail.
  p item
end

Overloads:

  • #list_nas_trial_details(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasTrialDetail>

    Pass arguments to list_nas_trial_details via a request object, either of type ListNasTrialDetailsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::AIPlatform::V1::ListNasTrialDetailsRequest, ::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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_nas_trial_details(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::NasTrialDetail>

    Pass arguments to list_nas_trial_details 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) (defaults to: nil)

      Required. The name of the NasJob resource. Format: projects/{project}/locations/{location}/nasJobs/{nas_job}

    • page_size (::Integer) (defaults to: nil)

      The standard list page size.

    • page_token (::String) (defaults to: nil)

      The standard list page token. Typically obtained via ListNasTrialDetailsResponse.next_page_token of the previous JobService.ListNasTrialDetails call.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2186

def list_nas_trial_details request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListNasTrialDetailsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_nas_trial_details..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_nas_trial_details.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_nas_trial_details.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.list_nas_trial_details request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_nas_trial_details, "nas_trial_details", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#pause_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #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'.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the ModelDeploymentMonitoringJob to pause. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 3323

def pause_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::PauseModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.pause_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.pause_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.pause_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.pause_model_deployment_monitoring_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#resume_model_deployment_monitoring_job(request, options = nil) ⇒ ::Google::Protobuf::Empty #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.

Examples:

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::Rest::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

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the ModelDeploymentMonitoringJob to resume. Format: projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 3406

def resume_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ResumeModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.resume_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.resume_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.resume_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.resume_model_deployment_monitoring_job request, options do |result, operation|
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#search_model_deployment_monitoring_stats_anomalies(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies> #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::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies>

Searches Model Monitoring Statistics generated within a given time window.

Examples:

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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelMonitoringStatsAnomalies.
  p item
end

Overloads:

  • #search_model_deployment_monitoring_stats_anomalies(request, options = nil) ⇒ ::Gapic::Rest::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:

  • #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::Rest::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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 2841

def search_model_deployment_monitoring_stats_anomalies request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::SearchModelDeploymentMonitoringStatsAnomaliesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.search_model_deployment_monitoring_stats_anomalies..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.search_model_deployment_monitoring_stats_anomalies.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.search_model_deployment_monitoring_stats_anomalies.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.search_model_deployment_monitoring_stats_anomalies request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :search_model_deployment_monitoring_stats_anomalies, "monitoring_stats", request, result, options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


108
109
110
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 108

def universe_domain
  @job_service_stub.universe_domain
end

#update_model_deployment_monitoring_job(request, options = nil) ⇒ ::Gapic::Operation #update_model_deployment_monitoring_job(model_deployment_monitoring_job: nil, update_mask: nil) ⇒ ::Gapic::Operation

Updates a ModelDeploymentMonitoringJob.

Examples:

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::Rest::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 it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #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) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #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) (defaults to: nil)

      Required. The model monitoring configuration which replaces the resource on the server.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      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:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
# File 'lib/google/cloud/ai_platform/v1/job_service/rest/client.rb', line 3149

def update_model_deployment_monitoring_job request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateModelDeploymentMonitoringJobRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_model_deployment_monitoring_job..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_model_deployment_monitoring_job.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_model_deployment_monitoring_job.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @job_service_stub.update_model_deployment_monitoring_job request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    return result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end