Dataproc Metastore V1beta API - Class Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client (v0.7.0)

Reference documentation and code samples for the Dataproc Metastore V1beta API class Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client.

REST client for the DataprocMetastore service.

Configures and manages metastore services. Metastore services are fully managed, highly available, autoscaled, autohealing, OSS-native deployments of technical metadata management software. Each metastore service exposes a network endpoint through which metadata queries are served. Metadata queries can originate from a variety of sources, including Apache Hive, Apache Presto, and Apache Spark.

The Dataproc Metastore API defines the following resource model:

  • The service works with a collection of Google Cloud projects, named: /projects/
  • Each project has a collection of available locations, named: /locations/ (a location must refer to a Google Cloud region)
  • Each location has a collection of services, named: /services/*
  • Dataproc Metastore services are resources with names of the form:

/projects/{project_number}/locations/{location_id}/services/{service_id}.

Inherits

  • Object

Methods

.configure

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

Configure the DataprocMetastore 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 DataprocMetastore clients
::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client.configure do |config|
  config.timeout = 10.0
end

#alter_metadata_resource_location

def alter_metadata_resource_location(request, options = nil) -> ::Gapic::Operation
def alter_metadata_resource_location(service: nil, resource_name: nil, location_uri: nil) -> ::Gapic::Operation

Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.

Overloads
def alter_metadata_resource_location(request, options = nil) -> ::Gapic::Operation
Pass arguments to alter_metadata_resource_location via a request object, either of type AlterMetadataResourceLocationRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::AlterMetadataResourceLocationRequest, ::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 alter_metadata_resource_location(service: nil, resource_name: nil, location_uri: nil) -> ::Gapic::Operation
Pass arguments to alter_metadata_resource_location 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
  • service (::String) — Required. The relative resource name of the metastore service to mutate metadata, in the following format:

    projects/{project_id}/locations/{location_id}/services/{service_id}.

  • resource_name (::String) — Required. The relative metadata resource name in the following format.

    databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}

  • location_uri (::String) — Required. The new location URI for the metadata resource.
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.

#configure

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

Configure the DataprocMetastore 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_backup

def create_backup(request, options = nil) -> ::Gapic::Operation
def create_backup(parent: nil, backup_id: nil, backup: nil, request_id: nil) -> ::Gapic::Operation

Creates a new backup in a given project and location.

Overloads
def create_backup(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_backup via a request object, either of type CreateBackupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::CreateBackupRequest, ::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_backup(parent: nil, backup_id: nil, backup: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_backup 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 relative resource name of the service in which to create a backup of the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}.

  • backup_id (::String) — Required. The ID of the backup, which is used as the final component of the backup's name.

    This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.

  • backup (::Google::Cloud::Metastore::V1beta::Backup, ::Hash) — Required. The backup to create. The name field is ignored. The ID of the created backup must be provided in the request's backup_id field.
  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

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.

#create_metadata_import

def create_metadata_import(request, options = nil) -> ::Gapic::Operation
def create_metadata_import(parent: nil, metadata_import_id: nil, metadata_import: nil, request_id: nil) -> ::Gapic::Operation

Creates a new MetadataImport in a given project and location.

Overloads
def create_metadata_import(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_metadata_import via a request object, either of type CreateMetadataImportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::CreateMetadataImportRequest, ::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_metadata_import(parent: nil, metadata_import_id: nil, metadata_import: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_metadata_import 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 relative resource name of the service in which to create a metastore import, in the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}.

  • metadata_import_id (::String) — Required. The ID of the metadata import, which is used as the final component of the metadata import's name.

    This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.

  • metadata_import (::Google::Cloud::Metastore::V1beta::MetadataImport, ::Hash) — Required. The metadata import to create. The name field is ignored. The ID of the created metadata import must be provided in the request's metadata_import_id field.
  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

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.

#create_service

def create_service(request, options = nil) -> ::Gapic::Operation
def create_service(parent: nil, service_id: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Creates a metastore service in a project and location.

Overloads
def create_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_service via a request object, either of type CreateServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::CreateServiceRequest, ::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_service(parent: nil, service_id: nil, service: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to create_service 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 relative resource name of the location in which to create a metastore service, in the following form:

    projects/{project_number}/locations/{location_id}.

  • service_id (::String) — Required. The ID of the metastore service, which is used as the final component of the metastore service's name.

    This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.

  • service (::Google::Cloud::Metastore::V1beta::Service, ::Hash) — Required. The Metastore service to create. The name field is ignored. The ID of the created metastore service must be provided in the request's service_id field.
  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

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.

#delete_backup

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

Deletes a single backup.

Overloads
def delete_backup(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_backup via a request object, either of type Google::Cloud::Metastore::V1beta::DeleteBackupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::DeleteBackupRequest, ::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_backup(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_backup 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 relative resource name of the backup to delete, in the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.

  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

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.

#delete_service

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

Deletes a single service.

Overloads
def delete_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_service via a request object, either of type Google::Cloud::Metastore::V1beta::DeleteServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::DeleteServiceRequest, ::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_service(name: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to delete_service 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 relative resource name of the metastore service to delete, in the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}.

  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

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.

#export_metadata

def export_metadata(request, options = nil) -> ::Gapic::Operation
def export_metadata(destination_gcs_folder: nil, service: nil, request_id: nil, database_dump_type: nil) -> ::Gapic::Operation

Exports metadata from a service.

Overloads
def export_metadata(request, options = nil) -> ::Gapic::Operation
Pass arguments to export_metadata via a request object, either of type ExportMetadataRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::ExportMetadataRequest, ::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_metadata(destination_gcs_folder: nil, service: nil, request_id: nil, database_dump_type: nil) -> ::Gapic::Operation
Pass arguments to export_metadata 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
  • destination_gcs_folder (::String) — A Cloud Storage URI of a folder, in the format gs://<bucket_name>/<path_inside_bucket>. A sub-folder <export_folder> containing exported files will be created below it.
  • service (::String) — Required. The relative resource name of the metastore service to run export, in the following form:

    projects/{project_id}/locations/{location_id}/services/{service_id}.

  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID. A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

  • database_dump_type (::Google::Cloud::Metastore::V1beta::DatabaseDumpSpec::Type) — Optional. The type of the database dump. If unspecified, defaults to MYSQL.
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.

#get_backup

def get_backup(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::Backup
def get_backup(name: nil) -> ::Google::Cloud::Metastore::V1beta::Backup

Gets details of a single backup.

Overloads
def get_backup(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::Backup
Pass arguments to get_backup via a request object, either of type GetBackupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::GetBackupRequest, ::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_backup(name: nil) -> ::Google::Cloud::Metastore::V1beta::Backup
Pass arguments to get_backup 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 relative resource name of the backup to retrieve, in the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.

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

#get_metadata_import

def get_metadata_import(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::MetadataImport
def get_metadata_import(name: nil) -> ::Google::Cloud::Metastore::V1beta::MetadataImport

Gets details of a single import.

Overloads
def get_metadata_import(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::MetadataImport
Pass arguments to get_metadata_import via a request object, either of type GetMetadataImportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::GetMetadataImportRequest, ::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_metadata_import(name: nil) -> ::Google::Cloud::Metastore::V1beta::MetadataImport
Pass arguments to get_metadata_import 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 relative resource name of the metadata import to retrieve, in the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}.

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

#get_service

def get_service(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::Service
def get_service(name: nil) -> ::Google::Cloud::Metastore::V1beta::Service

Gets the details of a single service.

Overloads
def get_service(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::Service
Pass arguments to get_service via a request object, either of type GetServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::GetServiceRequest, ::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_service(name: nil) -> ::Google::Cloud::Metastore::V1beta::Service
Pass arguments to get_service 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 relative resource name of the metastore service to retrieve, in the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}.

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

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

#initialize

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

Create a new DataprocMetastore REST client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Client.new do |config|
  config.timeout = 10.0
end

#list_backups

def list_backups(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::ListBackupsResponse
def list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Metastore::V1beta::ListBackupsResponse

Lists backups in a service.

Overloads
def list_backups(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::ListBackupsResponse
Pass arguments to list_backups via a request object, either of type ListBackupsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::ListBackupsRequest, ::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_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Metastore::V1beta::ListBackupsResponse
Pass arguments to list_backups 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 relative resource name of the service whose backups to list, in the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}/backups.

  • page_size (::Integer) — Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.
  • page_token (::String) — Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.

    To retrieve the first page, supply an empty page token.

    When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.

  • filter (::String) — Optional. The filter to apply to list results.
  • order_by (::String) — Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_metadata_imports

def list_metadata_imports(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::ListMetadataImportsResponse
def list_metadata_imports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Metastore::V1beta::ListMetadataImportsResponse

Lists imports in a service.

Overloads
def list_metadata_imports(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::ListMetadataImportsResponse
Pass arguments to list_metadata_imports via a request object, either of type ListMetadataImportsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::ListMetadataImportsRequest, ::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_metadata_imports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Metastore::V1beta::ListMetadataImportsResponse
Pass arguments to list_metadata_imports 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 relative resource name of the service whose metadata imports to list, in the following form:

    projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports.

  • page_size (::Integer) — Optional. The maximum number of imports to return. The response may contain less than the maximum number. If unspecified, no more than 500 imports are returned. The maximum value is 1000; values above 1000 are changed to 1000.
  • page_token (::String) — Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.

    To retrieve the first page, supply an empty page token.

    When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.

  • filter (::String) — Optional. The filter to apply to list results.
  • order_by (::String) — Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_services

def list_services(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::ListServicesResponse
def list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Metastore::V1beta::ListServicesResponse

Lists services in a project and location.

Overloads
def list_services(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::ListServicesResponse
Pass arguments to list_services via a request object, either of type ListServicesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::ListServicesRequest, ::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_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::Metastore::V1beta::ListServicesResponse
Pass arguments to list_services 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 relative resource name of the location of metastore services to list, in the following form:

    projects/{project_number}/locations/{location_id}.

  • page_size (::Integer) — Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.
  • page_token (::String) — Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.

    To retrieve the first page, supply an empty page token.

    When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.

  • filter (::String) — Optional. The filter to apply to list results.
  • order_by (::String) — Optional. Specify the ordering of results as described in Sorting Order. If not specified, the results will be sorted in the default order.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

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

#move_table_to_database

def move_table_to_database(request, options = nil) -> ::Gapic::Operation
def move_table_to_database(service: nil, table_name: nil, db_name: nil, destination_db_name: nil) -> ::Gapic::Operation

Move a table to another database.

Overloads
def move_table_to_database(request, options = nil) -> ::Gapic::Operation
Pass arguments to move_table_to_database via a request object, either of type MoveTableToDatabaseRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::MoveTableToDatabaseRequest, ::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 move_table_to_database(service: nil, table_name: nil, db_name: nil, destination_db_name: nil) -> ::Gapic::Operation
Pass arguments to move_table_to_database 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
  • service (::String) — Required. The relative resource name of the metastore service to mutate metadata, in the following format:

    projects/{project_id}/locations/{location_id}/services/{service_id}.

  • table_name (::String) — Required. The name of the table to be moved.
  • db_name (::String) — Required. The name of the database where the table resides.
  • destination_db_name (::String) — Required. The name of the database where the table should be moved.
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.

#operations_client

def operations_client() -> ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Rest::Operations

Get the associated client for long-running operations.

#query_metadata

def query_metadata(request, options = nil) -> ::Gapic::Operation
def query_metadata(service: nil, query: nil) -> ::Gapic::Operation

Query DPMS metadata.

Overloads
def query_metadata(request, options = nil) -> ::Gapic::Operation
Pass arguments to query_metadata via a request object, either of type QueryMetadataRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::QueryMetadataRequest, ::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 query_metadata(service: nil, query: nil) -> ::Gapic::Operation
Pass arguments to query_metadata 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
  • service (::String) — Required. The relative resource name of the metastore service to query metadata, in the following format:

    projects/{project_id}/locations/{location_id}/services/{service_id}.

  • query (::String) — Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.
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.

#remove_iam_policy

def remove_iam_policy(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse
def remove_iam_policy(resource: nil, asynchronous: nil) -> ::Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse

Removes the attached IAM policies for a resource

Overloads
def remove_iam_policy(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse
Pass arguments to remove_iam_policy via a request object, either of type RemoveIamPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::RemoveIamPolicyRequest, ::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 remove_iam_policy(resource: nil, asynchronous: nil) -> ::Google::Cloud::Metastore::V1beta::RemoveIamPolicyResponse
Pass arguments to remove_iam_policy 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
  • resource (::String) — Required. The relative resource name of the dataplane resource to remove IAM policy, in the following form:

    projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id} or projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}.

  • asynchronous (::Boolean) — Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#restore_service

def restore_service(request, options = nil) -> ::Gapic::Operation
def restore_service(service: nil, backup: nil, restore_type: nil, request_id: nil) -> ::Gapic::Operation

Restores a service from a backup.

Overloads
def restore_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to restore_service via a request object, either of type RestoreServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::RestoreServiceRequest, ::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_service(service: nil, backup: nil, restore_type: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to restore_service 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
  • service (::String) — Required. The relative resource name of the metastore service to run restore, in the following form:

    projects/{project_id}/locations/{location_id}/services/{service_id}.

  • backup (::String) — Required. The relative resource name of the metastore service backup to restore from, in the following form:

    projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}.

  • restore_type (::Google::Cloud::Metastore::V1beta::Restore::RestoreType) — Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.
  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID. A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

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.

#update_metadata_import

def update_metadata_import(request, options = nil) -> ::Gapic::Operation
def update_metadata_import(update_mask: nil, metadata_import: nil, request_id: nil) -> ::Gapic::Operation

Updates a single import. Only the description field of MetadataImport is supported to be updated.

Overloads
def update_metadata_import(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_metadata_import via a request object, either of type UpdateMetadataImportRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::UpdateMetadataImportRequest, ::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_metadata_import(update_mask: nil, metadata_import: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_metadata_import 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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. A field mask used to specify the fields to be overwritten in the metadata import resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.
  • metadata_import (::Google::Cloud::Metastore::V1beta::MetadataImport, ::Hash) — Required. The metadata import to update. The server only merges fields in the import if they are specified in update_mask.

    The metadata import's name field is used to identify the metastore import to be updated.

  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

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.

#update_service

def update_service(request, options = nil) -> ::Gapic::Operation
def update_service(update_mask: nil, service: nil, request_id: nil) -> ::Gapic::Operation

Updates the parameters of a single service.

Overloads
def update_service(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_service via a request object, either of type UpdateServiceRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Metastore::V1beta::UpdateServiceRequest, ::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_service(update_mask: nil, service: nil, request_id: nil) -> ::Gapic::Operation
Pass arguments to update_service 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
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.
  • service (::Google::Cloud::Metastore::V1beta::Service, ::Hash) — Required. The metastore service to update. The server only merges fields in the service if they are specified in update_mask.

    The metastore service's name field is used to identify the metastore service to be updated.

  • request_id (::String) — Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.

    For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.

    The request ID must be a valid UUID A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.

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.