Data Catalog V1 API - Class Google::Cloud::DataCatalog::V1::DataCatalog::Client (v0.12.1)

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

Client for the DataCatalog service.

Data Catalog API service allows you to discover, understand, and manage your 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::V1::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::V1::Entry
def create_entry(parent: nil, entry_id: nil, entry: nil) -> ::Google::Cloud::DataCatalog::V1::Entry

Creates an entry.

You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', or custom types. Data Catalog automatically creates entries with other types during metadata ingestion from integrated systems.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

An entry group can have a maximum of 100,000 entries.

Overloads
def create_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Entry
Pass arguments to create_entry via a request object, either of type CreateEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 belongs to.

    Note: The entry itself and its child resources might not be stored in the location specified in its name.

  • entry_id (::String) — Required. The ID of the entry to create.

    The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores (_). The maximum size is 64 bytes when encoded in UTF-8.

  • entry (::Google::Cloud::DataCatalog::V1::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/v1"

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

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

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

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

#create_entry_group

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

Creates an entry group.

An entry group contains logically related entries together with Cloud Identity and Access Management policies. These policies specify users who can create, edit, and view entries within entry groups.

Data Catalog automatically creates entry groups with names that start with the @ symbol for the following resources:

  • BigQuery entries (@bigquery)
  • Pub/Sub topics (@pubsub)
  • Dataproc Metastore services (@dataproc_metastore_{SERVICE_NAME_HASH})

You can create your own entry groups for Cloud Storage fileset entries and custom entries together with the corresponding IAM policies. User-created entry groups can't contain the @ symbol, it is reserved for automatically created groups.

Entry groups, like entries, can be searched.

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

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

Overloads
def create_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::EntryGroup
Pass arguments to create_entry_group via a request object, either of type CreateEntryGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 names of the project and location that the new entry group belongs to.

    Note: The entry group itself and its child resources might not be stored in the location specified in its name.

  • entry_group_id (::String) — Required. The ID of the entry group to create.

    The ID must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and must start with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-8.

  • entry_group (::Google::Cloud::DataCatalog::V1::EntryGroup, ::Hash) — The entry group to create. Defaults to empty.
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/v1"

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

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

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

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

#create_tag

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

Creates a tag and assigns it to:

  • An Entry if the method name is projects.locations.entryGroups.entries.tags.create.
  • Or EntryGroupif the method name is projects.locations.entryGroups.tags.create.

Note: The project identified by the parent parameter for the tag and the tag template used to create the tag must be in the same organization.

Overloads
def create_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Tag
Pass arguments to create_tag via a request object, either of type CreateTagRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 or entry groups. An entry can have up to 1000 attached tags.

    Note: The tag and its child resources might not be stored in the location specified in its name.

  • tag (::Google::Cloud::DataCatalog::V1::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/v1"

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

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

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

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

#create_tag_template

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

Creates a tag template.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

Overloads
def create_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::TagTemplate
Pass arguments to create_tag_template via a request object, either of type CreateTagTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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.
  • tag_template_id (::String) — Required. The ID of the tag template to create.

    The ID must contain only lowercase letters (a-z), numbers (0-9), or underscores (_), and must start with a letter or underscore. The maximum size is 64 bytes when encoded in UTF-8.

  • tag_template (::Google::Cloud::DataCatalog::V1::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/v1"

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

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

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

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

#create_tag_template_field

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

Creates a field in a tag template.

You must enable the Data Catalog API in the project identified by the parent parameter. For more information, see Data Catalog resource project.

Overloads
def create_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::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::V1::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::V1::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.
  • tag_template_field_id (::String) — Required. The ID of the tag template field to create.

    Note: Adding a required field to an existing template is not allowed.

    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::V1::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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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::V1::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.

You can delete only the entries created by the CreateEntry method.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

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::V1::DeleteEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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 to delete.
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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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 entry group.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

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::V1::DeleteEntryGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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 to delete.
  • 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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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::V1::DeleteTagRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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.
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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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 that use it.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

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::V1::DeleteTagTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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.
  • force (::Boolean) — Required. If true, deletes all tags that use this template.

    Currently, true is the only supported 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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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 this field from the tags based on this template.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

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::V1::DeleteTagTemplateFieldRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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.
  • force (::Boolean) — Required. If true, deletes this field from any tags that use it.

    Currently, true is the only supported 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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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::V1::Entry
def get_entry(name: nil) -> ::Google::Cloud::DataCatalog::V1::Entry

Gets an entry.

Overloads
def get_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Entry
Pass arguments to get_entry via a request object, either of type GetEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 to get.
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/v1"

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

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

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

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

#get_entry_group

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

Gets an entry group.

Overloads
def get_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::EntryGroup
Pass arguments to get_entry_group via a request object, either of type GetEntryGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 to get.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — The fields to return. If empty or omitted, 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/v1"

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

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

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

# The returned object is of type Google::Cloud::DataCatalog::V1::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.

May return:

  • ANOT_FOUND error if the resource doesn't exist or you don't have the permission to view it.
  • An empty policy if the resource exists but doesn't have a set policy.

Supported resources are:

  • Tag templates
  • Entry groups

Note: This method doesn't get policies from Google Cloud Platform resources ingested into Data Catalog.

To call this method, you must have the following Google IAM permissions:

  • datacatalog.tagTemplates.getIamPolicy to get policies on tag templates.
  • 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
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1::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::V1::TagTemplate
def get_tag_template(name: nil) -> ::Google::Cloud::DataCatalog::V1::TagTemplate

Gets a tag template.

Overloads
def get_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::TagTemplate
Pass arguments to get_tag_template via a request object, either of type GetTagTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 to get.
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/v1"

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

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

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

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

#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::V1::DataCatalog::Client.new

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

#list_entries

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

Lists entries.

Note: Currently, this method can list only custom entries. To get a list of both custom and automatically created entries, use SearchCatalog.

Overloads
def list_entries(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Entry>
Pass arguments to list_entries via a request object, either of type ListEntriesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 to list.

    Can be provided in URL format.

  • page_size (::Integer) —

    The maximum number of items to return. Default is 10. Maximum limit is

    1. Throws an invalid argument if page_size is more than 1000.
  • page_token (::String) — Pagination token that specifies the next page to return. If empty, the first page is returned.
  • read_mask (::Google::Protobuf::FieldMask, ::Hash) — The fields to return for each entry. If empty or omitted, all fields are returned.

    For example, to return a list of entries with only the name field, set read_mask to only one path with the name value.

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/v1"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::DataCatalog::V1::Entry.
  p response
end

#list_entry_groups

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

Lists entry groups.

Overloads
def list_entry_groups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::EntryGroup>
Pass arguments to list_entry_groups via a request object, either of type ListEntryGroupsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 to list.

    Can be provided as a URL.

  • page_size (::Integer) — Optional. The maximum number of items to return.

    Default is 10. Maximum limit is 1000. Throws an invalid argument if page_size is greater than 1000.

  • page_token (::String) — Optional. Pagination token that specifies the next page to return. If empty, returns the first page.
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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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 all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::DataCatalog::V1::EntryGroup.
  p response
end

#list_tags

def list_tags(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Tag>
def list_tags(parent: nil, page_size: nil, page_token: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::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::V1::Tag>
Pass arguments to list_tags via a request object, either of type ListTagsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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 can be an Entry or an EntryGroup (without /entries/{entries} at the end).

  • page_size (::Integer) — The maximum number of tags to return. Default is 10. Maximum limit is 1000.
  • page_token (::String) — Pagination token that specifies the next page to return. 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/v1"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::DataCatalog::V1::Tag.
  p response
end

#lookup_entry

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

Gets an entry by its target resource name.

The resource name comes from the source Google Cloud Platform service.

Overloads
def lookup_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Entry
Pass arguments to lookup_entry via a request object, either of type LookupEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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, fully_qualified_name: nil) -> ::Google::Cloud::DataCatalog::V1::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. For more information, see Full Resource Name.

    Full names are case-sensitive. For example:

    • //bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}
    • //pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}
  • sql_resource (::String) — The SQL name of the entry. SQL names are case-sensitive.

    Examples:

    • pubsub.topic.{PROJECT_ID}.{TOPIC_ID}
    • pubsub.topic.{PROJECT_ID}.`{TOPIC.ID.SEPARATED.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}

    Identifiers (*_ID) should comply with the Lexical structure in Standard SQL.

  • fully_qualified_name (::String) — Fully qualified name (FQN) of the resource.

    FQNs take two forms:

    • For non-regionalized resources:

    {SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}

    • For regionalized resources:

    {SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}

    Example for a DPMS table:

    dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_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/v1"

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

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

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

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

#modify_entry_contacts

def modify_entry_contacts(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Contacts
def modify_entry_contacts(name: nil, contacts: nil) -> ::Google::Cloud::DataCatalog::V1::Contacts

Modifies contacts, part of the business context of an Entry.

To call this method, you must have the datacatalog.entries.updateContacts IAM permission on the corresponding project.

Overloads
def modify_entry_contacts(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Contacts
Pass arguments to modify_entry_contacts via a request object, either of type ModifyEntryContactsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::ModifyEntryContactsRequest, ::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 modify_entry_contacts(name: nil, contacts: nil) -> ::Google::Cloud::DataCatalog::V1::Contacts
Pass arguments to modify_entry_contacts 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
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/v1"

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

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

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

# The returned object is of type Google::Cloud::DataCatalog::V1::Contacts.
p result

#modify_entry_overview

def modify_entry_overview(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::EntryOverview
def modify_entry_overview(name: nil, entry_overview: nil) -> ::Google::Cloud::DataCatalog::V1::EntryOverview

Modifies entry overview, part of the business context of an Entry.

To call this method, you must have the datacatalog.entries.updateOverview IAM permission on the corresponding project.

Overloads
def modify_entry_overview(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::EntryOverview
Pass arguments to modify_entry_overview via a request object, either of type ModifyEntryOverviewRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::ModifyEntryOverviewRequest, ::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 modify_entry_overview(name: nil, entry_overview: nil) -> ::Google::Cloud::DataCatalog::V1::EntryOverview
Pass arguments to modify_entry_overview 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
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/v1"

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

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

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

# The returned object is of type Google::Cloud::DataCatalog::V1::EntryOverview.
p result

#rename_tag_template_field

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

Renames a field in a tag template.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

Overloads
def rename_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::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::V1::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::V1::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 field.
  • 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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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::V1::TagTemplateField.
p result

#rename_tag_template_field_enum_value

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

Renames an enum value in a tag template.

Within a single enum field, enum values must be unique.

Overloads
def rename_tag_template_field_enum_value(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::TagTemplateField
Pass arguments to rename_tag_template_field_enum_value via a request object, either of type RenameTagTemplateFieldEnumValueRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldEnumValueRequest, ::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_enum_value(name: nil, new_enum_value_display_name: nil) -> ::Google::Cloud::DataCatalog::V1::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.
  • 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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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::V1::TagTemplateField.
p result

#search_catalog

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

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

This is a Custom Method that doesn't return all information on a resource, only its ID and high level fields. To get more information, you can subsequently call specific get methods.

Note: Data Catalog search queries don't guarantee full recall. Results that match your query might not be returned, even in subsequent result pages. Additionally, returned (and not returned) results can vary if you repeat search queries.

For more information, see Data Catalog search syntax.

Overloads
def search_catalog(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::SearchCatalogResult>
Pass arguments to search_catalog via a request object, either of type SearchCatalogRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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::V1::SearchCatalogRequest::Scope, ::Hash) — Required. The scope of this search request.

    The scope is invalid if include_org_ids, include_project_ids are empty AND include_gcp_public_datasets is set to false. In this case, the request returns an error.

  • query (::String) —

    Optional. The query string with a minimum of 3 characters and specific syntax. For more information, see Data Catalog search syntax.

    An empty query string returns all data assets (in the specified scope) that you have access to.

    A query string can be a simple xyz or qualified by predicates:

    • name:x
    • column:y
    • description:z
  • page_size (::Integer) — Number of results to return in a single search page.

    Can't be negative or 0, defaults to 10 in this case. The maximum number is 1000. If exceeded, throws an "invalid argument" exception.

  • page_token (::String) — Optional. Pagination token that, if specified, returns the next page of search results. If empty, returns the first page.

    This token is returned in the SearchCatalogResponse.next_page_token field of the response to a previous SearchCatalogRequest call.

  • order_by (::String) — Specifies the order of results.

    Currently supported case-sensitive values are:

    • relevance that can only be descending
    • last_modified_timestamp [asc|desc] with descending (desc) as default
    • default that can only be descending

    If this parameter is omitted, it defaults to the descending relevance.

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/v1"

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

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

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

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::DataCatalog::V1::SearchCatalogResult.
  p response
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 an access control policy for a resource. Replaces any existing policy.

Supported resources are:

  • Tag templates
  • Entry groups

Note: This method sets policies only within Data Catalog and can't be used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources synced with the Data Catalog.

To call this method, you must have the following Google IAM permissions:

  • datacatalog.tagTemplates.setIamPolicy to set policies on tag templates.
  • 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
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1::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

#star_entry

def star_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::StarEntryResponse
def star_entry(name: nil) -> ::Google::Cloud::DataCatalog::V1::StarEntryResponse

Marks an Entry as starred by the current user. Starring information is private to each user.

Overloads
def star_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::StarEntryResponse
Pass arguments to star_entry via a request object, either of type StarEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::StarEntryRequest, ::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 star_entry(name: nil) -> ::Google::Cloud::DataCatalog::V1::StarEntryResponse
Pass arguments to star_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 to mark as starred.
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/v1"

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

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

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

# The returned object is of type Google::Cloud::DataCatalog::V1::StarEntryResponse.
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

Gets your permissions on a resource.

Returns an empty set of permissions if the resource doesn't exist.

Supported resources are:

  • Tag templates
  • Entry groups

Note: This method gets policies only within Data Catalog and can't be used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any external Google Cloud Platform resources ingested into Data Catalog.

No Google IAM permissions are required to call this method.

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
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/data_catalog/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::DataCatalog::V1::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

#unstar_entry

def unstar_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::UnstarEntryResponse
def unstar_entry(name: nil) -> ::Google::Cloud::DataCatalog::V1::UnstarEntryResponse

Marks an Entry as NOT starred by the current user. Starring information is private to each user.

Overloads
def unstar_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::UnstarEntryResponse
Pass arguments to unstar_entry via a request object, either of type UnstarEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::UnstarEntryRequest, ::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 unstar_entry(name: nil) -> ::Google::Cloud::DataCatalog::V1::UnstarEntryResponse
Pass arguments to unstar_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 to mark as not starred.
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/v1"

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

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

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

# The returned object is of type Google::Cloud::DataCatalog::V1::UnstarEntryResponse.
p result

#update_entry

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

Updates an existing entry.

You must enable the Data Catalog API in the project identified by the entry.name parameter. For more information, see Data Catalog resource project.

Overloads
def update_entry(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Entry
Pass arguments to update_entry via a request object, either of type UpdateEntryRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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::V1::Entry, ::Hash) — Required. Updates for the 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.

    You can modify only the fields listed below.

    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/v1"

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

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

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

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

#update_entry_group

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

Updates an entry group.

You must enable the Data Catalog API in the project identified by the entry_group.name parameter. For more information, see Data Catalog resource project.

Overloads
def update_entry_group(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::EntryGroup
Pass arguments to update_entry_group via a request object, either of type UpdateEntryGroupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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::V1::EntryGroup, ::Hash) — Required. Updates for the entry group. The 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/v1"

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

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

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

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

#update_tag

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

Updates an existing tag.

Overloads
def update_tag(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::Tag
Pass arguments to update_tag via a request object, either of type UpdateTagRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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::V1::Tag, ::Hash) — Required. The updated tag. The "name" field must be set.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — 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/v1"

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

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

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

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

#update_tag_template

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

Updates a tag template.

You can't update template fields with this method. These fields are separate resources with their own create, update, and delete methods.

You must enable the Data Catalog API in the project identified by the tag_template.name parameter. For more information, see Data Catalog resource project.

Overloads
def update_tag_template(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::TagTemplate
Pass arguments to update_tag_template via a request object, either of type UpdateTagTemplateRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::DataCatalog::V1::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::V1::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::V1::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 and is_publicly_readable can be overwritten.

    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.

    Note: Updating the is_publicly_readable field may require up to 12 hours to take effect in search results.

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/v1"

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

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

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

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

#update_tag_template_field

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

Updates a field in a tag template.

You can't update the field type with this method.

You must enable the Data Catalog API in the project identified by the name parameter. For more information, see Data Catalog resource project.

Overloads
def update_tag_template_field(request, options = nil) -> ::Google::Cloud::DataCatalog::V1::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::V1::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::V1::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.
  • tag_template_field (::Google::Cloud::DataCatalog::V1::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/v1"

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

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::DataCatalog::V1::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::V1::TagTemplateField.
p result