Reference documentation and code samples for the Dataproc Metastore V1beta API class Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.
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 Cloudregion
) - 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.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all DataprocMetastore clients ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.configure do |config| config.timeout = 10.0 end
#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.
- (config) — Configure the Client client.
- config (Client::Configuration)
#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.
def create_backup(request, options = nil) -> ::Gapic::Operation
create_backup
via a request object, either of type
CreateBackupRequest or an equivalent Hash.
- 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
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).
-
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'sbackup_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::CreateBackupRequest.new # Call the create_backup method. result = client.create_backup request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#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.
def create_metadata_import(request, options = nil) -> ::Gapic::Operation
create_metadata_import
via a request object, either of type
CreateMetadataImportRequest or an equivalent Hash.
- 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
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).
-
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'smetadata_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::CreateMetadataImportRequest.new # Call the create_metadata_import method. result = client.create_metadata_import request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#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.
def create_service(request, options = nil) -> ::Gapic::Operation
create_service
via a request object, either of type
CreateServiceRequest or an equivalent Hash.
- 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
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).
-
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'sservice_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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::CreateServiceRequest.new # Call the create_service method. result = client.create_service request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_backup
def delete_backup(request, options = nil) -> ::Gapic::Operation
def delete_backup(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single backup.
def delete_backup(request, options = nil) -> ::Gapic::Operation
delete_backup
via a request object, either of type
Google::Cloud::Metastore::V1beta::DeleteBackupRequest or an equivalent Hash.
- 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
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::DeleteBackupRequest.new # Call the delete_backup method. result = client.delete_backup request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#delete_service
def delete_service(request, options = nil) -> ::Gapic::Operation
def delete_service(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single service.
def delete_service(request, options = nil) -> ::Gapic::Operation
delete_service
via a request object, either of type
Google::Cloud::Metastore::V1beta::DeleteServiceRequest or an equivalent Hash.
- 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
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::DeleteServiceRequest.new # Call the delete_service method. result = client.delete_service request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#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.
def export_metadata(request, options = nil) -> ::Gapic::Operation
export_metadata
via a request object, either of type
ExportMetadataRequest or an equivalent Hash.
- 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
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).
-
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
.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::ExportMetadataRequest.new # Call the export_metadata method. result = client.export_metadata request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#get_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.
def get_backup(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::Backup
get_backup
via a request object, either of type
GetBackupRequest or an equivalent Hash.
- 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
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).
-
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}
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Metastore::V1beta::Backup)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::GetBackupRequest.new # Call the get_backup method. result = client.get_backup request # The returned object is of type Google::Cloud::Metastore::V1beta::Backup. p result
#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.
def get_metadata_import(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::MetadataImport
get_metadata_import
via a request object, either of type
GetMetadataImportRequest or an equivalent Hash.
- 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
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).
-
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}
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Metastore::V1beta::MetadataImport)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::GetMetadataImportRequest.new # Call the get_metadata_import method. result = client.get_metadata_import request # The returned object is of type Google::Cloud::Metastore::V1beta::MetadataImport. p result
#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.
def get_service(request, options = nil) -> ::Google::Cloud::Metastore::V1beta::Service
get_service
via a request object, either of type
GetServiceRequest or an equivalent Hash.
- 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
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).
-
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}
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Metastore::V1beta::Service)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::GetServiceRequest.new # Call the get_service method. result = client.get_service request # The returned object is of type Google::Cloud::Metastore::V1beta::Service. p result
#initialize
def initialize() { |config| ... } -> Client
Create a new DataprocMetastore client object.
- (config) — Configure the DataprocMetastore client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new do |config| config.timeout = 10.0 end
#list_backups
def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Backup>
def list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Backup>
Lists backups in a service.
def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Backup>
list_backups
via a request object, either of type
ListBackupsRequest or an equivalent Hash.
- 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) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Backup>
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Backup>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Backup>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::ListBackupsRequest.new # Call the list_backups method. result = client.list_backups request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Metastore::V1beta::Backup. p response end
#list_metadata_imports
def list_metadata_imports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::MetadataImport>
def list_metadata_imports(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::MetadataImport>
Lists imports in a service.
def list_metadata_imports(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::MetadataImport>
list_metadata_imports
via a request object, either of type
ListMetadataImportsRequest or an equivalent Hash.
- 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) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::MetadataImport>
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::MetadataImport>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::MetadataImport>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::ListMetadataImportsRequest.new # Call the list_metadata_imports method. result = client.list_metadata_imports request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Metastore::V1beta::MetadataImport. p response end
#list_services
def list_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Service>
def list_services(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Service>
Lists services in a project and location.
def list_services(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Service>
list_services
via a request object, either of type
ListServicesRequest or an equivalent Hash.
- 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) -> ::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Service>
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Service>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Metastore::V1beta::Service>)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::ListServicesRequest.new # Call the list_services method. result = client.list_services request # The returned object is of type Gapic::PagedEnumerable. You can # iterate over all elements by calling #each, and the enumerable # will lazily make API calls to fetch subsequent pages. Other # methods are also available for managing paging directly. result.each do |response| # Each element is of type ::Google::Cloud::Metastore::V1beta::Service. p response end
#operations_client
def operations_client() -> ::Google::Cloud::Metastore::V1beta::DataprocMetastore::Operations
Get the associated client for long-running operations.
#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.
def restore_service(request, options = nil) -> ::Gapic::Operation
restore_service
via a request object, either of type
RestoreServiceRequest or an equivalent Hash.
- 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
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::RestoreServiceRequest.new # Call the restore_service method. result = client.restore_service request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#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.
def update_metadata_import(request, options = nil) -> ::Gapic::Operation
update_metadata_import
via a request object, either of type
UpdateMetadataImportRequest or an equivalent Hash.
- 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
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::UpdateMetadataImportRequest.new # Call the update_metadata_import method. result = client.update_metadata_import request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end
#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.
def update_service(request, options = nil) -> ::Gapic::Operation
update_service
via a request object, either of type
UpdateServiceRequest or an equivalent Hash.
- 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
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).
-
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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/metastore/v1beta" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Metastore::V1beta::DataprocMetastore::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Metastore::V1beta::UpdateServiceRequest.new # Call the update_service method. result = client.update_service request # The returned object is of type Gapic::Operation. You can use this # object to check the status of an operation, cancel it, or wait # for results. Here is how to block until completion: result.wait_until_done! timeout: 60 if result.response? p result.response else puts "Error!" end