Class: Google::Cloud::DataCatalog::V1::DataCatalog::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/data_catalog/v1/data_catalog/client.rb

Overview

Client for the DataCatalog service.

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

Defined Under Namespace

Classes: Configuration

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#entry_group_path, #entry_path, #location_path, #tag_path, #tag_template_field_enum_value_path, #tag_template_field_path, #tag_template_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new DataCatalog client object.

Examples

To create a new DataCatalog client with the default configuration:

client = ::Google::Cloud::DataCatalog::V1::DataCatalog::Client.new

To create a new DataCatalog client with a custom configuration:

client = ::Google::Cloud::DataCatalog::V1::DataCatalog::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the DataCatalog client.

Yield Parameters:



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 181

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 scope and endpoint are unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.scope == Client.configure.scope &&
                           @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

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the DataCatalog Client class.

See Configuration for a description of the configuration fields.

Example

To modify the configuration for all DataCatalog clients:

::Google::Cloud::DataCatalog::V1::DataCatalog::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 58

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

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the DataCatalog Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



156
157
158
159
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 156

def configure
  yield @config if block_given?
  @config
end

#create_entry(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry #create_entry(parent: nil, entry_id: nil, entry: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

Creates an entry. Only entries of types 'FILESET', 'CLUSTER', 'DATA_STREAM' or with a user-specified type can be created.

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

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

