Dataplex V1 API - Class Google::Cloud::Dataplex::V1::MetadataService::Rest::Client (v0.9.0)

Reference documentation and code samples for the Dataplex V1 API class Google::Cloud::Dataplex::V1::MetadataService::Rest::Client.

REST 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all MetadataService clients
::Google::Cloud::Dataplex::V1::MetadataService::Rest::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.

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

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

Overloads
def create_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
Pass arguments to create_entity via a request object, either of type CreateEntityRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

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

Overloads
def create_partition(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Partition
Pass arguments to create_partition via a request object, either of type CreatePartitionRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

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

Overloads
def delete_entity(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_entity via a request object, either of type DeleteEntityRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

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

Overloads
def delete_partition(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_partition via a request object, either of type DeletePartitionRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

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

Overloads
def get_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
Pass arguments to get_entity via a request object, either of type GetEntityRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameters
  • 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

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

Overloads
def get_partition(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Partition
Pass arguments to get_partition via a request object, either of type GetPartitionRequest or an equivalent Hash.
Parameters
  • 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
Pass arguments to 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).
Parameter
  • 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.
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 MetadataService REST client object.

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

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

#list_entities

def list_entities(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>
def list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>

List metadata entities in a zone.

Overloads
def list_entities(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>
Pass arguments to list_entities via a request object, either of type ListEntitiesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::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_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>
Pass arguments to list_entities via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.
  • view (::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView) — Required. Specify the entity view to make a partial list request.
  • page_size (::Integer) — Optional. Maximum number of entities to return. The service may return fewer than this value. If unspecified, 100 entities will be returned by default. The maximum value is 500; larger values will will be truncated to 500.
  • page_token (::String) — Optional. Page token received from a previous ListEntities call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListEntities must match the call that provided the page token.
  • filter (::String) —

    Optional. The following filter parameters can be added to the URL to limit the entities returned by the API:

    • Entity ID: ?filter="id=entityID"
    • Asset ID: ?filter="asset=assetID"
    • Data path ?filter="data_path=gs://my-bucket"
    • Is HIVE compatible: ?filter="hive_compatible=true"
    • Is BigQuery compatible: ?filter="bigquery_compatible=true"
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call is aborted.

#list_partitions

def list_partitions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>
def list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>

List metadata partitions of an entity.

Overloads
def list_partitions(request, options = nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>
Pass arguments to list_partitions via a request object, either of type ListPartitionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::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_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::Rest::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>
Pass arguments to list_partitions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the parent entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.
  • page_size (::Integer) — Optional. Maximum number of partitions to return. The service may return fewer than this value. If unspecified, 100 partitions will be returned by default. The maximum page size is 500; larger values will will be truncated to 500.
  • page_token (::String) — Optional. Page token received from a previous ListPartitions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListPartitions must match the call that provided the page token.
  • filter (::String) —

    Optional. Filter the partitions returned to the caller using a key value pair expression. Supported operators and syntax:

    • logic operators: AND, OR
    • comparison operators: <, >, >=, <= ,=, !=
    • LIKE operators:
      • The right hand of a LIKE operator supports "." and "" for wildcard searches, for example "value1 LIKE ".*oo."
    • parenthetical grouping: ( )

    Sample filter expression: `?filter="key1 < value1 OR key2 > value2"

    Notes:

    • Keys to the left of operators are case insensitive.
    • Partition results are sorted first by creation time, then by lexicographic order.
    • Up to 20 key value filter pairs are allowed, but due to performance considerations, only the first 10 will be used as a filter.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
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)

#update_entity

def update_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
def update_entity(entity: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Entity

Update a metadata entity. Only supports full resource update.

Overloads
def update_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
Pass arguments to update_entity via a request object, either of type UpdateEntityRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataplex::V1::UpdateEntityRequest, ::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_entity(entity: nil, validate_only: nil) -> ::Google::Cloud::Dataplex::V1::Entity
Pass arguments to update_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).
Parameters
  • entity (::Google::Cloud::Dataplex::V1::Entity, ::Hash) — Required. Update description.
  • validate_only (::Boolean) — Optional. Only validate the request, but do not perform mutations. 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.