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.
Attributes
@private
Public Class Methods
Configure the DataCatalog
Client
class.
See {::Google::Cloud::DataCatalog::V1::DataCatalog::Client::Configuration} for a description of the configuration fields.
@example
# Modify the configuration for all DataCatalog clients ::Google::Cloud::DataCatalog::V1::DataCatalog::Client.configure do |config| config.timeout = 10.0 end
@yield [config] Configure the Client
client. @yieldparam config [Client::Configuration]
@return [Client::Configuration]
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 57 def self.configure @configure ||= begin namespace = ["Google", "Cloud", "DataCatalog", "V1"] parent_config = while namespace.any? parent_name = namespace.join "::" parent_const = const_get parent_name break parent_const.configure if parent_const.respond_to? :configure namespace.pop end default_config = Client::Configuration.new parent_config default_config.timeout = 60.0 default_config.rpcs.search_catalog.timeout = 60.0 default_config.rpcs.search_catalog.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_entry_group.timeout = 60.0 default_config.rpcs.get_entry_group.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_entry_groups.timeout = 60.0 default_config.rpcs.list_entry_groups.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_entry.timeout = 60.0 default_config.rpcs.get_entry.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.lookup_entry.timeout = 60.0 default_config.rpcs.lookup_entry.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_entries.timeout = 60.0 default_config.rpcs.list_entries.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.list_tags.timeout = 60.0 default_config.rpcs.list_tags.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config.rpcs.get_iam_policy.timeout = 60.0 default_config.rpcs.get_iam_policy.retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] } default_config end yield @configure if block_given? @configure end
Create a new DataCatalog
client object.
@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
@yield [config] Configure the DataCatalog
client. @yieldparam config [Client::Configuration]
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 152 def initialize # These require statements are intentionally placed here to initialize # the gRPC module only when it's required. # See https://github.com/googleapis/toolkit/issues/446 require "gapic/grpc" require "google/cloud/datacatalog/v1/datacatalog_services_pb" # Create the configuration object @config = Configuration.new Client.configure # Yield the configuration if needed yield @config if block_given? # Create credentials credentials = @config.credentials # Use self-signed JWT if the endpoint is unchanged from default, # but only if the default endpoint does not have a region prefix. enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint && !@config.endpoint.split(".").first.include?("-") credentials ||= Credentials.default scope: @config.scope, enable_self_signed_jwt: enable_self_signed_jwt if credentials.is_a?(::String) || credentials.is_a?(::Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = @config.quota_project @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id @data_catalog_stub = ::Gapic::ServiceStub.new( ::Google::Cloud::DataCatalog::V1::DataCatalog::Stub, credentials: credentials, endpoint: @config.endpoint, channel_args: @config.channel_args, interceptors: @config.interceptors ) end
Public Instance Methods
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 {::Google::Cloud::DataCatalog::V1::DataCatalog::Client::Configuration} for a description of the configuration fields.
@yield [config] Configure the Client
client. @yieldparam config [Client::Configuration]
@return [Client::Configuration]
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 131 def configure yield @config if block_given? @config end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
An entry group can have a maximum of 100,000 entries.
@overload create_entry
(request, options = nil)
Pass arguments to `create_entry` via a request object, either of type {::Google::Cloud::DataCatalog::V1::CreateEntryRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_entry
(parent: nil, entry_id: nil, entry: nil)
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). @param 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. @param 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. @param entry [::Google::Cloud::DataCatalog::V1::Entry, ::Hash] Required. The entry to create.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::Entry] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::Entry]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 765 def create_entry request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::CreateEntryRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_entry.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_entry.timeout, metadata: metadata, retry_policy: @config.rpcs.create_entry.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_entry, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Creates an entry group.
An entry group contains logically related entries together with [Cloud Identity and Access Management](/data-catalog/docs/concepts/iam) 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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload create_entry_group
(request, options = nil)
Pass arguments to `create_entry_group` via a request object, either of type {::Google::Cloud::DataCatalog::V1::CreateEntryGroupRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_entry_group
(parent: nil, entry_group_id: nil, entry_group: nil)
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). @param 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. @param 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. @param entry_group [::Google::Cloud::DataCatalog::V1::EntryGroup, ::Hash] The entry group to create. Defaults to empty.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::EntryGroup] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::EntryGroup]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 373 def create_entry_group request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::CreateEntryGroupRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_entry_group.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_entry_group.timeout, metadata: metadata, retry_policy: @config.rpcs.create_entry_group.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_entry_group, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Creates a tag and assigns it to:
-
An {::Google::Cloud::DataCatalog::V1::Entry Entry} if the method name is “projects.locations.entryGroups.entries.tags.create“.
-
Or {::Google::Cloud::DataCatalog::V1::EntryGroup EntryGroup}if the method name is “projects.locations.entryGroups.tags.create“.
Note: The project identified by the `parent` parameter for the [tag] (cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) and the [tag template] (cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) used to create the tag must be in the same organization.
@overload create_tag
(request, options = nil)
Pass arguments to `create_tag` via a request object, either of type {::Google::Cloud::DataCatalog::V1::CreateTagRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_tag
(parent: nil, tag: nil)
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). @param 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. @param tag [::Google::Cloud::DataCatalog::V1::Tag, ::Hash] Required. The tag to create.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::Tag] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::Tag]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1994 def create_tag request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::CreateTagRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_tag.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_tag.timeout, metadata: metadata, retry_policy: @config.rpcs.create_tag.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_tag, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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] (cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload create_tag_template
(request, options = nil)
Pass arguments to `create_tag_template` via a request object, either of type {::Google::Cloud::DataCatalog::V1::CreateTagTemplateRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_tag_template
(parent: nil, tag_template_id: nil, tag_template: nil)
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). @param parent [::String] Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions). @param 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. @param tag_template [::Google::Cloud::DataCatalog::V1::TagTemplate, ::Hash] Required. The tag template to create.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplate] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::TagTemplate]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1279 def create_tag_template request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::CreateTagTemplateRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_tag_template.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_tag_template.timeout, metadata: metadata, retry_policy: @config.rpcs.create_tag_template.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_tag_template, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload create_tag_template_field
(request, options = nil)
Pass arguments to `create_tag_template_field` via a request object, either of type {::Google::Cloud::DataCatalog::V1::CreateTagTemplateFieldRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload create_tag_template_field
(parent: nil, tag_template_field_id: nil, tag_template_field: nil)
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). @param parent [::String] Required. The name of the project and the template location [region](https://cloud.google.com/data-catalog/docs/concepts/regions). @param 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. @param tag_template_field [::Google::Cloud::DataCatalog::V1::TagTemplateField, ::Hash] Required. The tag template field to create.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplateField] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::TagTemplateField]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1590 def create_tag_template_field request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::CreateTagTemplateFieldRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.create_tag_template_field.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.create_tag_template_field.timeout, metadata: metadata, retry_policy: @config.rpcs.create_tag_template_field.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_tag_template_field, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Deletes an existing entry.
You can delete only the entries created by the {::Google::Cloud::DataCatalog::V1::DataCatalog::Client#create_entry 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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload delete_entry
(request, options = nil)
Pass arguments to `delete_entry` via a request object, either of type {::Google::Cloud::DataCatalog::V1::DeleteEntryRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_entry
(name: nil)
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). @param name [::String] Required. The name of the entry to delete.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 945 def delete_entry request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::DeleteEntryRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_entry.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_entry.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_entry.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_entry, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload delete_entry_group
(request, options = nil)
Pass arguments to `delete_entry_group` via a request object, either of type {::Google::Cloud::DataCatalog::V1::DeleteEntryGroupRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_entry_group
(name: nil, force: nil)
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). @param name [::String] Required. The name of the entry group to delete. @param force [::Boolean] Optional. If true, deletes all entries in the entry group.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 597 def delete_entry_group request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::DeleteEntryGroupRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_entry_group.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_entry_group.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_entry_group, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Deletes a tag.
@overload delete_tag
(request, options = nil)
Pass arguments to `delete_tag` via a request object, either of type {::Google::Cloud::DataCatalog::V1::DeleteTagRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_tag
(name: nil)
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). @param name [::String] Required. The name of the tag to delete.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 2137 def delete_tag request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::DeleteTagRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_tag.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_tag.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_tag.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_tag, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload delete_tag_template
(request, options = nil)
Pass arguments to `delete_tag_template` via a request object, either of type {::Google::Cloud::DataCatalog::V1::DeleteTagTemplateRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_tag_template
(name: nil, force: nil)
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). @param name [::String] Required. The name of the tag template to delete. @param force [::Boolean] Required. If true, deletes all tags that use this template. Currently, `true` is the only supported value.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1506 def delete_tag_template request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::DeleteTagTemplateRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_tag_template.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_tag_template.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_tag_template.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_tag_template, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload delete_tag_template_field
(request, options = nil)
Pass arguments to `delete_tag_template_field` via a request object, either of type {::Google::Cloud::DataCatalog::V1::DeleteTagTemplateFieldRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload delete_tag_template_field
(name: nil, force: nil)
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). @param name [::String] Required. The name of the tag template field to delete. @param force [::Boolean] Required. If true, deletes this field from any tags that use it. Currently, `true` is the only supported value.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Protobuf::Empty] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Protobuf::Empty]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1907 def delete_tag_template_field request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::DeleteTagTemplateFieldRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.delete_tag_template_field.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.delete_tag_template_field.timeout, metadata: metadata, retry_policy: @config.rpcs.delete_tag_template_field.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_tag_template_field, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets an entry.
@overload get_entry
(request, options = nil)
Pass arguments to `get_entry` via a request object, either of type {::Google::Cloud::DataCatalog::V1::GetEntryRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_entry
(name: nil)
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). @param name [::String] Required. The name of the entry to get.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::Entry] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::Entry]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1013 def get_entry request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::GetEntryRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_entry.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_entry.timeout, metadata: metadata, retry_policy: @config.rpcs.get_entry.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :get_entry, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets an entry group.
@overload get_entry_group
(request, options = nil)
Pass arguments to `get_entry_group` via a request object, either of type {::Google::Cloud::DataCatalog::V1::GetEntryGroupRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_entry_group
(name: nil, read_mask: nil)
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). @param name [::String] Required. The name of the entry group to get. @param read_mask [::Google::Protobuf::FieldMask, ::Hash] The fields to return. If empty or omitted, all fields are returned.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::EntryGroup] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::EntryGroup]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 443 def get_entry_group request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::GetEntryGroupRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_entry_group.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_entry_group.timeout, metadata: metadata, retry_policy: @config.rpcs.get_entry_group.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :get_entry_group, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets the access control policy for a resource.
May return:
-
A`NOT_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.
@overload get_iam_policy
(request, options = nil)
Pass arguments to `get_iam_policy` via a request object, either of type {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_iam_policy
(resource: nil, options: nil)
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). @param resource [::String] REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash] OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`. This field is only used by Cloud IAM.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Iam::V1::Policy] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Iam::V1::Policy]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 2397 def get_iam_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_iam_policy.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "resource" => request.resource } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, metadata: metadata, retry_policy: @config.rpcs.get_iam_policy.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :get_iam_policy, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets a tag template.
@overload get_tag_template
(request, options = nil)
Pass arguments to `get_tag_template` via a request object, either of type {::Google::Cloud::DataCatalog::V1::GetTagTemplateRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload get_tag_template
(name: nil)
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). @param name [::String] Required. The name of the tag template to get.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplate] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::TagTemplate]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1347 def get_tag_template request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::GetTagTemplateRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.get_tag_template.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.get_tag_template.timeout, metadata: metadata, retry_policy: @config.rpcs.get_tag_template.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :get_tag_template, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists entries.
@overload list_entries
(request, options = nil)
Pass arguments to `list_entries` via a request object, either of type {::Google::Cloud::DataCatalog::V1::ListEntriesRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_entries
(parent: nil, page_size: nil, page_token: nil, read_mask: nil)
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). @param parent [::String] Required. The name of the entry group that contains the entries to list. Can be provided in URL format. @param page_size [::Integer] The maximum number of items to return. Default is 10. Maximum limit is 1000. Throws an invalid argument if `page_size` is more than 1000. @param page_token [::String] Pagination token that specifies the next page to return. If empty, the first page is returned. @param 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.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Entry>] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Entry>]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1196 def list_entries request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::ListEntriesRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_entries.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_entries.timeout, metadata: metadata, retry_policy: @config.rpcs.list_entries.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :list_entries, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_entries, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Lists entry groups.
@overload list_entry_groups
(request, options = nil)
Pass arguments to `list_entry_groups` via a request object, either of type {::Google::Cloud::DataCatalog::V1::ListEntryGroupsRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload list_entry_groups
(parent: nil, page_size: nil, page_token: nil)
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). @param parent [::String] Required. The name of the location that contains the entry groups to list. Can be provided as a URL. @param 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. @param page_token [::String] Optional. Pagination token that specifies the next page to return. If empty, returns the first page.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::EntryGroup>] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::EntryGroup>]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 675 def list_entry_groups request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::ListEntryGroupsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.list_entry_groups.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "parent" => request.parent } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, metadata: metadata, retry_policy: @config.rpcs.list_entry_groups.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :list_entry_groups, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_entry_groups, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Gets an entry by its target resource name.
The resource name comes from the source Google
Cloud
Platform service.
@overload lookup_entry
(request, options = nil)
Pass arguments to `lookup_entry` via a request object, either of type {::Google::Cloud::DataCatalog::V1::LookupEntryRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload lookup_entry
(linked_resource: nil, sql_resource: nil, fully_qualified_name: nil)
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). @param linked_resource [::String] The full name of the Google Cloud Platform resource the Data Catalog entry represents. For more information, see [Full Resource Name] (https://cloud.google.com/apis/design/resource_names#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}` @param 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] (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). @param 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}`
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::Entry] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::Entry]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1120 def lookup_entry request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::LookupEntryRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.lookup_entry.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.lookup_entry.timeout, metadata: metadata, retry_policy: @config.rpcs.lookup_entry.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :lookup_entry, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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] (cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload rename_tag_template_field
(request, options = nil)
Pass arguments to `rename_tag_template_field` via a request object, either of type {::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload rename_tag_template_field
(name: nil, new_tag_template_field_id: nil)
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). @param name [::String] Required. The name of the tag template. @param new_tag_template_field_id [::String] Required. The new ID of this tag template field. For example, `my_new_field`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplateField] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::TagTemplateField]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1758 def rename_tag_template_field request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.rename_tag_template_field.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.rename_tag_template_field.timeout, metadata: metadata, retry_policy: @config.rpcs.rename_tag_template_field.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :rename_tag_template_field, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Renames an enum value in a tag template.
Within a single enum field, enum values must be unique.
@overload rename_tag_template_field_enum_value
(request, options = nil)
Pass arguments to `rename_tag_template_field_enum_value` via a request object, either of type {::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldEnumValueRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload rename_tag_template_field_enum_value
(name: nil, new_enum_value_display_name: nil)
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). @param name [::String] Required. The name of the enum field value. @param new_enum_value_display_name [::String] Required. The new display name of the enum value. For example, `my_new_enum_value`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplateField] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::TagTemplateField]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1830 def rename_tag_template_field_enum_value request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldEnumValueRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.rename_tag_template_field_enum_value.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.rename_tag_template_field_enum_value.timeout, metadata: metadata, retry_policy: @config.rpcs.rename_tag_template_field_enum_value.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :rename_tag_template_field_enum_value, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Searches Data Catalog for multiple resources like entries and tags that match a query.
This is a [Custom Method] (cloud.google.com/apis/design/custom_methods) 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] (cloud.google.com/data-catalog/docs/how-to/search-reference).
@overload search_catalog
(request, options = nil)
Pass arguments to `search_catalog` via a request object, either of type {::Google::Cloud::DataCatalog::V1::SearchCatalogRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload search_catalog
(scope: nil, query: nil, page_size: nil, page_token: nil, order_by: nil)
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). @param 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. @param query [::String] Optional. The query string with a minimum of 3 characters and specific syntax. For more information, see [Data Catalog search syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). 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` @param 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. @param 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 {::Google::Cloud::DataCatalog::V1::SearchCatalogResponse#next_page_token SearchCatalogResponse.next_page_token} field of the response to a previous {::Google::Cloud::DataCatalog::V1::DataCatalog::Client#search_catalog SearchCatalogRequest} call. @param 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 If this parameter is omitted, it defaults to the descending `relevance`.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::SearchCatalogResult>] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::SearchCatalogResult>]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 273 def search_catalog request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::SearchCatalogRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.search_catalog.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id options.apply_defaults timeout: @config.rpcs.search_catalog.timeout, metadata: metadata, retry_policy: @config.rpcs.search_catalog.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :search_catalog, request, options: options do |response, operation| response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :search_catalog, request, response, operation, options yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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.
@overload set_iam_policy
(request, options = nil)
Pass arguments to `set_iam_policy` via a request object, either of type {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload set_iam_policy
(resource: nil, policy: nil)
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). @param resource [::String] REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field. @param 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.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Iam::V1::Policy] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Iam::V1::Policy]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 2305 def set_iam_policy request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.set_iam_policy.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "resource" => request.resource } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, metadata: metadata, retry_policy: @config.rpcs.set_iam_policy.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :set_iam_policy, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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.
@overload test_iam_permissions
(request, options = nil)
Pass arguments to `test_iam_permissions` via a request object, either of type {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload test_iam_permissions
(resource: nil, permissions: nil)
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). @param resource [::String] REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. @param 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](https://cloud.google.com/iam/docs/overview#permissions).
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Iam::V1::TestIamPermissionsResponse]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 2484 def test_iam_permissions request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.test_iam_permissions.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "resource" => request.resource } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout, metadata: metadata, retry_policy: @config.rpcs.test_iam_permissions.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload update_entry
(request, options = nil)
Pass arguments to `update_entry` via a request object, either of type {::Google::Cloud::DataCatalog::V1::UpdateEntryRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_entry
(entry: nil, update_mask: nil)
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). @param entry [::Google::Cloud::DataCatalog::V1::Entry, ::Hash] Required. Updates for the entry. The `name` field must be set. @param 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`
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::Entry] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::Entry]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 868 def update_entry request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::UpdateEntryRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_entry.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "entry.name" => request.entry.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_entry.timeout, metadata: metadata, retry_policy: @config.rpcs.update_entry.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_entry, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload update_entry_group
(request, options = nil)
Pass arguments to `update_entry_group` via a request object, either of type {::Google::Cloud::DataCatalog::V1::UpdateEntryGroupRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_entry_group
(entry_group: nil, update_mask: nil)
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). @param entry_group [::Google::Cloud::DataCatalog::V1::EntryGroup, ::Hash] Required. Updates for the entry group. The `name` field must be set. @param 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.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::EntryGroup] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::EntryGroup]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 522 def update_entry_group request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::UpdateEntryGroupRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_entry_group.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "entry_group.name" => request.entry_group.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_entry_group.timeout, metadata: metadata, retry_policy: @config.rpcs.update_entry_group.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_entry_group, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
Updates an existing tag.
@overload update_tag
(request, options = nil)
Pass arguments to `update_tag` via a request object, either of type {::Google::Cloud::DataCatalog::V1::UpdateTagRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_tag
(tag: nil, update_mask: nil)
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). @param tag [::Google::Cloud::DataCatalog::V1::Tag, ::Hash] Required. The updated tag. The "name" field must be set. @param 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.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::Tag] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::Tag]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 2069 def update_tag request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::UpdateTagRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_tag.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "tag.name" => request.tag.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_tag.timeout, metadata: metadata, retry_policy: @config.rpcs.update_tag.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_tag, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload update_tag_template
(request, options = nil)
Pass arguments to `update_tag_template` via a request object, either of type {::Google::Cloud::DataCatalog::V1::UpdateTagTemplateRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_tag_template
(tag_template: nil, update_mask: nil)
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). @param tag_template [::Google::Cloud::DataCatalog::V1::TagTemplate, ::Hash] Required. The template to update. The `name` field must be set. @param update_mask [::Google::Protobuf::FieldMask, ::Hash] Names of fields whose values to overwrite on a tag template. Currently, only `display_name` 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.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplate] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::TagTemplate]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1430 def update_tag_template request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::UpdateTagTemplateRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_tag_template.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "tag_template.name" => request.tag_template.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_tag_template.timeout, metadata: metadata, retry_policy: @config.rpcs.update_tag_template.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_tag_template, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end
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](cloud.google.com/data-catalog/docs/concepts/resource-project).
@overload update_tag_template_field
(request, options = nil)
Pass arguments to `update_tag_template_field` via a request object, either of type {::Google::Cloud::DataCatalog::V1::UpdateTagTemplateFieldRequest} or an equivalent Hash. @param 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. @param options [::Gapic::CallOptions, ::Hash] Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
@overload update_tag_template_field
(name: nil, tag_template_field: nil, update_mask: nil)
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). @param name [::String] Required. The name of the tag template field. @param tag_template_field [::Google::Cloud::DataCatalog::V1::TagTemplateField, ::Hash] Required. The template to update. @param 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.
@yield [response, operation] Access the result along with the RPC operation @yieldparam response [::Google::Cloud::DataCatalog::V1::TagTemplateField] @yieldparam operation [::GRPC::ActiveCall::Operation]
@return [::Google::Cloud::DataCatalog::V1::TagTemplateField]
@raise [::Google::Cloud::Error] if the RPC is aborted.
# File lib/google/cloud/data_catalog/v1/data_catalog/client.rb, line 1684 def update_tag_template_field request, options = nil raise ::ArgumentError, "request must be provided" if request.nil? request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::UpdateTagTemplateFieldRequest # Converts hash and nil to an options object options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h # Customize the options with defaults metadata = @config.rpcs.update_tag_template_field.metadata.to_h # Set x-goog-api-client and x-goog-user-project headers metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ lib_name: @config.lib_name, lib_version: @config.lib_version, gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id header_params = { "name" => request.name } request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") metadata[:"x-goog-request-params"] ||= request_params_header options.apply_defaults timeout: @config.rpcs.update_tag_template_field.timeout, metadata: metadata, retry_policy: @config.rpcs.update_tag_template_field.retry_policy options.apply_defaults timeout: @config.timeout, metadata: @config.metadata, retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_tag_template_field, request, options: options do |response, operation| yield response, operation if block_given? return response end rescue ::GRPC::BadStatus => e raise ::Google::Cloud::Error.from_error(e) end