Google Cloud Data Catalog V1BETA1 API - Class Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client (v0.3.0)

Reference documentation and code samples for the Google Cloud Data Catalog V1BETA1 API class Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.

Client for the DataCatalog service.

Data Catalog API service allows clients to discover, understand, and manage their data.

Inherits

  • Object

Methods

.configure

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

Configure the DataCatalog 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 DataCatalog clients
::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.configure do |config|
  config.timeout = 10.0
end

#configure

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

Configure the DataCatalog 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_entry

def create_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
def create_entry(parent: nil, entry_id: nil, entry: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry

Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.

Users should enable the Data Catalog API in the project identified by the parent parameter (see Data Catalog Resource Project for more information).

A maximum of 100,000 entries may be created per entry group.

Overloads
def create_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
Pass arguments to create_entry via a request object, either of type CreateEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::CreateEntryRequest, ::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_entry(parent: nil, entry_id: nil, entry: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
Pass arguments to create_entry via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The name of the entry group this entry is in. Example:

    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}

    Note that this Entry and its child resources may not actually be stored in the location in this name.

  • entry_id (::String) — Required. The id of the entry to create.
  • entry (::Google::Cloud::DataCatalog::V1beta1::Entry, ::Hash) — Required. The entry to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::CreateEntryRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::Entry.
p result

#create_entry_group

def create_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
def create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup

A maximum of 10,000 entry groups may be created per organization across all locations.

Users should enable the Data Catalog API in the project identified by the parent parameter (see Data Catalog Resource Project for more information).

Overloads
def create_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
Pass arguments to create_entry_group via a request object, either of type CreateEntryGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::CreateEntryGroupRequest, ::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_entry_group(parent: nil, entry_group_id: nil, entry_group: nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
Pass arguments to create_entry_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The name of the project this entry group is in. Example:

    • projects/{project_id}/locations/{location}

    Note that this EntryGroup and its child resources may not actually be stored in the location in this name.

  • entry_group_id (::String) — Required. The id of the entry group to create. The id must begin with a letter or underscore, contain only English letters, numbers and underscores, and be at most 64 characters.
  • entry_group (::Google::Cloud::DataCatalog::V1beta1::EntryGroup, ::Hash) — The entry group to create. Defaults to an empty entry group.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::CreateEntryGroupRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::EntryGroup.
p result

#create_tag

def create_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Tag
def create_tag(parent: nil, tag: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Tag

Creates a tag on an Entry. Note: The project identified by the parent parameter for the tag and the tag template used to create the tag must be from the same organization.

Overloads
def create_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Tag
Pass arguments to create_tag via a request object, either of type CreateTagRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::CreateTagRequest, ::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_tag(parent: nil, tag: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Tag
Pass arguments to create_tag via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The name of the resource to attach this tag to. Tags can be attached to Entries. Example:

    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}

    Note that this Tag and its child resources may not actually be stored in the location in this name.

  • tag (::Google::Cloud::DataCatalog::V1beta1::Tag, ::Hash) — Required. The tag to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::CreateTagRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::Tag.
p result

#create_tag_template

def create_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
def create_tag_template(parent: nil, tag_template_id: nil, tag_template: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate

Creates a tag template. The user should enable the Data Catalog API in the project identified by the parent parameter (see Data Catalog Resource Project for more information).

Overloads
def create_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
Pass arguments to create_tag_template via a request object, either of type CreateTagTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateRequest, ::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_tag_template(parent: nil, tag_template_id: nil, tag_template: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
Pass arguments to create_tag_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) —

    Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions.

    Example:

    • projects/{project_id}/locations/us-central1
  • tag_template_id (::String) — Required. The id of the tag template to create.
  • tag_template (::Google::Cloud::DataCatalog::V1beta1::TagTemplate, ::Hash) — Required. The tag template to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplate.
p result

#create_tag_template_field

def create_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
def create_tag_template_field(parent: nil, tag_template_field_id: nil, tag_template_field: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField

Creates a field in a tag template. The user should enable the Data Catalog API in the project identified by the parent parameter (see Data Catalog Resource Project for more information).

Overloads
def create_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
Pass arguments to create_tag_template_field via a request object, either of type CreateTagTemplateFieldRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateFieldRequest, ::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_tag_template_field(parent: nil, tag_template_field_id: nil, tag_template_field: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
Pass arguments to create_tag_template_field via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) —

    Required. The name of the project and the template location region.

    Example:

    • projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
  • tag_template_field_id (::String) — Required. The ID of the tag template field to create. Field ids can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template.
  • tag_template_field (::Google::Cloud::DataCatalog::V1beta1::TagTemplateField, ::Hash) — Required. The tag template field to create.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::CreateTagTemplateFieldRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplateField.
p result

#delete_entry

def delete_entry(request, options = nil) -> ::Google::Protobuf::Empty
def delete_entry(name: nil) -> ::Google::Protobuf::Empty

Deletes an existing entry. Only entries created through CreateEntry method can be deleted. Users should enable the Data Catalog API in the project identified by the name parameter (see Data Catalog Resource Project for more information).

Overloads
def delete_entry(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_entry via a request object, either of type Google::Cloud::DataCatalog::V1beta1::DeleteEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::DeleteEntryRequest, ::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_entry(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_entry via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) —

    Required. The name of the entry. Example:

    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::DeleteEntryRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_entry_group

def delete_entry_group(request, options = nil) -> ::Google::Protobuf::Empty
def delete_entry_group(name: nil, force: nil) -> ::Google::Protobuf::Empty

Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users should enable the Data Catalog API in the project identified by the name parameter (see Data Catalog Resource Project for more information).

Overloads
def delete_entry_group(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_entry_group via a request object, either of type Google::Cloud::DataCatalog::V1beta1::DeleteEntryGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::DeleteEntryGroupRequest, ::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_entry_group(name: nil, force: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_entry_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the entry group. For example, projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}.
  • force (::Boolean) — Optional. If true, deletes all entries in the entry group.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::DeleteEntryGroupRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_tag

def delete_tag(request, options = nil) -> ::Google::Protobuf::Empty
def delete_tag(name: nil) -> ::Google::Protobuf::Empty

Deletes a tag.

Overloads
def delete_tag(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_tag via a request object, either of type Google::Cloud::DataCatalog::V1beta1::DeleteTagRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::DeleteTagRequest, ::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_tag(name: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_tag via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) —

    Required. The name of the tag to delete. Example:

    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::DeleteTagRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_tag_template

def delete_tag_template(request, options = nil) -> ::Google::Protobuf::Empty
def delete_tag_template(name: nil, force: nil) -> ::Google::Protobuf::Empty

Deletes a tag template and all tags using the template. Users should enable the Data Catalog API in the project identified by the name parameter (see Data Catalog Resource Project for more information).

Overloads
def delete_tag_template(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_tag_template via a request object, either of type Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateRequest, ::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_tag_template(name: nil, force: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_tag_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) —

    Required. The name of the tag template to delete. Example:

    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
  • force (::Boolean) — Required. Currently, this field must always be set to true. This confirms the deletion of any possible tags using this template. force = false will be supported in the future.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

#delete_tag_template_field

def delete_tag_template_field(request, options = nil) -> ::Google::Protobuf::Empty
def delete_tag_template_field(name: nil, force: nil) -> ::Google::Protobuf::Empty

Deletes a field in a tag template and all uses of that field. Users should enable the Data Catalog API in the project identified by the name parameter (see Data Catalog Resource Project for more information).

Overloads
def delete_tag_template_field(request, options = nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_tag_template_field via a request object, either of type Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateFieldRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateFieldRequest, ::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_tag_template_field(name: nil, force: nil) -> ::Google::Protobuf::Empty
Pass arguments to delete_tag_template_field via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) —

    Required. The name of the tag template field to delete. Example:

    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
  • force (::Boolean) — Required. Currently, this field must always be set to true. This confirms the deletion of this field from any tags using this field. force = false will be supported in the future.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::DeleteTagTemplateFieldRequest.new

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

# The returned object is of type Google::Protobuf::Empty.
p result

#get_entry

def get_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
def get_entry(name: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry

Gets an entry.

Overloads
def get_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
Pass arguments to get_entry via a request object, either of type GetEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::GetEntryRequest, ::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_entry(name: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
Pass arguments to get_entry via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) —

    Required. The name of the entry. Example:

    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::GetEntryRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::Entry.
p result

#get_entry_group

def get_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
def get_entry_group(name: nil, read_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup

Gets an EntryGroup.

Overloads
def get_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
Pass arguments to get_entry_group via a request object, either of type GetEntryGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::GetEntryGroupRequest, ::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_entry_group(name: nil, read_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
Pass arguments to get_entry_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The name of the entry group. For example, projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — The fields to return. If not set or empty, all fields are returned.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::GetEntryGroupRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::EntryGroup.
p result

#get_iam_policy

def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
def get_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policy

Gets the access control policy for a resource. A NOT_FOUND error is returned if the resource does not exist. An empty policy is returned if the resource exists but does not have a policy set on it.

Supported resources are:

  • Tag templates.
  • Entries.
  • Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.

Callers must have following Google IAM permission

  • datacatalog.tagTemplates.getIamPolicy to get policies on tag templates.
  • datacatalog.entries.getIamPolicy to get policies on entries.
  • datacatalog.entryGroups.getIamPolicy to get policies on entry groups.
Overloads
def get_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
Pass arguments to get_iam_policy via a request object, either of type Iam::V1::GetIamPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Iam::V1::GetIamPolicyRequest, ::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_iam_policy(resource: nil, options: nil) -> ::Google::Iam::V1::Policy
Pass arguments to get_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 resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
  • options (::Google::Iam::V1::GetPolicyOptions, ::Hash) — OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Google::Iam::V1::Policy)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Google::Iam::V1::Policy)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Iam::V1::GetIamPolicyRequest.new

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

# The returned object is of type Google::Iam::V1::Policy.
p result

#get_tag_template

def get_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
def get_tag_template(name: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate

Gets a tag template.

Overloads
def get_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
Pass arguments to get_tag_template via a request object, either of type GetTagTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::GetTagTemplateRequest, ::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_tag_template(name: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
Pass arguments to get_tag_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) —

    Required. The name of the tag template. Example:

    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::GetTagTemplateRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplate.
p result

#iam_policy_client

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

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

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

#initialize

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

Create a new DataCatalog client object.

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

# Create a client using a custom configuration
client = ::Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new do |config|
  config.timeout = 10.0
end

#list_entries

def list_entries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Entry>
def list_entries(parent: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Entry>

Lists entries.

Overloads
def list_entries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Entry>
Pass arguments to list_entries via a request object, either of type ListEntriesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::ListEntriesRequest, ::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_entries(parent: nil, page_size: nil, page_token: nil, read_mask: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Entry>
Pass arguments to list_entries via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) —

    Required. The name of the entry group that contains the entries, which can be provided in URL format. Example:

    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
  • page_size (::Integer) — The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for page_size > 1000.
  • page_token (::String) — Token that specifies which page is requested. If empty, the first page is returned.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — The fields to return for each Entry. If not set or empty, all fields are returned. For example, setting read_mask to contain only one path "name" will cause ListEntries to return a list of Entries with only "name" field.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::ListEntriesRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::Entry.
  p item
end

#list_entry_groups

def list_entry_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::EntryGroup>
def list_entry_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::EntryGroup>

Lists entry groups.

Overloads
def list_entry_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::EntryGroup>
Pass arguments to list_entry_groups via a request object, either of type ListEntryGroupsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::ListEntryGroupsRequest, ::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_entry_groups(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::EntryGroup>
Pass arguments to list_entry_groups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) —

    Required. The name of the location that contains the entry groups, which can be provided in URL format. Example:

    • projects/{project_id}/locations/{location}
  • page_size (::Integer) — Optional. The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for page_size > 1000.
  • page_token (::String) — Optional. Token that specifies which page is requested. If empty, the first page is returned.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::ListEntryGroupsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::EntryGroup.
  p item
end

#list_tags

def list_tags(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Tag>
def list_tags(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Tag>

Lists tags assigned to an Entry. The columns in the response are lowercased.

Overloads
def list_tags(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Tag>
Pass arguments to list_tags via a request object, either of type ListTagsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::ListTagsRequest, ::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_tags(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::Tag>
Pass arguments to list_tags via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) —

    Required. The name of the Data Catalog resource to list the tags of. The resource could be an Entry or an EntryGroup.

    Examples:

    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
  • page_size (::Integer) — The maximum number of tags to return. Default is 10. Max limit is 1000.
  • page_token (::String) — Token that specifies which page is requested. If empty, the first page is returned.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::ListTagsRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::Tag.
  p item
end

#lookup_entry

def lookup_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
def lookup_entry(linked_resource: nil, sql_resource: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry

Get an entry by target resource name. This method allows clients to use the resource name from the source Google Cloud Platform service to get the Data Catalog Entry.

Overloads
def lookup_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
Pass arguments to lookup_entry via a request object, either of type LookupEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::LookupEntryRequest, ::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 lookup_entry(linked_resource: nil, sql_resource: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
Pass arguments to lookup_entry 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
  • linked_resource (::String) —

    The full name of the Google Cloud Platform resource the Data Catalog entry represents. See: https://cloud.google.com/apis/design/resource_names#full_resource_name. Full names are case-sensitive.

    Examples:

    • //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
    • //pubsub.googleapis.com/projects/projectId/topics/topicId
  • sql_resource (::String) — The SQL name of the entry. SQL names are case-sensitive.

    Examples:

    • pubsub.project_id.topic_id
    • pubsub.project_id.`topic.id.with.dots`
    • bigquery.table.project_id.dataset_id.table_id
    • bigquery.dataset.project_id.dataset_id
    • datacatalog.entry.project_id.location_id.entry_group_id.entry_id

    *_ids should satisfy the standard SQL rules for identifiers. https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::LookupEntryRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::Entry.
p result

#rename_tag_template_field

def rename_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
def rename_tag_template_field(name: nil, new_tag_template_field_id: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField

Renames a field in a tag template. The user should enable the Data Catalog API in the project identified by the name parameter (see Data Catalog Resource Project for more information).

Overloads
def rename_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
Pass arguments to rename_tag_template_field via a request object, either of type RenameTagTemplateFieldRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldRequest, ::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 rename_tag_template_field(name: nil, new_tag_template_field_id: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
Pass arguments to rename_tag_template_field via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) —

    Required. The name of the tag template. Example:

    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
  • new_tag_template_field_id (::String) — Required. The new ID of this tag template field. For example, my_new_field.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplateField.
p result

#rename_tag_template_field_enum_value

def rename_tag_template_field_enum_value(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
def rename_tag_template_field_enum_value(name: nil, new_enum_value_display_name: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField

Renames an enum value in a tag template. The enum values have to be unique within one enum field. Thus, an enum value cannot be renamed with a name used in any other enum value within the same enum field.

Overloads
def rename_tag_template_field_enum_value(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
Pass arguments to rename_tag_template_field_enum_value via a request object, either of type RenameTagTemplateFieldEnumValueRequest or an equivalent Hash.
Parameters
def rename_tag_template_field_enum_value(name: nil, new_enum_value_display_name: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
Pass arguments to rename_tag_template_field_enum_value via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) —

    Required. The name of the enum field value. Example:

    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
  • new_enum_value_display_name (::String) — Required. The new display name of the enum value. For example, my_new_enum_value.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::RenameTagTemplateFieldEnumValueRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplateField.
p result

#search_catalog

def search_catalog(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResult>
def search_catalog(scope: nil, query: nil, page_size: nil, page_token: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResult>

Searches Data Catalog for multiple resources like entries, tags that match a query.

This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not return the complete resource, only the resource identifier and high level fields. Clients can subsequently call Get methods.

Note that Data Catalog search queries do not guarantee full recall. Query results that match your query may not be returned, even in subsequent result pages. Also note that results returned (and not returned) can vary across repeated search queries.

See Data Catalog Search Syntax for more information.

Overloads
def search_catalog(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResult>
Pass arguments to search_catalog via a request object, either of type SearchCatalogRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::SearchCatalogRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def search_catalog(scope: nil, query: nil, page_size: nil, page_token: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResult>
Pass arguments to search_catalog 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
  • scope (::Google::Cloud::DataCatalog::V1beta1::SearchCatalogRequest::Scope, ::Hash) — Required. The scope of this search request. A scope that has empty include_org_ids, include_project_ids AND false include_gcp_public_datasets is considered invalid. Data Catalog will return an error in such a case.
  • query (::String) — Optional. The query string in search query syntax. An empty query string will result in all data assets (in the specified scope) that the user has access to. Query strings can be simple as "x" or more qualified as:

    • name:x
    • column:x
    • description:y

    Note: Query tokens need to have a minimum of 3 characters for substring matching to work correctly. See Data Catalog Search Syntax for more information.

  • page_size (::Integer) — Number of results in the search page. If <=0 then defaults to 10. Max limit for page_size is 1000. Throws an invalid argument for page_size > 1000.
  • page_token (::String) — Optional. Pagination token returned in an earlier SearchCatalogResponse.next_page_token, which indicates that this is a continuation of a prior SearchCatalogRequest call, and that the system should return the next page of data. If empty, the first page is returned.
  • order_by (::String) — Specifies the ordering of results, currently supported case-sensitive choices are:

    • relevance, only supports descending
    • last_modified_timestamp [asc|desc], defaults to descending if not specified
    • default that can only be descending

    If not specified, defaults to relevance descending.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::SearchCatalogRequest.new

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

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::DataCatalog::V1beta1::SearchCatalogResult.
  p item
end

#set_iam_policy

def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
def set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy

Sets the access control policy for a resource. Replaces any existing policy. Supported resources are:

  • Tag templates.
  • Entries.
  • Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.

Callers must have following Google IAM permission

  • datacatalog.tagTemplates.setIamPolicy to set policies on tag templates.
  • datacatalog.entries.setIamPolicy to set policies on entries.
  • datacatalog.entryGroups.setIamPolicy to set policies on entry groups.
Overloads
def set_iam_policy(request, options = nil) -> ::Google::Iam::V1::Policy
Pass arguments to set_iam_policy via a request object, either of type Iam::V1::SetIamPolicyRequest or an equivalent Hash.
Parameters
  • request (::Google::Iam::V1::SetIamPolicyRequest, ::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 set_iam_policy(resource: nil, policy: nil, update_mask: nil) -> ::Google::Iam::V1::Policy
Pass arguments to set_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 resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
  • policy (::Google::Iam::V1::Policy, ::Hash) — REQUIRED: The complete policy to be applied to the resource. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used:

    paths: "bindings, etag"

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Google::Iam::V1::Policy)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Google::Iam::V1::Policy)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Iam::V1::SetIamPolicyRequest.new

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

# The returned object is of type Google::Iam::V1::Policy.
p result

#test_iam_permissions

def test_iam_permissions(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
def test_iam_permissions(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponse

Returns the caller's permissions on a resource. If the resource does not exist, an empty set of permissions is returned (We don't return a NOT_FOUND error).

Supported resources are:

  • Tag templates.
  • Entries.
  • Entry groups. Note, this method cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced to Data Catalog.

A caller is not required to have Google IAM permission to make this request.

Overloads
def test_iam_permissions(request, options = nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
Pass arguments to test_iam_permissions via a request object, either of type Iam::V1::TestIamPermissionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Iam::V1::TestIamPermissionsRequest, ::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 test_iam_permissions(resource: nil, permissions: nil) -> ::Google::Iam::V1::TestIamPermissionsResponse
Pass arguments to test_iam_permissions 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 resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
  • permissions (::Array<::String>) — The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Google::Iam::V1::TestIamPermissionsResponse)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Google::Iam::V1::TestIamPermissionsResponse)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Iam::V1::TestIamPermissionsRequest.new

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

# The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
p result

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#update_entry

def update_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
def update_entry(entry: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry

Updates an existing entry. Users should enable the Data Catalog API in the project identified by the entry.name parameter (see Data Catalog Resource Project for more information).

Overloads
def update_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
Pass arguments to update_entry via a request object, either of type UpdateEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::UpdateEntryRequest, ::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_entry(entry: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Entry
Pass arguments to update_entry 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
  • entry (::Google::Cloud::DataCatalog::V1beta1::Entry, ::Hash) — Required. The updated entry. The "name" field must be set.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) —

    Names of fields whose values to overwrite on an entry.

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

    The following fields are modifiable:

    • For entries with type DATA_STREAM:
      • schema
    • For entries with type FILESET:
      • schema
      • display_name
      • description
      • gcs_fileset_spec
      • gcs_fileset_spec.file_patterns
    • For entries with user_specified_type:
      • schema
      • display_name
      • description
      • user_specified_type
      • user_specified_system
      • linked_resource
      • source_system_timestamps
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::UpdateEntryRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::Entry.
p result

#update_entry_group

def update_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
def update_entry_group(entry_group: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup

Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by the entry_group.name parameter (see Data Catalog Resource Project for more information).

Overloads
def update_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
Pass arguments to update_entry_group via a request object, either of type UpdateEntryGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::UpdateEntryGroupRequest, ::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_entry_group(entry_group: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::EntryGroup
Pass arguments to update_entry_group 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
  • entry_group (::Google::Cloud::DataCatalog::V1beta1::EntryGroup, ::Hash) — Required. The updated entry group. "name" field must be set.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Names of fields whose values to overwrite on an entry group.

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::UpdateEntryGroupRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::EntryGroup.
p result

#update_tag

def update_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Tag
def update_tag(tag: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Tag

Updates an existing tag.

Overloads
def update_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::Tag
Pass arguments to update_tag via a request object, either of type UpdateTagRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::UpdateTagRequest, ::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_tag(tag: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::Tag
Pass arguments to update_tag 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
  • tag (::Google::Cloud::DataCatalog::V1beta1::Tag, ::Hash) — Required. The updated tag. The "name" field must be set.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Note: Currently, this parameter can only take "fields" as value.

    Names of fields whose values to overwrite on a tag. Currently, a tag has the only modifiable field with the name fields.

    In general, if this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::UpdateTagRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::Tag.
p result

#update_tag_template

def update_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
def update_tag_template(tag_template: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate

Updates a tag template. This method cannot be used to update the fields of a template. The tag template fields are represented as separate resources and should be updated using their own create/update/delete methods. Users should enable the Data Catalog API in the project identified by the tag_template.name parameter (see Data Catalog Resource Project for more information).

Overloads
def update_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
Pass arguments to update_tag_template via a request object, either of type UpdateTagTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateRequest, ::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_tag_template(tag_template: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplate
Pass arguments to update_tag_template 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
  • tag_template (::Google::Cloud::DataCatalog::V1beta1::TagTemplate, ::Hash) — Required. The template to update. The "name" field must be set.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Names of fields whose values to overwrite on a tag template. Currently, only display_name can be overwritten.

    In general, if this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplate.
p result

#update_tag_template_field

def update_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
def update_tag_template_field(name: nil, tag_template_field: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField

Updates a field in a tag template. This method cannot be used to update the field type. Users should enable the Data Catalog API in the project identified by the name parameter (see Data Catalog Resource Project for more information).

Overloads
def update_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
Pass arguments to update_tag_template_field via a request object, either of type UpdateTagTemplateFieldRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateFieldRequest, ::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_tag_template_field(name: nil, tag_template_field: nil, update_mask: nil) -> ::Google::Cloud::DataCatalog::V1beta1::TagTemplateField
Pass arguments to update_tag_template_field via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) —

    Required. The name of the tag template field. Example:

    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
  • tag_template_field (::Google::Cloud::DataCatalog::V1beta1::TagTemplateField, ::Hash) — Required. The template to update.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — Optional. Names of fields whose values to overwrite on an individual field of a tag template. The following fields are modifiable:

    • display_name
    • type.enum_type
    • is_required

    If this parameter is absent or empty, all modifiable fields are overwritten. If such fields are non-required and omitted in the request body, their values are emptied with one exception: when updating an enum type, the provided values are merged with the existing values. Therefore, enum values can only be added, existing enum values cannot be deleted or renamed.

    Additionally, updating a template field from optional to required is not allowed.

Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1beta1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1beta1::DataCatalog::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1beta1::UpdateTagTemplateFieldRequest.new

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

# The returned object is of type Google::Cloud::DataCatalog::V1beta1::TagTemplateField.
p result