Reference documentation and code samples for the Dataplex V1 API class Google::Cloud::Dataplex::V1::MetadataService::Client.
Client for the MetadataService service.
Metadata service manages metadata resources such as tables, filesets and partitions.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the MetadataService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all MetadataService clients ::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the MetadataService 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_entity
def create_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
def create_entity(parent: nil, entity: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Entity
Create a metadata entity.
def create_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
create_entity
via a request object, either of type
CreateEntityRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::CreateEntityRequest, ::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_entity(parent: nil, entity: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Entity
create_entity
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 resource name of the parent zone:
projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}
. - entity (::Google::Cloud::Dataplex::V1::Entity, ::Hash) — Required. Entity resource.
- validate_only (::Boolean) — Optional. Only validate the request, but do not perform mutations. The default is false.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataplex::V1::Entity)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::MetadataService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::CreateEntityRequest.new # Call the create_entity method. result = client.create_entity request # The returned object is of type Google::Cloud::Dataplex::V1::Entity. p result
#create_partition
def create_partition(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Partition
def create_partition(parent: nil, partition: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Partition
Create a metadata partition.
def create_partition(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Partition
create_partition
via a request object, either of type
CreatePartitionRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::CreatePartitionRequest, ::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_partition(parent: nil, partition: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Partition
create_partition
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 resource name of the parent zone:
projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}
. - partition (::Google::Cloud::Dataplex::V1::Partition, ::Hash) — Required. Partition resource.
- validate_only (::Boolean) — Optional. Only validate the request, but do not perform mutations. The default is false.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataplex::V1::Partition)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::MetadataService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::CreatePartitionRequest.new # Call the create_partition method. result = client.create_partition request # The returned object is of type Google::Cloud::Dataplex::V1::Partition. p result
#delete_entity
def delete_entity(request, options = nil) -> ::Google::Protobuf::Empty
def delete_entity(name: nil, etag: nil) -> ::Google::Protobuf::Empty
Delete a metadata entity.
def delete_entity(request, options = nil) -> ::Google::Protobuf::Empty
delete_entity
via a request object, either of type
DeleteEntityRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::DeleteEntityRequest, ::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_entity(name: nil, etag: nil) -> ::Google::Protobuf::Empty
delete_entity
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 resource name of the entity:
projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}
. - etag (::String) — Required. The etag associated with the entity, which can be retrieved with a [GetEntity][] request.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::MetadataService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::DeleteEntityRequest.new # Call the delete_entity method. result = client.delete_entity request # The returned object is of type Google::Protobuf::Empty. p result
#delete_partition
def delete_partition(request, options = nil) -> ::Google::Protobuf::Empty
def delete_partition(name: nil, etag: nil) -> ::Google::Protobuf::Empty
Delete a metadata partition.
def delete_partition(request, options = nil) -> ::Google::Protobuf::Empty
delete_partition
via a request object, either of type
DeletePartitionRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::DeletePartitionRequest, ::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_partition(name: nil, etag: nil) -> ::Google::Protobuf::Empty
delete_partition
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 resource name of the partition.
format:
projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}
. The {partition_value_path} segment consists of an ordered sequence of partition values separated by "/". All values must be provided. - etag (::String) — Optional. The etag associated with the partition.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::MetadataService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::DeletePartitionRequest.new # Call the delete_partition method. result = client.delete_partition request # The returned object is of type Google::Protobuf::Empty. p result
#get_entity
def get_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
def get_entity(name: nil, view: nil) -> ::Google::Cloud::Dataplex::V1::Entity
Get a metadata entity.
def get_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
get_entity
via a request object, either of type
GetEntityRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::GetEntityRequest, ::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_entity(name: nil, view: nil) -> ::Google::Cloud::Dataplex::V1::Entity
get_entity
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 resource name of the entity:
projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.
-
view (::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView) — Optional. Used to select the subset of entity information to return.
Defaults to
BASIC
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataplex::V1::Entity)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::MetadataService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::GetEntityRequest.new # Call the get_entity method. result = client.get_entity request # The returned object is of type Google::Cloud::Dataplex::V1::Entity. p result
#get_partition
def get_partition(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Partition
def get_partition(name: nil) -> ::Google::Cloud::Dataplex::V1::Partition
Get a metadata partition of an entity.
def get_partition(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Partition
get_partition
via a request object, either of type
GetPartitionRequest or an equivalent Hash.
- request (::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::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_partition(name: nil) -> ::Google::Cloud::Dataplex::V1::Partition
get_partition
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 resource name of the partition:
projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}
. The {partition_value_path} segment consists of an ordered sequence of partition values separated by "/". All values must be provided.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataplex::V1::Partition)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/dataplex/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Dataplex::V1::MetadataService::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new # Call the get_partition method. result = client.get_partition request # The returned object is of type Google::Cloud::Dataplex::V1::Partition. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new MetadataService client object.
- (config) — Configure the MetadataService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config| config.timeout = 10.0 end
#list_entities
def list_entities(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>
def list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>
List metadata entities in a zone.