Overloads:

  • #create_entry(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

    Pass arguments to create_entry via a request object, either of type CreateEntryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::CreateEntryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_entry(parent: nil, entry_id: nil, entry: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

    Pass arguments to create_entry via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The name of the entry group this entry belongs to. Example:

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

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

    • entry_id (::String) (defaults to: nil)

      Required. The ID of the entry to create.

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

    • entry (::Google::Cloud::DataCatalog::V1::Entry, ::Hash) (defaults to: nil)

      Required. The entry to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 773

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
   = @config.rpcs.create_entry..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_entry.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_entry.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#create_entry_group(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup #create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

Creates an EntryGroup.

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

Data Catalog automatically creates an entry group for BigQuery entries ("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own entry group to contain Cloud Storage fileset entries or custom type entries, and the IAM policies associated with those entries. Entry groups, like entries, can be searched.

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

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

Overloads:

  • #create_entry_group(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

    Pass arguments to create_entry_group via a request object, either of type CreateEntryGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::CreateEntryGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_entry_group(parent: nil, entry_group_id: nil, entry_group: nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

    Pass arguments to create_entry_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The name of the project this entry group belongs to. Example:

      projects/{project_id}/locations/{location}

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

    • entry_group_id (::String) (defaults to: nil)

      Required. The ID of the entry group to create.

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

    • entry_group (::Google::Cloud::DataCatalog::V1::EntryGroup, ::Hash) (defaults to: nil)

      The entry group to create. Defaults to an empty entry group.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 392

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
   = @config.rpcs.create_entry_group..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_entry_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_entry_group.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#create_tag(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Tag #create_tag(parent: nil, tag: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Tag

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

Overloads:

  • #create_tag(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Tag

    Pass arguments to create_tag via a request object, either of type CreateTagRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::CreateTagRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_tag(parent: nil, tag: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Tag

    Pass arguments to create_tag via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The name of the resource to attach this tag to. Tags can be attached to entries. An entry can have up to 1000 attached tags. Example:

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

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

    • tag (::Google::Cloud::DataCatalog::V1::Tag, ::Hash) (defaults to: nil)

      Required. The tag to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1974

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
   = @config.rpcs.create_tag..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_tag.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tag.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#create_tag_template(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate #create_tag_template(parent: nil, tag_template_id: nil, tag_template: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

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

Overloads:

  • #create_tag_template(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

    Pass arguments to create_tag_template via a request object, either of type CreateTagTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::CreateTagTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_tag_template(parent: nil, tag_template_id: nil, tag_template: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

    Pass arguments to create_tag_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

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

      Example:

      • projects/{project_id}/locations/us-central1
    • tag_template_id (::String) (defaults to: nil)

      Required. The ID of the tag template to create.

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

    • tag_template (::Google::Cloud::DataCatalog::V1::TagTemplate, ::Hash) (defaults to: nil)

      Required. The tag template to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1273

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
   = @config.rpcs.create_tag_template..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_tag_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tag_template.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#create_tag_template_field(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField #create_tag_template_field(parent: nil, tag_template_field_id: nil, tag_template_field: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

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

Overloads:

  • #create_tag_template_field(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

    Pass arguments to create_tag_template_field via a request object, either of type CreateTagTemplateFieldRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::CreateTagTemplateFieldRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #create_tag_template_field(parent: nil, tag_template_field_id: nil, tag_template_field: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

    Pass arguments to create_tag_template_field via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

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

      Example:

      • projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
    • tag_template_field_id (::String) (defaults to: nil)

      Required. The ID of the tag template field to create.

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

      Field IDs can contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs must also be unique within their template.

    • tag_template_field (::Google::Cloud::DataCatalog::V1::TagTemplateField, ::Hash) (defaults to: nil)

      Required. The tag template field to create.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1582

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
   = @config.rpcs.create_tag_template_field..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.create_tag_template_field.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_tag_template_field.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#delete_entry(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_entry(name: nil) ⇒ ::Google::Protobuf::Empty

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

Overloads:

  • #delete_entry(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_entry via a request object, either of type Google::Cloud::DataCatalog::V1::DeleteEntryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::DeleteEntryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_entry(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_entry via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the entry. Example:

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 942

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
   = @config.rpcs.delete_entry..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_entry.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_entry.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#delete_entry_group(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_entry_group(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

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

Overloads:

  • #delete_entry_group(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_entry_group via a request object, either of type Google::Cloud::DataCatalog::V1::DeleteEntryGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::DeleteEntryGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_entry_group(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_entry_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the entry group. For example, projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}.

    • force (::Boolean) (defaults to: nil)

      Optional. If true, deletes all entries in the entry group.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 610

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
   = @config.rpcs.delete_entry_group..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_entry_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_entry_group.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#delete_tag(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_tag(name: nil) ⇒ ::Google::Protobuf::Empty

Deletes a tag.

Overloads:

  • #delete_tag(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_tag via a request object, either of type Google::Cloud::DataCatalog::V1::DeleteTagRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::DeleteTagRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_tag(name: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_tag via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2115

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
   = @config.rpcs.delete_tag..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_tag.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tag.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#delete_tag_template(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_tag_template(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

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

Overloads:

  • #delete_tag_template(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_tag_template via a request object, either of type Google::Cloud::DataCatalog::V1::DeleteTagTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::DeleteTagTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_tag_template(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_tag_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

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

      • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
    • force (::Boolean) (defaults to: nil)

      Required. Currently, this field must always be set to true. This confirms the deletion of any possible tags using this template. force = false will be supported in the future.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1496

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
   = @config.rpcs.delete_tag_template..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_tag_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tag_template.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#delete_tag_template_field(request, options = nil) ⇒ ::Google::Protobuf::Empty #delete_tag_template_field(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

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

Overloads:

  • #delete_tag_template_field(request, options = nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_tag_template_field via a request object, either of type Google::Cloud::DataCatalog::V1::DeleteTagTemplateFieldRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::DeleteTagTemplateFieldRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #delete_tag_template_field(name: nil, force: nil) ⇒ ::Google::Protobuf::Empty

    Pass arguments to delete_tag_template_field via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

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

      • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
    • force (::Boolean) (defaults to: nil)

      Required. Currently, this field must always be set to true. This confirms the deletion of this field from any tags using this field. force = false will be supported in the future.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1894

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
   = @config.rpcs.delete_tag_template_field..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.delete_tag_template_field.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_tag_template_field.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#get_entry(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry #get_entry(name: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

Gets an entry.

Overloads:

  • #get_entry(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

    Pass arguments to get_entry via a request object, either of type GetEntryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::GetEntryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_entry(name: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

    Pass arguments to get_entry via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the entry. Example:

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1010

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
   = @config.rpcs.get_entry..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_entry.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_entry.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#get_entry_group(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup #get_entry_group(name: nil, read_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

Gets an EntryGroup.

Overloads:

  • #get_entry_group(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

    Pass arguments to get_entry_group via a request object, either of type GetEntryGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::GetEntryGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_entry_group(name: nil, read_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

    Pass arguments to get_entry_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the entry group. For example, projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The fields to return. If not set or empty, all fields are returned.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 461

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
   = @config.rpcs.get_entry_group..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_entry_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_entry_group.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#get_iam_policy(request, options = nil) ⇒ ::Google::Iam::V1::Policy #get_iam_policy(resource: nil, options: nil) ⇒ ::Google::Iam::V1::Policy

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

Supported resources are:

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

Callers must have following Google IAM permission

  • datacatalog.tagTemplates.getIamPolicy to get policies on tag templates.
  • datacatalog.entries.getIamPolicy to get policies on entries.
  • datacatalog.entryGroups.getIamPolicy to get policies on entry groups.

Overloads:

  • #get_iam_policy(request, options = nil) ⇒ ::Google::Iam::V1::Policy

    Pass arguments to get_iam_policy via a request object, either of type Iam::V1::GetIamPolicyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Iam::V1::GetIamPolicyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_iam_policy(resource: nil, options: nil) ⇒ ::Google::Iam::V1::Policy

    Pass arguments to get_iam_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • resource (::String) (defaults to: nil)

      REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

    • options (::Google::Iam::V1::GetPolicyOptions, ::Hash) (defaults to: nil)

      OPTIONAL: A GetPolicyOptions object for specifying options to GetIamPolicy. This field is only used by Cloud IAM.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2364

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
   = @config.rpcs.get_iam_policy..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_iam_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_iam_policy.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#get_tag_template(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate #get_tag_template(name: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

Gets a tag template.

Overloads:

  • #get_tag_template(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

    Pass arguments to get_tag_template via a request object, either of type GetTagTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::GetTagTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #get_tag_template(name: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

    Pass arguments to get_tag_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the tag template. Example:

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1341

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
   = @config.rpcs.get_tag_template..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.get_tag_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_tag_template.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

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

Lists entries.

Overloads:

  • #list_entries(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Entry>

    Pass arguments to list_entries via a request object, either of type ListEntriesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::ListEntriesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_entries(parent: nil, page_size: nil, page_token: nil, read_mask: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Entry>

    Pass arguments to list_entries via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

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

      • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
    • page_size (::Integer) (defaults to: nil)

      The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for page_size > 1000.

    • page_token (::String) (defaults to: nil)

      Token that specifies which page is requested. If empty, the first page is returned.

    • read_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      The fields to return for each Entry. If not set or empty, all fields are returned. For example, setting read_mask to contain only one path "name" will cause ListEntries to return a list of Entries with only "name" field.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1189

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
   = @config.rpcs.list_entries..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_entries.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_entries.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

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

Lists entry groups.

Overloads:

  • #list_entry_groups(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::EntryGroup>

    Pass arguments to list_entry_groups via a request object, either of type ListEntryGroupsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::ListEntryGroupsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_entry_groups(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::EntryGroup>

    Pass arguments to list_entry_groups via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

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

      • projects/{project_id}/locations/{location}
    • page_size (::Integer) (defaults to: nil)

      Optional. The maximum number of items to return. Default is 10. Max limit is 1000. Throws an invalid argument for page_size > 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Token that specifies which page is requested. If empty, the first page is returned.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 685

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
   = @config.rpcs.list_entry_groups..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_entry_groups.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_entry_groups.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#list_tags(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Tag> #list_tags(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Tag>

Lists the tags on an Entry.

Overloads:

  • #list_tags(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Tag>

    Pass arguments to list_tags via a request object, either of type ListTagsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::ListTagsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #list_tags(parent: nil, page_size: nil, page_token: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Tag>

    Pass arguments to list_tags via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

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

      Examples:

      • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
      • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
    • page_size (::Integer) (defaults to: nil)

      The maximum number of tags to return. Default is 10. Max limit is 1000.

    • page_token (::String) (defaults to: nil)

      Token that specifies which page is requested. If empty, the first page is returned.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2193

def list_tags request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::ListTagsRequest

  # 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
   = @config.rpcs.list_tags..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.list_tags.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_tags.retry_policy
  options.apply_defaults metadata:     @config.,
                         retry_policy: @config.retry_policy

  @data_catalog_stub.call_rpc :list_tags, request, options: options do |response, operation|
    response = ::Gapic::PagedEnumerable.new @data_catalog_stub, :list_tags, 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

#lookup_entry(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry #lookup_entry(linked_resource: nil, sql_resource: nil, fully_qualified_name: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

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

Overloads:

  • #lookup_entry(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

    Pass arguments to lookup_entry via a request object, either of type LookupEntryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::LookupEntryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #lookup_entry(linked_resource: nil, sql_resource: nil, fully_qualified_name: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

    Pass arguments to lookup_entry via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • linked_resource (::String) (defaults to: nil)

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

      Examples:

      • //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
      • //pubsub.googleapis.com/projects/projectId/topics/topicId
    • sql_resource (::String) (defaults to: nil)

      The SQL name of the entry. SQL names are case-sensitive.

      Examples:

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

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

    • fully_qualified_name (::String) (defaults to: nil)

      Fully qualified name (FQN) of the resource.

      FQNs take two forms:

      • For non-regionalized resources:

      {SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}

      • For regionalized resources:

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

      Example for a DPMS table:

      dataproc_metastore:project_id.location_id.instance_id.database_id.table_id

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1115

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
   = @config.rpcs.lookup_entry..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.lookup_entry.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.lookup_entry.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#rename_tag_template_field(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField #rename_tag_template_field(name: nil, new_tag_template_field_id: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

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

Overloads:

  • #rename_tag_template_field(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

    Pass arguments to rename_tag_template_field via a request object, either of type RenameTagTemplateFieldRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #rename_tag_template_field(name: nil, new_tag_template_field_id: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

    Pass arguments to rename_tag_template_field via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The name of the tag template. Example:

      • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
    • new_tag_template_field_id (::String) (defaults to: nil)

      Required. The new ID of this tag template field. For example, my_new_field.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1747

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
   = @config.rpcs.rename_tag_template_field..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.rename_tag_template_field.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.rename_tag_template_field.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#rename_tag_template_field_enum_value(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField #rename_tag_template_field_enum_value(name: nil, new_enum_value_display_name: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

Renames an enum value in a tag template. The enum values have to be unique within one enum field.

Overloads:

  • #rename_tag_template_field_enum_value(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

    Pass arguments to rename_tag_template_field_enum_value via a request object, either of type RenameTagTemplateFieldEnumValueRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::RenameTagTemplateFieldEnumValueRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #rename_tag_template_field_enum_value(name: nil, new_enum_value_display_name: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

    Pass arguments to rename_tag_template_field_enum_value via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

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

      • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}
    • new_enum_value_display_name (::String) (defaults to: nil)

      Required. The new display name of the enum value. For example, my_new_enum_value.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1818

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
   = @config.rpcs.rename_tag_template_field_enum_value..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.rename_tag_template_field_enum_value.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.rename_tag_template_field_enum_value.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

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

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

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

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

See Data Catalog Search Syntax for more information.

Overloads:

  • #search_catalog(request, options = nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::SearchCatalogResult>

    Pass arguments to search_catalog via a request object, either of type SearchCatalogRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::SearchCatalogRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #search_catalog(scope: nil, query: nil, page_size: nil, page_token: nil, order_by: nil) ⇒ ::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::SearchCatalogResult>

    Pass arguments to search_catalog via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • scope (::Google::Cloud::DataCatalog::V1::SearchCatalogRequest::Scope, ::Hash) (defaults to: nil)

      Required. The scope of this search request. A scope that has empty include_org_ids, include_project_ids AND false include_gcp_public_datasets is considered invalid. Data Catalog will return an error in such a case.

    • query (::String) (defaults to: nil)

      Optional. The query string in search query syntax. An empty query string will result in all data assets (in the specified scope) that the user has access to.

      Query strings can be simple as "x" or more qualified as:

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

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

    • page_size (::Integer) (defaults to: nil)

      Number of results in the search page. If <=0 then defaults to 10. Max limit for page_size is 1000. Throws an invalid argument for page_size > 1000.

    • page_token (::String) (defaults to: nil)

      Optional. Pagination token returned in an earlier SearchCatalogResponse.next_page_token, which indicates that this is a continuation of a prior SearchCatalogRequest call, and that the system should return the next page of data. If empty, the first page is returned.

    • order_by (::String) (defaults to: nil)

      Specifies the ordering of results, currently supported case-sensitive choices are:

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

      If not specified, defaults to relevance descending.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 300

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
   = @config.rpcs.search_catalog..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.search_catalog.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.search_catalog.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#set_iam_policy(request, options = nil) ⇒ ::Google::Iam::V1::Policy #set_iam_policy(resource: nil, policy: nil) ⇒ ::Google::Iam::V1::Policy

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

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

Callers must have following Google IAM permission

  • datacatalog.tagTemplates.setIamPolicy to set policies on tag templates.
  • datacatalog.entries.setIamPolicy to set policies on entries.
  • datacatalog.entryGroups.setIamPolicy to set policies on entry groups.

Overloads:

  • #set_iam_policy(request, options = nil) ⇒ ::Google::Iam::V1::Policy

    Pass arguments to set_iam_policy via a request object, either of type Iam::V1::SetIamPolicyRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Iam::V1::SetIamPolicyRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #set_iam_policy(resource: nil, policy: nil) ⇒ ::Google::Iam::V1::Policy

    Pass arguments to set_iam_policy via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • resource (::String) (defaults to: nil)

      REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

    • policy (::Google::Iam::V1::Policy, ::Hash) (defaults to: nil)

      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.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2279

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
   = @config.rpcs.set_iam_policy..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.set_iam_policy.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.set_iam_policy.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#test_iam_permissions(request, options = nil) ⇒ ::Google::Iam::V1::TestIamPermissionsResponse #test_iam_permissions(resource: nil, permissions: nil) ⇒ ::Google::Iam::V1::TestIamPermissionsResponse

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

Supported resources are:

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

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

Overloads:

  • #test_iam_permissions(request, options = nil) ⇒ ::Google::Iam::V1::TestIamPermissionsResponse

    Pass arguments to test_iam_permissions via a request object, either of type Iam::V1::TestIamPermissionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Iam::V1::TestIamPermissionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #test_iam_permissions(resource: nil, permissions: nil) ⇒ ::Google::Iam::V1::TestIamPermissionsResponse

    Pass arguments to test_iam_permissions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • resource (::String) (defaults to: nil)

      REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

    • permissions (::Array<::String>) (defaults to: nil)

      The set of permissions to check for the resource. Permissions with wildcards (such as '' or 'storage.') are not allowed. For more information see IAM Overview.

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2448

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
   = @config.rpcs.test_iam_permissions..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.test_iam_permissions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.test_iam_permissions.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#update_entry(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry #update_entry(entry: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

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

Overloads:

  • #update_entry(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

    Pass arguments to update_entry via a request object, either of type UpdateEntryRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::UpdateEntryRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_entry(entry: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Entry

    Pass arguments to update_entry via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • entry (::Google::Cloud::DataCatalog::V1::Entry, ::Hash) (defaults to: nil)

      Required. The updated entry. The "name" field must be set.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Names of fields whose values to overwrite on an entry.

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

      The following fields are modifiable:

      • For entries with type DATA_STREAM:
        • schema
      • For entries with type FILESET:
        • schema
        • display_name
        • description
        • gcs_fileset_spec
        • gcs_fileset_spec.file_patterns
      • For entries with user_specified_type:
        • schema
        • display_name
        • description
        • user_specified_type
        • user_specified_system
        • linked_resource
        • source_system_timestamps

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
# 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
   = @config.rpcs.update_entry..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_entry.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_entry.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#update_entry_group(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup #update_entry_group(entry_group: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

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

Overloads:

  • #update_entry_group(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

    Pass arguments to update_entry_group via a request object, either of type UpdateEntryGroupRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::UpdateEntryGroupRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_entry_group(entry_group: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::EntryGroup

    Pass arguments to update_entry_group via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • entry_group (::Google::Cloud::DataCatalog::V1::EntryGroup, ::Hash) (defaults to: nil)

      Required. The updated entry group. "name" field must be set.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Names of fields whose values to overwrite on an entry group.

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 537

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
   = @config.rpcs.update_entry_group..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_entry_group.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_entry_group.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#update_tag(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Tag #update_tag(tag: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Tag

Updates an existing tag.

Overloads:

  • #update_tag(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::Tag

    Pass arguments to update_tag via a request object, either of type UpdateTagRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::UpdateTagRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_tag(tag: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::Tag

    Pass arguments to update_tag via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • tag (::Google::Cloud::DataCatalog::V1::Tag, ::Hash) (defaults to: nil)

      Required. The updated tag. The "name" field must be set.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2047

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
   = @config.rpcs.update_tag..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_tag.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tag.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#update_tag_template(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate #update_tag_template(tag_template: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

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

Overloads:

  • #update_tag_template(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

    Pass arguments to update_tag_template via a request object, either of type UpdateTagTemplateRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::UpdateTagTemplateRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_tag_template(tag_template: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplate

    Pass arguments to update_tag_template via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • tag_template (::Google::Cloud::DataCatalog::V1::TagTemplate, ::Hash) (defaults to: nil)

      Required. The template to update. The "name" field must be set.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Names of fields whose values to overwrite on a tag template. Currently, only display_name can be overwritten.

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1420

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
   = @config.rpcs.update_tag_template..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_tag_template.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tag_template.retry_policy
  options.apply_defaults metadata:     @config.,
                         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

#update_tag_template_field(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField #update_tag_template_field(name: nil, tag_template_field: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

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

Overloads:

  • #update_tag_template_field(request, options = nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

    Pass arguments to update_tag_template_field via a request object, either of type UpdateTagTemplateFieldRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::DataCatalog::V1::UpdateTagTemplateFieldRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.

  • #update_tag_template_field(name: nil, tag_template_field: nil, update_mask: nil) ⇒ ::Google::Cloud::DataCatalog::V1::TagTemplateField

    Pass arguments to update_tag_template_field via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

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

      • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
    • tag_template_field (::Google::Cloud::DataCatalog::V1::TagTemplateField, ::Hash) (defaults to: nil)

      Required. The template to update.

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Names of fields whose values to overwrite on an individual field of a tag template. The following fields are modifiable:

      • display_name
      • type.enum_type
      • is_required

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

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

Yields:

  • (response, operation)

    Access the result along with the RPC operation

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the RPC is aborted.



1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1673

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
   = @config.rpcs.update_tag_template_field..to_h

  # Set x-goog-api-client and x-goog-user-project headers
  [:"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
  [:"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("&")
  [:"x-goog-request-params"] ||= request_params_header

  options.apply_defaults timeout:      @config.rpcs.update_tag_template_field.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_tag_template_field.retry_policy
  options.apply_defaults metadata:     @config.,
                         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