Vertex AI V1 API - Class Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client (v0.44.0)

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

REST client for the DatasetService service.

The service that manages Vertex AI Dataset and its child resources.

Inherits

  • Object

Methods

.configure

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

Configure the DatasetService Client class.

See Configuration for a description of the configuration fields.

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

#configure

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

Configure the DatasetService Client instance.

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

See Configuration for a description of the configuration fields.

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

#create_dataset

def create_dataset(request, options = nil) -> ::Gapic::Operation
def create_dataset(parent: nil, dataset: nil) -> ::Gapic::Operation

Creates a Dataset.

Overloads
def create_dataset(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_dataset via a request object, either of type CreateDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_dataset(parent: nil, dataset: nil) -> ::Gapic::Operation
Pass arguments to create_dataset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Location to create the Dataset in. Format: projects/{project}/locations/{location}
  • dataset (::Google::Cloud::AIPlatform::V1::Dataset, ::Hash) — Required. The Dataset to create.
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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

#create_dataset_version

def create_dataset_version(request, options = nil) -> ::Gapic::Operation
def create_dataset_version(parent: nil, dataset_version: nil) -> ::Gapic::Operation

Create a version from a Dataset.

Overloads
def create_dataset_version(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_dataset_version via a request object, either of type CreateDatasetVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::CreateDatasetVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def create_dataset_version(parent: nil, dataset_version: nil) -> ::Gapic::Operation
Pass arguments to create_dataset_version via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The name of the Dataset resource. Format: projects/{project}/locations/{location}/datasets/{dataset}
  • dataset_version (::Google::Cloud::AIPlatform::V1::DatasetVersion, ::Hash) — Required. The version to be created. The same CMEK policies with the original Dataset will be applied the dataset version. So here we don't need to specify the EncryptionSpecType here.
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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

#delete_dataset

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

Deletes a Dataset.

Overloads
def delete_dataset(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_dataset via a request object, either of type Google::Cloud::AIPlatform::V1::DeleteDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_dataset(name: nil) -> ::Gapic::Operation
Pass arguments to delete_dataset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the Dataset to delete. Format: projects/{project}/locations/{location}/datasets/{dataset}
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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

#delete_dataset_version

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

Deletes a Dataset version.

Overloads
def delete_dataset_version(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_dataset_version via a request object, either of type Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteDatasetVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_dataset_version(name: nil) -> ::Gapic::Operation
Pass arguments to delete_dataset_version via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the Dataset version to delete. Format: projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}
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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

#delete_saved_query

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

Deletes a SavedQuery.

Overloads
def delete_saved_query(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_saved_query via a request object, either of type Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::DeleteSavedQueryRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete_saved_query(name: nil) -> ::Gapic::Operation
Pass arguments to delete_saved_query via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the SavedQuery to delete. Format: projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}
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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

#export_data

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

Exports data from a Dataset.

Overloads
def export_data(request, options = nil) -> ::Gapic::Operation
Pass arguments to export_data via a request object, either of type ExportDataRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ExportDataRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def export_data(name: nil, export_config: nil) -> ::Gapic::Operation
Pass arguments to export_data 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) — Required. The name of the Dataset resource. Format: projects/{project}/locations/{location}/datasets/{dataset}
  • export_config (::Google::Cloud::AIPlatform::V1::ExportDataConfig, ::Hash) — Required. The desired output location.
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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

#get_annotation_spec

def get_annotation_spec(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AnnotationSpec
def get_annotation_spec(name: nil, read_mask: nil) -> ::Google::Cloud::AIPlatform::V1::AnnotationSpec

Gets an AnnotationSpec.

Overloads
def get_annotation_spec(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::AnnotationSpec
Pass arguments to get_annotation_spec via a request object, either of type GetAnnotationSpecRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetAnnotationSpecRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_annotation_spec(name: nil, read_mask: nil) -> ::Google::Cloud::AIPlatform::V1::AnnotationSpec
Pass arguments to get_annotation_spec 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) — Required. The name of the AnnotationSpec resource. Format: projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

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

#get_dataset

def get_dataset(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Dataset
def get_dataset(name: nil, read_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Dataset

Gets a Dataset.

Overloads
def get_dataset(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Dataset
Pass arguments to get_dataset via a request object, either of type GetDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_dataset(name: nil, read_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Dataset
Pass arguments to get_dataset 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) — Required. The name of the Dataset resource.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

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

#get_dataset_version

def get_dataset_version(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::DatasetVersion
def get_dataset_version(name: nil, read_mask: nil) -> ::Google::Cloud::AIPlatform::V1::DatasetVersion

Gets a Dataset version.

Overloads
def get_dataset_version(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::DatasetVersion
Pass arguments to get_dataset_version via a request object, either of type GetDatasetVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::GetDatasetVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get_dataset_version(name: nil, read_mask: nil) -> ::Google::Cloud::AIPlatform::V1::DatasetVersion
Pass arguments to get_dataset_version 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) — Required. The resource name of the Dataset version to delete. Format: projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

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

#iam_policy_client

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

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

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

#import_data

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

Imports data into a Dataset.

Overloads
def import_data(request, options = nil) -> ::Gapic::Operation
Pass arguments to import_data via a request object, either of type ImportDataRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ImportDataRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def import_data(name: nil, import_configs: nil) -> ::Gapic::Operation
Pass arguments to import_data 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) — Required. The name of the Dataset resource. Format: projects/{project}/locations/{location}/datasets/{dataset}
  • import_configs (::Array<::Google::Cloud::AIPlatform::V1::ImportDataConfig, ::Hash>) — Required. The desired input locations. The contents of all input locations will be imported in one batch.
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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

#initialize

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

Create a new DatasetService REST client object.

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

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

#list_annotations

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

Lists Annotations belongs to a dataitem

Overloads
def list_annotations(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation>
Pass arguments to list_annotations via a request object, either of type ListAnnotationsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListAnnotationsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_annotations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Annotation>
Pass arguments to list_annotations via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the DataItem to list Annotations from. Format: projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}
  • filter (::String) — The standard list filter.
  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
  • order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order. 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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

# Call the list_annotations method.
result = client.list_annotations 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::Annotation.
  p item
end

#list_data_items

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

Lists DataItems in a Dataset.

Overloads
def list_data_items(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem>
Pass arguments to list_data_items via a request object, either of type ListDataItemsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListDataItemsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_data_items(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItem>
Pass arguments to list_data_items via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Dataset to list DataItems from. Format: projects/{project}/locations/{location}/datasets/{dataset}
  • filter (::String) — The standard list filter.
  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
  • order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order. 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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

# Call the list_data_items method.
result = client.list_data_items 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::DataItem.
  p item
end

#list_dataset_versions

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

Lists DatasetVersions in a Dataset.

Overloads
def list_dataset_versions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion>
Pass arguments to list_dataset_versions via a request object, either of type ListDatasetVersionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListDatasetVersionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_dataset_versions(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DatasetVersion>
Pass arguments to list_dataset_versions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Dataset to list DatasetVersions from. Format: projects/{project}/locations/{location}/datasets/{dataset}
  • filter (::String) — Optional. The standard list filter.
  • page_size (::Integer) — Optional. The standard list page size.
  • page_token (::String) — Optional. The standard list page token.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Mask specifying which fields to read.
  • order_by (::String) — Optional. A comma-separated list of fields to order by, sorted in ascending order. 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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

# Call the list_dataset_versions method.
result = client.list_dataset_versions 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::DatasetVersion.
  p item
end

#list_datasets

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

Lists Datasets in a Location.

Overloads
def list_datasets(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset>
Pass arguments to list_datasets via a request object, either of type ListDatasetsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListDatasetsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_datasets(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Dataset>
Pass arguments to list_datasets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The name of the Dataset's parent resource. Format: projects/{project}/locations/{location}
  • filter (::String) —

    An expression for filtering the results of the request. For field names both snake_case and camelCase are supported.

    • display_name: supports = and !=
    • metadata_schema_uri: supports = and !=
    • labels supports general map functions that is:
      • labels.key=value - key:value equality
      • `labels.key:* or labels:key - key existence
      • A key including a space must be quoted. labels."a key".

    Some examples:

    • displayName="myDisplayName"
    • labels.myKey="myValue"
  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
  • order_by (::String) —

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

    • display_name
    • create_time
    • update_time
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

# Call the list_datasets method.
result = client.list_datasets 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::Dataset.
  p item
end

#list_saved_queries

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

Lists SavedQueries in a Dataset.

Overloads
def list_saved_queries(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery>
Pass arguments to list_saved_queries via a request object, either of type ListSavedQueriesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::ListSavedQueriesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list_saved_queries(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::SavedQuery>
Pass arguments to list_saved_queries via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the Dataset to list SavedQueries from. Format: projects/{project}/locations/{location}/datasets/{dataset}
  • filter (::String) — The standard list filter.
  • page_size (::Integer) — The standard list page size.
  • page_token (::String) — The standard list page token.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields to read.
  • order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order. 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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

# Call the list_saved_queries method.
result = client.list_saved_queries 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::SavedQuery.
  p item
end

#location_client

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

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

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

#operations_client

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

Get the associated client for long-running operations.

#restore_dataset_version

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

Restores a dataset version.

Overloads
def restore_dataset_version(request, options = nil) -> ::Gapic::Operation
Pass arguments to restore_dataset_version via a request object, either of type RestoreDatasetVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::RestoreDatasetVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def restore_dataset_version(name: nil) -> ::Gapic::Operation
Pass arguments to restore_dataset_version via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The name of the DatasetVersion resource. Format: projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}
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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

#search_data_items

def search_data_items(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>
def search_data_items(order_by_data_item: nil, order_by_annotation: nil, dataset: nil, saved_query: nil, data_labeling_job: nil, data_item_filter: nil, annotations_filter: nil, annotation_filters: nil, field_mask: nil, annotations_limit: nil, page_size: nil, order_by: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>

Searches DataItems in a Dataset.

Overloads
def search_data_items(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>
Pass arguments to search_data_items via a request object, either of type SearchDataItemsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def search_data_items(order_by_data_item: nil, order_by_annotation: nil, dataset: nil, saved_query: nil, data_labeling_job: nil, data_item_filter: nil, annotations_filter: nil, annotation_filters: nil, field_mask: nil, annotations_limit: nil, page_size: nil, order_by: nil, page_token: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::DataItemView>
Pass arguments to search_data_items 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
  • order_by_data_item (::String) — A comma-separated list of data item fields to order by, sorted in ascending order. Use "desc" after a field name for descending.
  • order_by_annotation (::Google::Cloud::AIPlatform::V1::SearchDataItemsRequest::OrderByAnnotation, ::Hash) — Expression that allows ranking results based on annotation's property.
  • dataset (::String) — Required. The resource name of the Dataset from which to search DataItems. Format: projects/{project}/locations/{location}/datasets/{dataset}
  • saved_query (::String) — The resource name of a SavedQuery(annotation set in UI). Format: projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query} All of the search will be done in the context of this SavedQuery.
  • data_labeling_job (::String) — The resource name of a DataLabelingJob. Format: projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} If this field is set, all of the search will be done in the context of this DataLabelingJob.
  • data_item_filter (::String) —

    An expression for filtering the DataItem that will be returned.

    • data_item_id - for = or !=.
    • labeled - for = or !=.
    • has_annotation(ANNOTATION_SPEC_ID) - true only for DataItem that have at least one annotation with annotation_spec_id = ANNOTATION_SPEC_ID in the context of SavedQuery or DataLabelingJob.

    For example:

    • data_item=1
    • has_annotation(5)
  • annotations_filter (::String) —

    An expression for filtering the Annotations that will be returned per DataItem.

    • annotation_spec_id - for = or !=.
  • annotation_filters (::Array<::String>) —

    An expression that specifies what Annotations will be returned per DataItem. Annotations satisfied either of the conditions will be returned.

    • annotation_spec_id - for = or !=. Must specify saved_query_id= - saved query id that annotations should belong to.
  • field_mask (::Google::Protobuf::FieldMask, ::Hash) — Mask specifying which fields of DataItemView to read.
  • annotations_limit (::Integer) — If set, only up to this many of Annotations will be returned per DataItemView. The maximum value is 1000. If not set, the maximum value will be used.
  • page_size (::Integer) — Requested page size. Server may return fewer results than requested. Default and maximum page size is 100.
  • order_by (::String) — A comma-separated list of fields to order by, sorted in ascending order. Use "desc" after a field name for descending.
  • page_token (::String) — A token identifying a page of results for the server to return Typically obtained via SearchDataItemsResponse.next_page_token of the previous DatasetService.SearchDataItems 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.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

# Call the search_data_items method.
result = client.search_data_items 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::DataItemView.
  p item
end

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_dataset

def update_dataset(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Dataset
def update_dataset(dataset: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Dataset

Updates a Dataset.

Overloads
def update_dataset(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::Dataset
Pass arguments to update_dataset via a request object, either of type UpdateDatasetRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::UpdateDatasetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_dataset(dataset: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::Dataset
Pass arguments to update_dataset 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
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

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

#update_dataset_version

def update_dataset_version(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::DatasetVersion
def update_dataset_version(dataset_version: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::DatasetVersion

Updates a DatasetVersion.

Overloads
def update_dataset_version(request, options = nil) -> ::Google::Cloud::AIPlatform::V1::DatasetVersion
Pass arguments to update_dataset_version via a request object, either of type UpdateDatasetVersionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def update_dataset_version(dataset_version: nil, update_mask: nil) -> ::Google::Cloud::AIPlatform::V1::DatasetVersion
Pass arguments to update_dataset_version 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
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.
Example

Basic example

require "google/cloud/ai_platform/v1"

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

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

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

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