Class: Google::Cloud::DataCatalog::V1::DataCatalog::Client
- Inherits:
-
Object
- Object
- Google::Cloud::DataCatalog::V1::DataCatalog::Client
- 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
-
.configure {|config| ... } ⇒ Client::Configuration
Configure the DataCatalog Client class.
Instance Method Summary collapse
-
#configure {|config| ... } ⇒ Client::Configuration
Configure the DataCatalog Client instance.
-
#create_entry(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::Entry
Creates an entry.
-
#create_entry_group(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::EntryGroup
Creates an EntryGroup.
-
#create_tag(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::Tag
Creates a tag on an Entry.
-
#create_tag_template(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::TagTemplate
Creates a tag template.
-
#create_tag_template_field(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::TagTemplateField
Creates a field in a tag template.
-
#delete_entry(request, options = nil) {|response, operation| ... } ⇒ Google::Protobuf::Empty
Deletes an existing entry.
-
#delete_entry_group(request, options = nil) {|response, operation| ... } ⇒ Google::Protobuf::Empty
Deletes an EntryGroup.
-
#delete_tag(request, options = nil) {|response, operation| ... } ⇒ Google::Protobuf::Empty
Deletes a tag.
-
#delete_tag_template(request, options = nil) {|response, operation| ... } ⇒ Google::Protobuf::Empty
Deletes a tag template and all tags using the template.
-
#delete_tag_template_field(request, options = nil) {|response, operation| ... } ⇒ Google::Protobuf::Empty
Deletes a field in a tag template and all uses of that field.
-
#get_entry(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::Entry
Gets an entry.
-
#get_entry_group(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::EntryGroup
Gets an EntryGroup.
-
#get_iam_policy(request, options = nil) {|response, operation| ... } ⇒ Google::Iam::V1::Policy
Gets the access control policy for a resource.
-
#get_tag_template(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::TagTemplate
Gets a tag template.
-
#initialize {|config| ... } ⇒ Client
constructor
Create a new DataCatalog client object.
-
#list_entries(request, options = nil) {|response, operation| ... } ⇒ Gapic::PagedEnumerable<Google::Cloud::DataCatalog::V1::Entry>
Lists entries.
-
#list_entry_groups(request, options = nil) {|response, operation| ... } ⇒ Gapic::PagedEnumerable<Google::Cloud::DataCatalog::V1::EntryGroup>
Lists entry groups.
-
#list_tags(request, options = nil) {|response, operation| ... } ⇒ Gapic::PagedEnumerable<Google::Cloud::DataCatalog::V1::Tag>
Lists the tags on an Entry.
-
#lookup_entry(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::Entry
Get an entry by target resource name.
-
#rename_tag_template_field(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::TagTemplateField
Renames a field in a tag template.
-
#search_catalog(request, options = nil) {|response, operation| ... } ⇒ Gapic::PagedEnumerable<Google::Cloud::DataCatalog::V1::SearchCatalogResult>
Searches Data Catalog for multiple resources like entries, tags that match a query.
-
#set_iam_policy(request, options = nil) {|response, operation| ... } ⇒ Google::Iam::V1::Policy
Sets the access control policy for a resource.
-
#test_iam_permissions(request, options = nil) {|response, operation| ... } ⇒ Google::Iam::V1::TestIamPermissionsResponse
Returns the caller's permissions on a resource.
-
#update_entry(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::Entry
Updates an existing entry.
-
#update_entry_group(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::EntryGroup
Updates an EntryGroup.
-
#update_tag(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::Tag
Updates an existing tag.
-
#update_tag_template(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::TagTemplate
Updates a tag template.
-
#update_tag_template_field(request, options = nil) {|response, operation| ... } ⇒ Google::Cloud::DataCatalog::V1::TagTemplateField
Updates a field in a tag template.
Methods included from Paths
#entry_group_path, #entry_path, #location_path, #tag_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_000
end
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 |
# 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 credentials ||= Credentials.default scope: @config.scope if credentials.is_a?(String) || credentials.is_a?(Hash) credentials = Credentials.new credentials, scope: @config.scope end @quota_project_id = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil @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_000
end
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: ["UNAVAILABLE"] } 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: ["UNAVAILABLE"] } 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: ["UNAVAILABLE"] } 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: ["UNAVAILABLE"] } 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: ["UNAVAILABLE"] } 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: ["UNAVAILABLE"] } default_config.rpcs..timeout = 60.0 default_config.rpcs..retry_policy = { initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: ["UNAVAILABLE"] } 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: ["UNAVAILABLE"] } 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.
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 'FILESET' type or user-specified type can be created.
Users should enable the Data Catalog API in the project identified by
the parent
parameter (see Data Catalog Resource Project for more information).
A maximum of 100,000 entries may be created per entry group.
750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 750 def create_entry request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.create_entry.timeout, metadata: , retry_policy: @config.rpcs.create_entry.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_entry, request, 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).
379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 379 def create_entry_group request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.create_entry_group.timeout, metadata: , retry_policy: @config.rpcs.create_entry_group.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_entry_group, request, 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.
1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1846 def create_tag request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.create_tag.timeout, metadata: , retry_policy: @config.rpcs.create_tag.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_tag, request, 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).
1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1224 def create_tag_template request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.create_tag_template.timeout, metadata: , retry_policy: @config.rpcs.create_tag_template.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_tag_template, request, 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).
1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1530 def create_tag_template_field request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.create_tag_template_field.timeout, metadata: , retry_policy: @config.rpcs.create_tag_template_field.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :create_tag_template_field, request, 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).
913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 913 def delete_entry request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.delete_entry.timeout, metadata: , retry_policy: @config.rpcs.delete_entry.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_entry, request, 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).
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 592 def delete_entry_group request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.delete_entry_group.timeout, metadata: , retry_policy: @config.rpcs.delete_entry_group.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_entry_group, request, 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.
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 2010 2011 2012 2013 2014 2015 2016 2017 2018 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1983 def delete_tag request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.delete_tag.timeout, metadata: , retry_policy: @config.rpcs.delete_tag.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_tag, request, 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).
1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1446 def delete_tag_template request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.delete_tag_template.timeout, metadata: , retry_policy: @config.rpcs.delete_tag_template.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_tag_template, request, 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).
1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1766 def delete_tag_template_field request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.delete_tag_template_field.timeout, metadata: , retry_policy: @config.rpcs.delete_tag_template_field.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :delete_tag_template_field, request, 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.
981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 981 def get_entry request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.get_entry.timeout, metadata: , retry_policy: @config.rpcs.get_entry.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :get_entry, request, 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.
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 448 def get_entry_group request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.get_entry_group.timeout, metadata: , retry_policy: @config.rpcs.get_entry_group.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :get_entry_group, request, 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.
2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2232 def get_iam_policy request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.get_iam_policy.timeout, metadata: , retry_policy: @config.rpcs.get_iam_policy.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :get_iam_policy, request, 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.
1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1292 def get_tag_template request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.get_tag_template.timeout, metadata: , retry_policy: @config.rpcs.get_tag_template.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :get_tag_template, request, 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.
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1144 def list_entries request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.list_entries.timeout, metadata: , retry_policy: @config.rpcs.list_entries.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :list_entries, request, options: do |response, operation| response = Gapic::PagedEnumerable.new @data_catalog_stub, :list_entries, request, response, operation, 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.
667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 667 def list_entry_groups request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.list_entry_groups.timeout, metadata: , retry_policy: @config.rpcs.list_entry_groups.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :list_entry_groups, request, options: do |response, operation| response = Gapic::PagedEnumerable.new @data_catalog_stub, :list_entry_groups, request, response, operation, 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.
2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2061 def request, = 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 = Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs...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 .apply_defaults timeout: @config.rpcs..timeout, metadata: , retry_policy: @config.rpcs..retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :list_tags, request, options: do |response, operation| response = Gapic::PagedEnumerable.new @data_catalog_stub, :list_tags, request, response, operation, 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) ⇒ 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.
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1070 def lookup_entry request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.lookup_entry.timeout, metadata: , retry_policy: @config.rpcs.lookup_entry.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :lookup_entry, request, 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).
1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1691 def rename_tag_template_field request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.rename_tag_template_field.timeout, metadata: , retry_policy: @config.rpcs.rename_tag_template_field.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :rename_tag_template_field, request, 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 subsequentally 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.
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 290 def search_catalog request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.search_catalog.timeout, metadata: , retry_policy: @config.rpcs.search_catalog.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :search_catalog, request, options: do |response, operation| response = Gapic::PagedEnumerable.new @data_catalog_stub, :search_catalog, request, response, operation, 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.
2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2147 def set_iam_policy request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.set_iam_policy.timeout, metadata: , retry_policy: @config.rpcs.set_iam_policy.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :set_iam_policy, request, 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.
2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 2316 def request, = 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 = Gapic::CallOptions.new(**.to_h) if .respond_to? :to_h # Customize the options with defaults = @config.rpcs...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 .apply_defaults timeout: @config.rpcs..timeout, metadata: , retry_policy: @config.rpcs..retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :test_iam_permissions, request, 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).
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 840 def update_entry request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.update_entry.timeout, metadata: , retry_policy: @config.rpcs.update_entry.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_entry, request, 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).
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 520 def update_entry_group request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.update_entry_group.timeout, metadata: , retry_policy: @config.rpcs.update_entry_group.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_entry_group, request, 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.
1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1915 def update_tag request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.update_tag.timeout, metadata: , retry_policy: @config.rpcs.update_tag.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_tag, request, 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).
1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1371 def update_tag_template request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.update_tag_template.timeout, metadata: , retry_policy: @config.rpcs.update_tag_template.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_tag_template, request, 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).
1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 |
# File 'lib/google/cloud/data_catalog/v1/data_catalog/client.rb', line 1618 def update_tag_template_field request, = 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 = Gapic::CallOptions.new(**.to_h) if .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 .apply_defaults timeout: @config.rpcs.update_tag_template_field.timeout, metadata: , retry_policy: @config.rpcs.update_tag_template_field.retry_policy .apply_defaults metadata: @config., retry_policy: @config.retry_policy @data_catalog_stub.call_rpc :update_tag_template_field, request, 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 |