google-cloud-data_catalog-v1 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/data_catalog/v1.rb +2 -0
- data/lib/google/cloud/data_catalog/v1/data_catalog/client.rb +182 -64
- data/lib/google/cloud/data_catalog/v1/data_catalog/paths.rb +23 -0
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager.rb +54 -0
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager/client.rb +1320 -0
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager/credentials.rb +51 -0
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager/paths.rb +90 -0
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization.rb +51 -0
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/client.rb +474 -0
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/credentials.rb +51 -0
- data/lib/google/cloud/data_catalog/v1/policy_tag_manager_serialization/paths.rb +69 -0
- data/lib/google/cloud/data_catalog/v1/version.rb +1 -1
- data/lib/google/cloud/datacatalog/v1/common_pb.rb +1 -0
- data/lib/google/cloud/datacatalog/v1/data_source_pb.rb +30 -0
- data/lib/google/cloud/datacatalog/v1/datacatalog_pb.rb +25 -0
- data/lib/google/cloud/datacatalog/v1/datacatalog_services_pb.rb +6 -3
- data/lib/google/cloud/datacatalog/v1/policytagmanager_pb.rb +107 -0
- data/lib/google/cloud/datacatalog/v1/policytagmanager_services_pb.rb +85 -0
- data/lib/google/cloud/datacatalog/v1/policytagmanagerserialization_pb.rb +70 -0
- data/lib/google/cloud/datacatalog/v1/policytagmanagerserialization_services_pb.rb +62 -0
- data/lib/google/cloud/datacatalog/v1/search_pb.rb +2 -0
- data/lib/google/cloud/datacatalog/v1/table_spec_pb.rb +1 -0
- data/lib/google/cloud/datacatalog/v1/tags_pb.rb +1 -0
- data/proto_docs/google/cloud/datacatalog/v1/common.rb +3 -0
- data/proto_docs/google/cloud/datacatalog/v1/data_source.rb +51 -0
- data/proto_docs/google/cloud/datacatalog/v1/datacatalog.rb +212 -111
- data/proto_docs/google/cloud/datacatalog/v1/policytagmanager.rb +292 -0
- data/proto_docs/google/cloud/datacatalog/v1/policytagmanagerserialization.rb +141 -0
- data/proto_docs/google/cloud/datacatalog/v1/schema.rb +16 -4
- data/proto_docs/google/cloud/datacatalog/v1/search.rb +14 -0
- data/proto_docs/google/cloud/datacatalog/v1/table_spec.rb +3 -0
- data/proto_docs/google/cloud/datacatalog/v1/tags.rb +44 -21
- metadata +20 -4
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "gapic/common"
|
20
|
+
require "gapic/config"
|
21
|
+
require "gapic/config/method"
|
22
|
+
|
23
|
+
require "google/cloud/data_catalog/v1/version"
|
24
|
+
|
25
|
+
require "google/cloud/data_catalog/v1/policy_tag_manager/credentials"
|
26
|
+
require "google/cloud/data_catalog/v1/policy_tag_manager/paths"
|
27
|
+
require "google/cloud/data_catalog/v1/policy_tag_manager/client"
|
28
|
+
|
29
|
+
module Google
|
30
|
+
module Cloud
|
31
|
+
module DataCatalog
|
32
|
+
module V1
|
33
|
+
##
|
34
|
+
# Policy Tag Manager API service allows clients to manage their policy tags and
|
35
|
+
# taxonomies.
|
36
|
+
#
|
37
|
+
# Policy tags are used to tag BigQuery columns and apply additional access
|
38
|
+
# control policies. A taxonomy is a hierarchical grouping of policy tags that
|
39
|
+
# classify data along a common axis.
|
40
|
+
#
|
41
|
+
# To load this service and instantiate a client:
|
42
|
+
#
|
43
|
+
# require "google/cloud/data_catalog/v1/policy_tag_manager"
|
44
|
+
# client = ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client.new
|
45
|
+
#
|
46
|
+
module PolicyTagManager
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
helper_path = ::File.join __dir__, "policy_tag_manager", "helpers.rb"
|
54
|
+
require "google/cloud/data_catalog/v1/policy_tag_manager/helpers" if ::File.file? helper_path
|
@@ -0,0 +1,1320 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2021 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/cloud/errors"
|
20
|
+
require "google/cloud/datacatalog/v1/policytagmanager_pb"
|
21
|
+
|
22
|
+
module Google
|
23
|
+
module Cloud
|
24
|
+
module DataCatalog
|
25
|
+
module V1
|
26
|
+
module PolicyTagManager
|
27
|
+
##
|
28
|
+
# Client for the PolicyTagManager service.
|
29
|
+
#
|
30
|
+
# Policy Tag Manager API service allows clients to manage their policy tags and
|
31
|
+
# taxonomies.
|
32
|
+
#
|
33
|
+
# Policy tags are used to tag BigQuery columns and apply additional access
|
34
|
+
# control policies. A taxonomy is a hierarchical grouping of policy tags that
|
35
|
+
# classify data along a common axis.
|
36
|
+
#
|
37
|
+
class Client
|
38
|
+
include Paths
|
39
|
+
|
40
|
+
# @private
|
41
|
+
attr_reader :policy_tag_manager_stub
|
42
|
+
|
43
|
+
##
|
44
|
+
# Configure the PolicyTagManager Client class.
|
45
|
+
#
|
46
|
+
# See {::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client::Configuration}
|
47
|
+
# for a description of the configuration fields.
|
48
|
+
#
|
49
|
+
# ## Example
|
50
|
+
#
|
51
|
+
# To modify the configuration for all PolicyTagManager clients:
|
52
|
+
#
|
53
|
+
# ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client.configure do |config|
|
54
|
+
# config.timeout = 10.0
|
55
|
+
# end
|
56
|
+
#
|
57
|
+
# @yield [config] Configure the Client client.
|
58
|
+
# @yieldparam config [Client::Configuration]
|
59
|
+
#
|
60
|
+
# @return [Client::Configuration]
|
61
|
+
#
|
62
|
+
def self.configure
|
63
|
+
@configure ||= begin
|
64
|
+
namespace = ["Google", "Cloud", "DataCatalog", "V1"]
|
65
|
+
parent_config = while namespace.any?
|
66
|
+
parent_name = namespace.join "::"
|
67
|
+
parent_const = const_get parent_name
|
68
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
69
|
+
namespace.pop
|
70
|
+
end
|
71
|
+
default_config = Client::Configuration.new parent_config
|
72
|
+
|
73
|
+
default_config.timeout = 60.0
|
74
|
+
|
75
|
+
default_config
|
76
|
+
end
|
77
|
+
yield @configure if block_given?
|
78
|
+
@configure
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Configure the PolicyTagManager Client instance.
|
83
|
+
#
|
84
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
85
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
86
|
+
# should be made on {Client.configure}.
|
87
|
+
#
|
88
|
+
# See {::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client::Configuration}
|
89
|
+
# for a description of the configuration fields.
|
90
|
+
#
|
91
|
+
# @yield [config] Configure the Client client.
|
92
|
+
# @yieldparam config [Client::Configuration]
|
93
|
+
#
|
94
|
+
# @return [Client::Configuration]
|
95
|
+
#
|
96
|
+
def configure
|
97
|
+
yield @config if block_given?
|
98
|
+
@config
|
99
|
+
end
|
100
|
+
|
101
|
+
##
|
102
|
+
# Create a new PolicyTagManager client object.
|
103
|
+
#
|
104
|
+
# ## Examples
|
105
|
+
#
|
106
|
+
# To create a new PolicyTagManager client with the default
|
107
|
+
# configuration:
|
108
|
+
#
|
109
|
+
# client = ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client.new
|
110
|
+
#
|
111
|
+
# To create a new PolicyTagManager client with a custom
|
112
|
+
# configuration:
|
113
|
+
#
|
114
|
+
# client = ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client.new do |config|
|
115
|
+
# config.timeout = 10.0
|
116
|
+
# end
|
117
|
+
#
|
118
|
+
# @yield [config] Configure the PolicyTagManager client.
|
119
|
+
# @yieldparam config [Client::Configuration]
|
120
|
+
#
|
121
|
+
def initialize
|
122
|
+
# These require statements are intentionally placed here to initialize
|
123
|
+
# the gRPC module only when it's required.
|
124
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
125
|
+
require "gapic/grpc"
|
126
|
+
require "google/cloud/datacatalog/v1/policytagmanager_services_pb"
|
127
|
+
|
128
|
+
# Create the configuration object
|
129
|
+
@config = Configuration.new Client.configure
|
130
|
+
|
131
|
+
# Yield the configuration if needed
|
132
|
+
yield @config if block_given?
|
133
|
+
|
134
|
+
# Create credentials
|
135
|
+
credentials = @config.credentials
|
136
|
+
# Use self-signed JWT if the scope and endpoint are unchanged from default,
|
137
|
+
# but only if the default endpoint does not have a region prefix.
|
138
|
+
enable_self_signed_jwt = @config.scope == Client.configure.scope &&
|
139
|
+
@config.endpoint == Client.configure.endpoint &&
|
140
|
+
!@config.endpoint.split(".").first.include?("-")
|
141
|
+
credentials ||= Credentials.default scope: @config.scope,
|
142
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
143
|
+
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
144
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
145
|
+
end
|
146
|
+
@quota_project_id = @config.quota_project
|
147
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
148
|
+
|
149
|
+
@policy_tag_manager_stub = ::Gapic::ServiceStub.new(
|
150
|
+
::Google::Cloud::DataCatalog::V1::PolicyTagManager::Stub,
|
151
|
+
credentials: credentials,
|
152
|
+
endpoint: @config.endpoint,
|
153
|
+
channel_args: @config.channel_args,
|
154
|
+
interceptors: @config.interceptors
|
155
|
+
)
|
156
|
+
end
|
157
|
+
|
158
|
+
# Service calls
|
159
|
+
|
160
|
+
##
|
161
|
+
# Creates a taxonomy in a specified project. The taxonomy is initially empty,
|
162
|
+
# i.e., does not contain policy tags.
|
163
|
+
#
|
164
|
+
# @overload create_taxonomy(request, options = nil)
|
165
|
+
# Pass arguments to `create_taxonomy` via a request object, either of type
|
166
|
+
# {::Google::Cloud::DataCatalog::V1::CreateTaxonomyRequest} or an equivalent Hash.
|
167
|
+
#
|
168
|
+
# @param request [::Google::Cloud::DataCatalog::V1::CreateTaxonomyRequest, ::Hash]
|
169
|
+
# A request object representing the call parameters. Required. To specify no
|
170
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
171
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
172
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
173
|
+
#
|
174
|
+
# @overload create_taxonomy(parent: nil, taxonomy: nil)
|
175
|
+
# Pass arguments to `create_taxonomy` via keyword arguments. Note that at
|
176
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
177
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
178
|
+
#
|
179
|
+
# @param parent [::String]
|
180
|
+
# Required. Resource name of the project that the taxonomy will belong to.
|
181
|
+
# @param taxonomy [::Google::Cloud::DataCatalog::V1::Taxonomy, ::Hash]
|
182
|
+
# The taxonomy to be created.
|
183
|
+
#
|
184
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
185
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::V1::Taxonomy]
|
186
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
187
|
+
#
|
188
|
+
# @return [::Google::Cloud::DataCatalog::V1::Taxonomy]
|
189
|
+
#
|
190
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
191
|
+
#
|
192
|
+
def create_taxonomy request, options = nil
|
193
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
194
|
+
|
195
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::CreateTaxonomyRequest
|
196
|
+
|
197
|
+
# Converts hash and nil to an options object
|
198
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
199
|
+
|
200
|
+
# Customize the options with defaults
|
201
|
+
metadata = @config.rpcs.create_taxonomy.metadata.to_h
|
202
|
+
|
203
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
204
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
205
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
206
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
207
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
208
|
+
|
209
|
+
header_params = {
|
210
|
+
"parent" => request.parent
|
211
|
+
}
|
212
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
213
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
214
|
+
|
215
|
+
options.apply_defaults timeout: @config.rpcs.create_taxonomy.timeout,
|
216
|
+
metadata: metadata,
|
217
|
+
retry_policy: @config.rpcs.create_taxonomy.retry_policy
|
218
|
+
options.apply_defaults metadata: @config.metadata,
|
219
|
+
retry_policy: @config.retry_policy
|
220
|
+
|
221
|
+
@policy_tag_manager_stub.call_rpc :create_taxonomy, request, options: options do |response, operation|
|
222
|
+
yield response, operation if block_given?
|
223
|
+
return response
|
224
|
+
end
|
225
|
+
rescue ::GRPC::BadStatus => e
|
226
|
+
raise ::Google::Cloud::Error.from_error(e)
|
227
|
+
end
|
228
|
+
|
229
|
+
##
|
230
|
+
# Deletes a taxonomy. This method will also delete all policy tags in this
|
231
|
+
# taxonomy, their associated policies, and the policy tags references from
|
232
|
+
# BigQuery columns.
|
233
|
+
#
|
234
|
+
# @overload delete_taxonomy(request, options = nil)
|
235
|
+
# Pass arguments to `delete_taxonomy` via a request object, either of type
|
236
|
+
# {::Google::Cloud::DataCatalog::V1::DeleteTaxonomyRequest} or an equivalent Hash.
|
237
|
+
#
|
238
|
+
# @param request [::Google::Cloud::DataCatalog::V1::DeleteTaxonomyRequest, ::Hash]
|
239
|
+
# A request object representing the call parameters. Required. To specify no
|
240
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
241
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
242
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
243
|
+
#
|
244
|
+
# @overload delete_taxonomy(name: nil)
|
245
|
+
# Pass arguments to `delete_taxonomy` via keyword arguments. Note that at
|
246
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
247
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
248
|
+
#
|
249
|
+
# @param name [::String]
|
250
|
+
# Required. Resource name of the taxonomy to be deleted. All policy tags in
|
251
|
+
# this taxonomy will also be deleted.
|
252
|
+
#
|
253
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
254
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
255
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
256
|
+
#
|
257
|
+
# @return [::Google::Protobuf::Empty]
|
258
|
+
#
|
259
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
260
|
+
#
|
261
|
+
def delete_taxonomy request, options = nil
|
262
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
263
|
+
|
264
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::DeleteTaxonomyRequest
|
265
|
+
|
266
|
+
# Converts hash and nil to an options object
|
267
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
268
|
+
|
269
|
+
# Customize the options with defaults
|
270
|
+
metadata = @config.rpcs.delete_taxonomy.metadata.to_h
|
271
|
+
|
272
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
273
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
274
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
275
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
276
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
277
|
+
|
278
|
+
header_params = {
|
279
|
+
"name" => request.name
|
280
|
+
}
|
281
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
282
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
283
|
+
|
284
|
+
options.apply_defaults timeout: @config.rpcs.delete_taxonomy.timeout,
|
285
|
+
metadata: metadata,
|
286
|
+
retry_policy: @config.rpcs.delete_taxonomy.retry_policy
|
287
|
+
options.apply_defaults metadata: @config.metadata,
|
288
|
+
retry_policy: @config.retry_policy
|
289
|
+
|
290
|
+
@policy_tag_manager_stub.call_rpc :delete_taxonomy, request, options: options do |response, operation|
|
291
|
+
yield response, operation if block_given?
|
292
|
+
return response
|
293
|
+
end
|
294
|
+
rescue ::GRPC::BadStatus => e
|
295
|
+
raise ::Google::Cloud::Error.from_error(e)
|
296
|
+
end
|
297
|
+
|
298
|
+
##
|
299
|
+
# Updates a taxonomy. This method can update the taxonomy's display name,
|
300
|
+
# description, and activated policy types.
|
301
|
+
#
|
302
|
+
# @overload update_taxonomy(request, options = nil)
|
303
|
+
# Pass arguments to `update_taxonomy` via a request object, either of type
|
304
|
+
# {::Google::Cloud::DataCatalog::V1::UpdateTaxonomyRequest} or an equivalent Hash.
|
305
|
+
#
|
306
|
+
# @param request [::Google::Cloud::DataCatalog::V1::UpdateTaxonomyRequest, ::Hash]
|
307
|
+
# A request object representing the call parameters. Required. To specify no
|
308
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
309
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
310
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
311
|
+
#
|
312
|
+
# @overload update_taxonomy(taxonomy: nil, update_mask: nil)
|
313
|
+
# Pass arguments to `update_taxonomy` via keyword arguments. Note that at
|
314
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
315
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
316
|
+
#
|
317
|
+
# @param taxonomy [::Google::Cloud::DataCatalog::V1::Taxonomy, ::Hash]
|
318
|
+
# The taxonomy to update. Only description, display_name, and activated
|
319
|
+
# policy types can be updated.
|
320
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
321
|
+
# The update mask applies to the resource. For the `FieldMask` definition,
|
322
|
+
# see
|
323
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
324
|
+
# If not set, defaults to all of the fields that are allowed to update.
|
325
|
+
#
|
326
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
327
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::V1::Taxonomy]
|
328
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
329
|
+
#
|
330
|
+
# @return [::Google::Cloud::DataCatalog::V1::Taxonomy]
|
331
|
+
#
|
332
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
333
|
+
#
|
334
|
+
def update_taxonomy request, options = nil
|
335
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
336
|
+
|
337
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::UpdateTaxonomyRequest
|
338
|
+
|
339
|
+
# Converts hash and nil to an options object
|
340
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
341
|
+
|
342
|
+
# Customize the options with defaults
|
343
|
+
metadata = @config.rpcs.update_taxonomy.metadata.to_h
|
344
|
+
|
345
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
346
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
347
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
348
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
349
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
350
|
+
|
351
|
+
header_params = {
|
352
|
+
"taxonomy.name" => request.taxonomy.name
|
353
|
+
}
|
354
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
355
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
356
|
+
|
357
|
+
options.apply_defaults timeout: @config.rpcs.update_taxonomy.timeout,
|
358
|
+
metadata: metadata,
|
359
|
+
retry_policy: @config.rpcs.update_taxonomy.retry_policy
|
360
|
+
options.apply_defaults metadata: @config.metadata,
|
361
|
+
retry_policy: @config.retry_policy
|
362
|
+
|
363
|
+
@policy_tag_manager_stub.call_rpc :update_taxonomy, request, options: options do |response, operation|
|
364
|
+
yield response, operation if block_given?
|
365
|
+
return response
|
366
|
+
end
|
367
|
+
rescue ::GRPC::BadStatus => e
|
368
|
+
raise ::Google::Cloud::Error.from_error(e)
|
369
|
+
end
|
370
|
+
|
371
|
+
##
|
372
|
+
# Lists all taxonomies in a project in a particular location that the caller
|
373
|
+
# has permission to view.
|
374
|
+
#
|
375
|
+
# @overload list_taxonomies(request, options = nil)
|
376
|
+
# Pass arguments to `list_taxonomies` via a request object, either of type
|
377
|
+
# {::Google::Cloud::DataCatalog::V1::ListTaxonomiesRequest} or an equivalent Hash.
|
378
|
+
#
|
379
|
+
# @param request [::Google::Cloud::DataCatalog::V1::ListTaxonomiesRequest, ::Hash]
|
380
|
+
# A request object representing the call parameters. Required. To specify no
|
381
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
382
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
383
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
384
|
+
#
|
385
|
+
# @overload list_taxonomies(parent: nil, page_size: nil, page_token: nil)
|
386
|
+
# Pass arguments to `list_taxonomies` via keyword arguments. Note that at
|
387
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
388
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
389
|
+
#
|
390
|
+
# @param parent [::String]
|
391
|
+
# Required. Resource name of the project to list the taxonomies of.
|
392
|
+
# @param page_size [::Integer]
|
393
|
+
# The maximum number of items to return. Must be a value between 1 and 1000.
|
394
|
+
# If not set, defaults to 50.
|
395
|
+
# @param page_token [::String]
|
396
|
+
# The next_page_token value returned from a previous list request, if any. If
|
397
|
+
# not set, defaults to an empty string.
|
398
|
+
#
|
399
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
400
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Taxonomy>]
|
401
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
402
|
+
#
|
403
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::Taxonomy>]
|
404
|
+
#
|
405
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
406
|
+
#
|
407
|
+
def list_taxonomies request, options = nil
|
408
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
409
|
+
|
410
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::ListTaxonomiesRequest
|
411
|
+
|
412
|
+
# Converts hash and nil to an options object
|
413
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
414
|
+
|
415
|
+
# Customize the options with defaults
|
416
|
+
metadata = @config.rpcs.list_taxonomies.metadata.to_h
|
417
|
+
|
418
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
419
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
420
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
421
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
422
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
423
|
+
|
424
|
+
header_params = {
|
425
|
+
"parent" => request.parent
|
426
|
+
}
|
427
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
428
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
429
|
+
|
430
|
+
options.apply_defaults timeout: @config.rpcs.list_taxonomies.timeout,
|
431
|
+
metadata: metadata,
|
432
|
+
retry_policy: @config.rpcs.list_taxonomies.retry_policy
|
433
|
+
options.apply_defaults metadata: @config.metadata,
|
434
|
+
retry_policy: @config.retry_policy
|
435
|
+
|
436
|
+
@policy_tag_manager_stub.call_rpc :list_taxonomies, request, options: options do |response, operation|
|
437
|
+
response = ::Gapic::PagedEnumerable.new @policy_tag_manager_stub, :list_taxonomies, request, response, operation, options
|
438
|
+
yield response, operation if block_given?
|
439
|
+
return response
|
440
|
+
end
|
441
|
+
rescue ::GRPC::BadStatus => e
|
442
|
+
raise ::Google::Cloud::Error.from_error(e)
|
443
|
+
end
|
444
|
+
|
445
|
+
##
|
446
|
+
# Gets a taxonomy.
|
447
|
+
#
|
448
|
+
# @overload get_taxonomy(request, options = nil)
|
449
|
+
# Pass arguments to `get_taxonomy` via a request object, either of type
|
450
|
+
# {::Google::Cloud::DataCatalog::V1::GetTaxonomyRequest} or an equivalent Hash.
|
451
|
+
#
|
452
|
+
# @param request [::Google::Cloud::DataCatalog::V1::GetTaxonomyRequest, ::Hash]
|
453
|
+
# A request object representing the call parameters. Required. To specify no
|
454
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
455
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
456
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
457
|
+
#
|
458
|
+
# @overload get_taxonomy(name: nil)
|
459
|
+
# Pass arguments to `get_taxonomy` via keyword arguments. Note that at
|
460
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
461
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
462
|
+
#
|
463
|
+
# @param name [::String]
|
464
|
+
# Required. Resource name of the requested taxonomy.
|
465
|
+
#
|
466
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
467
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::V1::Taxonomy]
|
468
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
469
|
+
#
|
470
|
+
# @return [::Google::Cloud::DataCatalog::V1::Taxonomy]
|
471
|
+
#
|
472
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
473
|
+
#
|
474
|
+
def get_taxonomy request, options = nil
|
475
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
476
|
+
|
477
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::GetTaxonomyRequest
|
478
|
+
|
479
|
+
# Converts hash and nil to an options object
|
480
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
481
|
+
|
482
|
+
# Customize the options with defaults
|
483
|
+
metadata = @config.rpcs.get_taxonomy.metadata.to_h
|
484
|
+
|
485
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
486
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
487
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
488
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
489
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
490
|
+
|
491
|
+
header_params = {
|
492
|
+
"name" => request.name
|
493
|
+
}
|
494
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
495
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
496
|
+
|
497
|
+
options.apply_defaults timeout: @config.rpcs.get_taxonomy.timeout,
|
498
|
+
metadata: metadata,
|
499
|
+
retry_policy: @config.rpcs.get_taxonomy.retry_policy
|
500
|
+
options.apply_defaults metadata: @config.metadata,
|
501
|
+
retry_policy: @config.retry_policy
|
502
|
+
|
503
|
+
@policy_tag_manager_stub.call_rpc :get_taxonomy, request, options: options do |response, operation|
|
504
|
+
yield response, operation if block_given?
|
505
|
+
return response
|
506
|
+
end
|
507
|
+
rescue ::GRPC::BadStatus => e
|
508
|
+
raise ::Google::Cloud::Error.from_error(e)
|
509
|
+
end
|
510
|
+
|
511
|
+
##
|
512
|
+
# Creates a policy tag in a taxonomy.
|
513
|
+
#
|
514
|
+
# @overload create_policy_tag(request, options = nil)
|
515
|
+
# Pass arguments to `create_policy_tag` via a request object, either of type
|
516
|
+
# {::Google::Cloud::DataCatalog::V1::CreatePolicyTagRequest} or an equivalent Hash.
|
517
|
+
#
|
518
|
+
# @param request [::Google::Cloud::DataCatalog::V1::CreatePolicyTagRequest, ::Hash]
|
519
|
+
# A request object representing the call parameters. Required. To specify no
|
520
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
521
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
522
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
523
|
+
#
|
524
|
+
# @overload create_policy_tag(parent: nil, policy_tag: nil)
|
525
|
+
# Pass arguments to `create_policy_tag` via keyword arguments. Note that at
|
526
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
527
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
528
|
+
#
|
529
|
+
# @param parent [::String]
|
530
|
+
# Required. Resource name of the taxonomy that the policy tag will belong to.
|
531
|
+
# @param policy_tag [::Google::Cloud::DataCatalog::V1::PolicyTag, ::Hash]
|
532
|
+
# The policy tag to be created.
|
533
|
+
#
|
534
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
535
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::V1::PolicyTag]
|
536
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
537
|
+
#
|
538
|
+
# @return [::Google::Cloud::DataCatalog::V1::PolicyTag]
|
539
|
+
#
|
540
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
541
|
+
#
|
542
|
+
def create_policy_tag request, options = nil
|
543
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
544
|
+
|
545
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::CreatePolicyTagRequest
|
546
|
+
|
547
|
+
# Converts hash and nil to an options object
|
548
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
549
|
+
|
550
|
+
# Customize the options with defaults
|
551
|
+
metadata = @config.rpcs.create_policy_tag.metadata.to_h
|
552
|
+
|
553
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
554
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
555
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
556
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
557
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
558
|
+
|
559
|
+
header_params = {
|
560
|
+
"parent" => request.parent
|
561
|
+
}
|
562
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
563
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
564
|
+
|
565
|
+
options.apply_defaults timeout: @config.rpcs.create_policy_tag.timeout,
|
566
|
+
metadata: metadata,
|
567
|
+
retry_policy: @config.rpcs.create_policy_tag.retry_policy
|
568
|
+
options.apply_defaults metadata: @config.metadata,
|
569
|
+
retry_policy: @config.retry_policy
|
570
|
+
|
571
|
+
@policy_tag_manager_stub.call_rpc :create_policy_tag, request, options: options do |response, operation|
|
572
|
+
yield response, operation if block_given?
|
573
|
+
return response
|
574
|
+
end
|
575
|
+
rescue ::GRPC::BadStatus => e
|
576
|
+
raise ::Google::Cloud::Error.from_error(e)
|
577
|
+
end
|
578
|
+
|
579
|
+
##
|
580
|
+
# Deletes a policy tag. This method also deletes
|
581
|
+
# - all of its descendant policy tags, if any,
|
582
|
+
# - the policies associated with the policy tag and its descendants, and
|
583
|
+
# - references from BigQuery table schema of the policy tag and its
|
584
|
+
# descendants.
|
585
|
+
#
|
586
|
+
# @overload delete_policy_tag(request, options = nil)
|
587
|
+
# Pass arguments to `delete_policy_tag` via a request object, either of type
|
588
|
+
# {::Google::Cloud::DataCatalog::V1::DeletePolicyTagRequest} or an equivalent Hash.
|
589
|
+
#
|
590
|
+
# @param request [::Google::Cloud::DataCatalog::V1::DeletePolicyTagRequest, ::Hash]
|
591
|
+
# A request object representing the call parameters. Required. To specify no
|
592
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
593
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
594
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
595
|
+
#
|
596
|
+
# @overload delete_policy_tag(name: nil)
|
597
|
+
# Pass arguments to `delete_policy_tag` via keyword arguments. Note that at
|
598
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
599
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
600
|
+
#
|
601
|
+
# @param name [::String]
|
602
|
+
# Required. Resource name of the policy tag to be deleted. All of its descendant
|
603
|
+
# policy tags will also be deleted.
|
604
|
+
#
|
605
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
606
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
607
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
608
|
+
#
|
609
|
+
# @return [::Google::Protobuf::Empty]
|
610
|
+
#
|
611
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
612
|
+
#
|
613
|
+
def delete_policy_tag request, options = nil
|
614
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
615
|
+
|
616
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::DeletePolicyTagRequest
|
617
|
+
|
618
|
+
# Converts hash and nil to an options object
|
619
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
620
|
+
|
621
|
+
# Customize the options with defaults
|
622
|
+
metadata = @config.rpcs.delete_policy_tag.metadata.to_h
|
623
|
+
|
624
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
625
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
626
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
627
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
628
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
629
|
+
|
630
|
+
header_params = {
|
631
|
+
"name" => request.name
|
632
|
+
}
|
633
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
634
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
635
|
+
|
636
|
+
options.apply_defaults timeout: @config.rpcs.delete_policy_tag.timeout,
|
637
|
+
metadata: metadata,
|
638
|
+
retry_policy: @config.rpcs.delete_policy_tag.retry_policy
|
639
|
+
options.apply_defaults metadata: @config.metadata,
|
640
|
+
retry_policy: @config.retry_policy
|
641
|
+
|
642
|
+
@policy_tag_manager_stub.call_rpc :delete_policy_tag, request, options: options do |response, operation|
|
643
|
+
yield response, operation if block_given?
|
644
|
+
return response
|
645
|
+
end
|
646
|
+
rescue ::GRPC::BadStatus => e
|
647
|
+
raise ::Google::Cloud::Error.from_error(e)
|
648
|
+
end
|
649
|
+
|
650
|
+
##
|
651
|
+
# Updates a policy tag. This method can update the policy tag's display
|
652
|
+
# name, description, and parent policy tag.
|
653
|
+
#
|
654
|
+
# @overload update_policy_tag(request, options = nil)
|
655
|
+
# Pass arguments to `update_policy_tag` via a request object, either of type
|
656
|
+
# {::Google::Cloud::DataCatalog::V1::UpdatePolicyTagRequest} or an equivalent Hash.
|
657
|
+
#
|
658
|
+
# @param request [::Google::Cloud::DataCatalog::V1::UpdatePolicyTagRequest, ::Hash]
|
659
|
+
# A request object representing the call parameters. Required. To specify no
|
660
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
661
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
662
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
663
|
+
#
|
664
|
+
# @overload update_policy_tag(policy_tag: nil, update_mask: nil)
|
665
|
+
# Pass arguments to `update_policy_tag` via keyword arguments. Note that at
|
666
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
667
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
668
|
+
#
|
669
|
+
# @param policy_tag [::Google::Cloud::DataCatalog::V1::PolicyTag, ::Hash]
|
670
|
+
# The policy tag to update. Only the description, display_name, and
|
671
|
+
# parent_policy_tag fields can be updated.
|
672
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
673
|
+
# The update mask applies to the resource. Only display_name, description and
|
674
|
+
# parent_policy_tag can be updated and thus can be listed in the mask. If
|
675
|
+
# update_mask is not provided, all allowed fields (i.e. display_name,
|
676
|
+
# description and parent) will be updated. For more information including the
|
677
|
+
# `FieldMask` definition, see
|
678
|
+
# https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask
|
679
|
+
# If not set, defaults to all of the fields that are allowed to update.
|
680
|
+
#
|
681
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
682
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::V1::PolicyTag]
|
683
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
684
|
+
#
|
685
|
+
# @return [::Google::Cloud::DataCatalog::V1::PolicyTag]
|
686
|
+
#
|
687
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
688
|
+
#
|
689
|
+
def update_policy_tag request, options = nil
|
690
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
691
|
+
|
692
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::UpdatePolicyTagRequest
|
693
|
+
|
694
|
+
# Converts hash and nil to an options object
|
695
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
696
|
+
|
697
|
+
# Customize the options with defaults
|
698
|
+
metadata = @config.rpcs.update_policy_tag.metadata.to_h
|
699
|
+
|
700
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
701
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
702
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
703
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
704
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
705
|
+
|
706
|
+
header_params = {
|
707
|
+
"policy_tag.name" => request.policy_tag.name
|
708
|
+
}
|
709
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
710
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
711
|
+
|
712
|
+
options.apply_defaults timeout: @config.rpcs.update_policy_tag.timeout,
|
713
|
+
metadata: metadata,
|
714
|
+
retry_policy: @config.rpcs.update_policy_tag.retry_policy
|
715
|
+
options.apply_defaults metadata: @config.metadata,
|
716
|
+
retry_policy: @config.retry_policy
|
717
|
+
|
718
|
+
@policy_tag_manager_stub.call_rpc :update_policy_tag, request, options: options do |response, operation|
|
719
|
+
yield response, operation if block_given?
|
720
|
+
return response
|
721
|
+
end
|
722
|
+
rescue ::GRPC::BadStatus => e
|
723
|
+
raise ::Google::Cloud::Error.from_error(e)
|
724
|
+
end
|
725
|
+
|
726
|
+
##
|
727
|
+
# Lists all policy tags in a taxonomy.
|
728
|
+
#
|
729
|
+
# @overload list_policy_tags(request, options = nil)
|
730
|
+
# Pass arguments to `list_policy_tags` via a request object, either of type
|
731
|
+
# {::Google::Cloud::DataCatalog::V1::ListPolicyTagsRequest} or an equivalent Hash.
|
732
|
+
#
|
733
|
+
# @param request [::Google::Cloud::DataCatalog::V1::ListPolicyTagsRequest, ::Hash]
|
734
|
+
# A request object representing the call parameters. Required. To specify no
|
735
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
736
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
737
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
738
|
+
#
|
739
|
+
# @overload list_policy_tags(parent: nil, page_size: nil, page_token: nil)
|
740
|
+
# Pass arguments to `list_policy_tags` via keyword arguments. Note that at
|
741
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
742
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
743
|
+
#
|
744
|
+
# @param parent [::String]
|
745
|
+
# Required. Resource name of the taxonomy to list the policy tags of.
|
746
|
+
# @param page_size [::Integer]
|
747
|
+
# The maximum number of items to return. Must be a value between 1 and 1000.
|
748
|
+
# If not set, defaults to 50.
|
749
|
+
# @param page_token [::String]
|
750
|
+
# The next_page_token value returned from a previous List request, if any. If
|
751
|
+
# not set, defaults to an empty string.
|
752
|
+
#
|
753
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
754
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::PolicyTag>]
|
755
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
756
|
+
#
|
757
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DataCatalog::V1::PolicyTag>]
|
758
|
+
#
|
759
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
760
|
+
#
|
761
|
+
def list_policy_tags request, options = nil
|
762
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
763
|
+
|
764
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::ListPolicyTagsRequest
|
765
|
+
|
766
|
+
# Converts hash and nil to an options object
|
767
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
768
|
+
|
769
|
+
# Customize the options with defaults
|
770
|
+
metadata = @config.rpcs.list_policy_tags.metadata.to_h
|
771
|
+
|
772
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
773
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
774
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
775
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
776
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
777
|
+
|
778
|
+
header_params = {
|
779
|
+
"parent" => request.parent
|
780
|
+
}
|
781
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
782
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
783
|
+
|
784
|
+
options.apply_defaults timeout: @config.rpcs.list_policy_tags.timeout,
|
785
|
+
metadata: metadata,
|
786
|
+
retry_policy: @config.rpcs.list_policy_tags.retry_policy
|
787
|
+
options.apply_defaults metadata: @config.metadata,
|
788
|
+
retry_policy: @config.retry_policy
|
789
|
+
|
790
|
+
@policy_tag_manager_stub.call_rpc :list_policy_tags, request, options: options do |response, operation|
|
791
|
+
response = ::Gapic::PagedEnumerable.new @policy_tag_manager_stub, :list_policy_tags, request, response, operation, options
|
792
|
+
yield response, operation if block_given?
|
793
|
+
return response
|
794
|
+
end
|
795
|
+
rescue ::GRPC::BadStatus => e
|
796
|
+
raise ::Google::Cloud::Error.from_error(e)
|
797
|
+
end
|
798
|
+
|
799
|
+
##
|
800
|
+
# Gets a policy tag.
|
801
|
+
#
|
802
|
+
# @overload get_policy_tag(request, options = nil)
|
803
|
+
# Pass arguments to `get_policy_tag` via a request object, either of type
|
804
|
+
# {::Google::Cloud::DataCatalog::V1::GetPolicyTagRequest} or an equivalent Hash.
|
805
|
+
#
|
806
|
+
# @param request [::Google::Cloud::DataCatalog::V1::GetPolicyTagRequest, ::Hash]
|
807
|
+
# A request object representing the call parameters. Required. To specify no
|
808
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
809
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
810
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
811
|
+
#
|
812
|
+
# @overload get_policy_tag(name: nil)
|
813
|
+
# Pass arguments to `get_policy_tag` via keyword arguments. Note that at
|
814
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
815
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
816
|
+
#
|
817
|
+
# @param name [::String]
|
818
|
+
# Required. Resource name of the requested policy tag.
|
819
|
+
#
|
820
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
821
|
+
# @yieldparam response [::Google::Cloud::DataCatalog::V1::PolicyTag]
|
822
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
823
|
+
#
|
824
|
+
# @return [::Google::Cloud::DataCatalog::V1::PolicyTag]
|
825
|
+
#
|
826
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
827
|
+
#
|
828
|
+
def get_policy_tag request, options = nil
|
829
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
830
|
+
|
831
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DataCatalog::V1::GetPolicyTagRequest
|
832
|
+
|
833
|
+
# Converts hash and nil to an options object
|
834
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
835
|
+
|
836
|
+
# Customize the options with defaults
|
837
|
+
metadata = @config.rpcs.get_policy_tag.metadata.to_h
|
838
|
+
|
839
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
840
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
841
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
842
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
843
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
844
|
+
|
845
|
+
header_params = {
|
846
|
+
"name" => request.name
|
847
|
+
}
|
848
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
849
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
850
|
+
|
851
|
+
options.apply_defaults timeout: @config.rpcs.get_policy_tag.timeout,
|
852
|
+
metadata: metadata,
|
853
|
+
retry_policy: @config.rpcs.get_policy_tag.retry_policy
|
854
|
+
options.apply_defaults metadata: @config.metadata,
|
855
|
+
retry_policy: @config.retry_policy
|
856
|
+
|
857
|
+
@policy_tag_manager_stub.call_rpc :get_policy_tag, request, options: options do |response, operation|
|
858
|
+
yield response, operation if block_given?
|
859
|
+
return response
|
860
|
+
end
|
861
|
+
rescue ::GRPC::BadStatus => e
|
862
|
+
raise ::Google::Cloud::Error.from_error(e)
|
863
|
+
end
|
864
|
+
|
865
|
+
##
|
866
|
+
# Gets the IAM policy for a policy tag or a taxonomy.
|
867
|
+
#
|
868
|
+
# @overload get_iam_policy(request, options = nil)
|
869
|
+
# Pass arguments to `get_iam_policy` via a request object, either of type
|
870
|
+
# {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
|
871
|
+
#
|
872
|
+
# @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
|
873
|
+
# A request object representing the call parameters. Required. To specify no
|
874
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
875
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
876
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
877
|
+
#
|
878
|
+
# @overload get_iam_policy(resource: nil, options: nil)
|
879
|
+
# Pass arguments to `get_iam_policy` via keyword arguments. Note that at
|
880
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
881
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
882
|
+
#
|
883
|
+
# @param resource [::String]
|
884
|
+
# REQUIRED: The resource for which the policy is being requested.
|
885
|
+
# See the operation documentation for the appropriate value for this field.
|
886
|
+
# @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
|
887
|
+
# OPTIONAL: A `GetPolicyOptions` object for specifying options to
|
888
|
+
# `GetIamPolicy`. This field is only used by Cloud IAM.
|
889
|
+
#
|
890
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
891
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
892
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
893
|
+
#
|
894
|
+
# @return [::Google::Iam::V1::Policy]
|
895
|
+
#
|
896
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
897
|
+
#
|
898
|
+
def get_iam_policy request, options = nil
|
899
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
900
|
+
|
901
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
|
902
|
+
|
903
|
+
# Converts hash and nil to an options object
|
904
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
905
|
+
|
906
|
+
# Customize the options with defaults
|
907
|
+
metadata = @config.rpcs.get_iam_policy.metadata.to_h
|
908
|
+
|
909
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
910
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
911
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
912
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
913
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
914
|
+
|
915
|
+
header_params = {
|
916
|
+
"resource" => request.resource
|
917
|
+
}
|
918
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
919
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
920
|
+
|
921
|
+
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
922
|
+
metadata: metadata,
|
923
|
+
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
924
|
+
options.apply_defaults metadata: @config.metadata,
|
925
|
+
retry_policy: @config.retry_policy
|
926
|
+
|
927
|
+
@policy_tag_manager_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
928
|
+
yield response, operation if block_given?
|
929
|
+
return response
|
930
|
+
end
|
931
|
+
rescue ::GRPC::BadStatus => e
|
932
|
+
raise ::Google::Cloud::Error.from_error(e)
|
933
|
+
end
|
934
|
+
|
935
|
+
##
|
936
|
+
# Sets the IAM policy for a policy tag or a taxonomy.
|
937
|
+
#
|
938
|
+
# @overload set_iam_policy(request, options = nil)
|
939
|
+
# Pass arguments to `set_iam_policy` via a request object, either of type
|
940
|
+
# {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
|
941
|
+
#
|
942
|
+
# @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
|
943
|
+
# A request object representing the call parameters. Required. To specify no
|
944
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
945
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
946
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
947
|
+
#
|
948
|
+
# @overload set_iam_policy(resource: nil, policy: nil)
|
949
|
+
# Pass arguments to `set_iam_policy` via keyword arguments. Note that at
|
950
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
951
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
952
|
+
#
|
953
|
+
# @param resource [::String]
|
954
|
+
# REQUIRED: The resource for which the policy is being specified.
|
955
|
+
# See the operation documentation for the appropriate value for this field.
|
956
|
+
# @param policy [::Google::Iam::V1::Policy, ::Hash]
|
957
|
+
# REQUIRED: The complete policy to be applied to the `resource`. The size of
|
958
|
+
# the policy is limited to a few 10s of KB. An empty policy is a
|
959
|
+
# valid policy but certain Cloud Platform services (such as Projects)
|
960
|
+
# might reject them.
|
961
|
+
#
|
962
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
963
|
+
# @yieldparam response [::Google::Iam::V1::Policy]
|
964
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
965
|
+
#
|
966
|
+
# @return [::Google::Iam::V1::Policy]
|
967
|
+
#
|
968
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
969
|
+
#
|
970
|
+
def set_iam_policy request, options = nil
|
971
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
972
|
+
|
973
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
|
974
|
+
|
975
|
+
# Converts hash and nil to an options object
|
976
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
977
|
+
|
978
|
+
# Customize the options with defaults
|
979
|
+
metadata = @config.rpcs.set_iam_policy.metadata.to_h
|
980
|
+
|
981
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
982
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
983
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
984
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
985
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
986
|
+
|
987
|
+
header_params = {
|
988
|
+
"resource" => request.resource
|
989
|
+
}
|
990
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
991
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
992
|
+
|
993
|
+
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
994
|
+
metadata: metadata,
|
995
|
+
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
996
|
+
options.apply_defaults metadata: @config.metadata,
|
997
|
+
retry_policy: @config.retry_policy
|
998
|
+
|
999
|
+
@policy_tag_manager_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
1000
|
+
yield response, operation if block_given?
|
1001
|
+
return response
|
1002
|
+
end
|
1003
|
+
rescue ::GRPC::BadStatus => e
|
1004
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1005
|
+
end
|
1006
|
+
|
1007
|
+
##
|
1008
|
+
# Returns the permissions that a caller has on a specified policy tag or
|
1009
|
+
# taxonomy.
|
1010
|
+
#
|
1011
|
+
# @overload test_iam_permissions(request, options = nil)
|
1012
|
+
# Pass arguments to `test_iam_permissions` via a request object, either of type
|
1013
|
+
# {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
|
1014
|
+
#
|
1015
|
+
# @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
|
1016
|
+
# A request object representing the call parameters. Required. To specify no
|
1017
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1018
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1019
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1020
|
+
#
|
1021
|
+
# @overload test_iam_permissions(resource: nil, permissions: nil)
|
1022
|
+
# Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
|
1023
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1024
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1025
|
+
#
|
1026
|
+
# @param resource [::String]
|
1027
|
+
# REQUIRED: The resource for which the policy detail is being requested.
|
1028
|
+
# See the operation documentation for the appropriate value for this field.
|
1029
|
+
# @param permissions [::Array<::String>]
|
1030
|
+
# The set of permissions to check for the `resource`. Permissions with
|
1031
|
+
# wildcards (such as '*' or 'storage.*') are not allowed. For more
|
1032
|
+
# information see
|
1033
|
+
# [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
1034
|
+
#
|
1035
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1036
|
+
# @yieldparam response [::Google::Iam::V1::TestIamPermissionsResponse]
|
1037
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1038
|
+
#
|
1039
|
+
# @return [::Google::Iam::V1::TestIamPermissionsResponse]
|
1040
|
+
#
|
1041
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1042
|
+
#
|
1043
|
+
def test_iam_permissions request, options = nil
|
1044
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1045
|
+
|
1046
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
|
1047
|
+
|
1048
|
+
# Converts hash and nil to an options object
|
1049
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1050
|
+
|
1051
|
+
# Customize the options with defaults
|
1052
|
+
metadata = @config.rpcs.test_iam_permissions.metadata.to_h
|
1053
|
+
|
1054
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1055
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1056
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1057
|
+
gapic_version: ::Google::Cloud::DataCatalog::V1::VERSION
|
1058
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1059
|
+
|
1060
|
+
header_params = {
|
1061
|
+
"resource" => request.resource
|
1062
|
+
}
|
1063
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1064
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1065
|
+
|
1066
|
+
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1067
|
+
metadata: metadata,
|
1068
|
+
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1069
|
+
options.apply_defaults metadata: @config.metadata,
|
1070
|
+
retry_policy: @config.retry_policy
|
1071
|
+
|
1072
|
+
@policy_tag_manager_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
1073
|
+
yield response, operation if block_given?
|
1074
|
+
return response
|
1075
|
+
end
|
1076
|
+
rescue ::GRPC::BadStatus => e
|
1077
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
##
|
1081
|
+
# Configuration class for the PolicyTagManager API.
|
1082
|
+
#
|
1083
|
+
# This class represents the configuration for PolicyTagManager,
|
1084
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1085
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1086
|
+
# applied individually to specific RPCs. See
|
1087
|
+
# {::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client::Configuration::Rpcs}
|
1088
|
+
# for a list of RPCs that can be configured independently.
|
1089
|
+
#
|
1090
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1091
|
+
# on construction.
|
1092
|
+
#
|
1093
|
+
# # Examples
|
1094
|
+
#
|
1095
|
+
# To modify the global config, setting the timeout for create_taxonomy
|
1096
|
+
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1097
|
+
#
|
1098
|
+
# ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client.configure do |config|
|
1099
|
+
# config.timeout = 10.0
|
1100
|
+
# config.rpcs.create_taxonomy.timeout = 20.0
|
1101
|
+
# end
|
1102
|
+
#
|
1103
|
+
# To apply the above configuration only to a new client:
|
1104
|
+
#
|
1105
|
+
# client = ::Google::Cloud::DataCatalog::V1::PolicyTagManager::Client.new do |config|
|
1106
|
+
# config.timeout = 10.0
|
1107
|
+
# config.rpcs.create_taxonomy.timeout = 20.0
|
1108
|
+
# end
|
1109
|
+
#
|
1110
|
+
# @!attribute [rw] endpoint
|
1111
|
+
# The hostname or hostname:port of the service endpoint.
|
1112
|
+
# Defaults to `"datacatalog.googleapis.com"`.
|
1113
|
+
# @return [::String]
|
1114
|
+
# @!attribute [rw] credentials
|
1115
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1116
|
+
# * (`String`) The path to a service account key file in JSON format
|
1117
|
+
# * (`Hash`) A service account key as a Hash
|
1118
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1119
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
1120
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1121
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
1122
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
1123
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
1124
|
+
# * (`nil`) indicating no credentials
|
1125
|
+
# @return [::Object]
|
1126
|
+
# @!attribute [rw] scope
|
1127
|
+
# The OAuth scopes
|
1128
|
+
# @return [::Array<::String>]
|
1129
|
+
# @!attribute [rw] lib_name
|
1130
|
+
# The library name as recorded in instrumentation and logging
|
1131
|
+
# @return [::String]
|
1132
|
+
# @!attribute [rw] lib_version
|
1133
|
+
# The library version as recorded in instrumentation and logging
|
1134
|
+
# @return [::String]
|
1135
|
+
# @!attribute [rw] channel_args
|
1136
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
1137
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
1138
|
+
# @return [::Hash]
|
1139
|
+
# @!attribute [rw] interceptors
|
1140
|
+
# An array of interceptors that are run before calls are executed.
|
1141
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
1142
|
+
# @!attribute [rw] timeout
|
1143
|
+
# The call timeout in seconds.
|
1144
|
+
# @return [::Numeric]
|
1145
|
+
# @!attribute [rw] metadata
|
1146
|
+
# Additional gRPC headers to be sent with the call.
|
1147
|
+
# @return [::Hash{::Symbol=>::String}]
|
1148
|
+
# @!attribute [rw] retry_policy
|
1149
|
+
# The retry policy. The value is a hash with the following keys:
|
1150
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1151
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1152
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1153
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1154
|
+
# trigger a retry.
|
1155
|
+
# @return [::Hash]
|
1156
|
+
# @!attribute [rw] quota_project
|
1157
|
+
# A separate project against which to charge quota.
|
1158
|
+
# @return [::String]
|
1159
|
+
#
|
1160
|
+
class Configuration
|
1161
|
+
extend ::Gapic::Config
|
1162
|
+
|
1163
|
+
config_attr :endpoint, "datacatalog.googleapis.com", ::String
|
1164
|
+
config_attr :credentials, nil do |value|
|
1165
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1166
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1167
|
+
allowed.any? { |klass| klass === value }
|
1168
|
+
end
|
1169
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1170
|
+
config_attr :lib_name, nil, ::String, nil
|
1171
|
+
config_attr :lib_version, nil, ::String, nil
|
1172
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
1173
|
+
config_attr :interceptors, nil, ::Array, nil
|
1174
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1175
|
+
config_attr :metadata, nil, ::Hash, nil
|
1176
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1177
|
+
config_attr :quota_project, nil, ::String, nil
|
1178
|
+
|
1179
|
+
# @private
|
1180
|
+
def initialize parent_config = nil
|
1181
|
+
@parent_config = parent_config unless parent_config.nil?
|
1182
|
+
|
1183
|
+
yield self if block_given?
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
##
|
1187
|
+
# Configurations for individual RPCs
|
1188
|
+
# @return [Rpcs]
|
1189
|
+
#
|
1190
|
+
def rpcs
|
1191
|
+
@rpcs ||= begin
|
1192
|
+
parent_rpcs = nil
|
1193
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1194
|
+
Rpcs.new parent_rpcs
|
1195
|
+
end
|
1196
|
+
end
|
1197
|
+
|
1198
|
+
##
|
1199
|
+
# Configuration RPC class for the PolicyTagManager API.
|
1200
|
+
#
|
1201
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1202
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1203
|
+
# the following configuration fields:
|
1204
|
+
#
|
1205
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1206
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
1207
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1208
|
+
# include the following keys:
|
1209
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1210
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1211
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1212
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1213
|
+
# trigger a retry.
|
1214
|
+
#
|
1215
|
+
class Rpcs
|
1216
|
+
##
|
1217
|
+
# RPC-specific configuration for `create_taxonomy`
|
1218
|
+
# @return [::Gapic::Config::Method]
|
1219
|
+
#
|
1220
|
+
attr_reader :create_taxonomy
|
1221
|
+
##
|
1222
|
+
# RPC-specific configuration for `delete_taxonomy`
|
1223
|
+
# @return [::Gapic::Config::Method]
|
1224
|
+
#
|
1225
|
+
attr_reader :delete_taxonomy
|
1226
|
+
##
|
1227
|
+
# RPC-specific configuration for `update_taxonomy`
|
1228
|
+
# @return [::Gapic::Config::Method]
|
1229
|
+
#
|
1230
|
+
attr_reader :update_taxonomy
|
1231
|
+
##
|
1232
|
+
# RPC-specific configuration for `list_taxonomies`
|
1233
|
+
# @return [::Gapic::Config::Method]
|
1234
|
+
#
|
1235
|
+
attr_reader :list_taxonomies
|
1236
|
+
##
|
1237
|
+
# RPC-specific configuration for `get_taxonomy`
|
1238
|
+
# @return [::Gapic::Config::Method]
|
1239
|
+
#
|
1240
|
+
attr_reader :get_taxonomy
|
1241
|
+
##
|
1242
|
+
# RPC-specific configuration for `create_policy_tag`
|
1243
|
+
# @return [::Gapic::Config::Method]
|
1244
|
+
#
|
1245
|
+
attr_reader :create_policy_tag
|
1246
|
+
##
|
1247
|
+
# RPC-specific configuration for `delete_policy_tag`
|
1248
|
+
# @return [::Gapic::Config::Method]
|
1249
|
+
#
|
1250
|
+
attr_reader :delete_policy_tag
|
1251
|
+
##
|
1252
|
+
# RPC-specific configuration for `update_policy_tag`
|
1253
|
+
# @return [::Gapic::Config::Method]
|
1254
|
+
#
|
1255
|
+
attr_reader :update_policy_tag
|
1256
|
+
##
|
1257
|
+
# RPC-specific configuration for `list_policy_tags`
|
1258
|
+
# @return [::Gapic::Config::Method]
|
1259
|
+
#
|
1260
|
+
attr_reader :list_policy_tags
|
1261
|
+
##
|
1262
|
+
# RPC-specific configuration for `get_policy_tag`
|
1263
|
+
# @return [::Gapic::Config::Method]
|
1264
|
+
#
|
1265
|
+
attr_reader :get_policy_tag
|
1266
|
+
##
|
1267
|
+
# RPC-specific configuration for `get_iam_policy`
|
1268
|
+
# @return [::Gapic::Config::Method]
|
1269
|
+
#
|
1270
|
+
attr_reader :get_iam_policy
|
1271
|
+
##
|
1272
|
+
# RPC-specific configuration for `set_iam_policy`
|
1273
|
+
# @return [::Gapic::Config::Method]
|
1274
|
+
#
|
1275
|
+
attr_reader :set_iam_policy
|
1276
|
+
##
|
1277
|
+
# RPC-specific configuration for `test_iam_permissions`
|
1278
|
+
# @return [::Gapic::Config::Method]
|
1279
|
+
#
|
1280
|
+
attr_reader :test_iam_permissions
|
1281
|
+
|
1282
|
+
# @private
|
1283
|
+
def initialize parent_rpcs = nil
|
1284
|
+
create_taxonomy_config = parent_rpcs.create_taxonomy if parent_rpcs.respond_to? :create_taxonomy
|
1285
|
+
@create_taxonomy = ::Gapic::Config::Method.new create_taxonomy_config
|
1286
|
+
delete_taxonomy_config = parent_rpcs.delete_taxonomy if parent_rpcs.respond_to? :delete_taxonomy
|
1287
|
+
@delete_taxonomy = ::Gapic::Config::Method.new delete_taxonomy_config
|
1288
|
+
update_taxonomy_config = parent_rpcs.update_taxonomy if parent_rpcs.respond_to? :update_taxonomy
|
1289
|
+
@update_taxonomy = ::Gapic::Config::Method.new update_taxonomy_config
|
1290
|
+
list_taxonomies_config = parent_rpcs.list_taxonomies if parent_rpcs.respond_to? :list_taxonomies
|
1291
|
+
@list_taxonomies = ::Gapic::Config::Method.new list_taxonomies_config
|
1292
|
+
get_taxonomy_config = parent_rpcs.get_taxonomy if parent_rpcs.respond_to? :get_taxonomy
|
1293
|
+
@get_taxonomy = ::Gapic::Config::Method.new get_taxonomy_config
|
1294
|
+
create_policy_tag_config = parent_rpcs.create_policy_tag if parent_rpcs.respond_to? :create_policy_tag
|
1295
|
+
@create_policy_tag = ::Gapic::Config::Method.new create_policy_tag_config
|
1296
|
+
delete_policy_tag_config = parent_rpcs.delete_policy_tag if parent_rpcs.respond_to? :delete_policy_tag
|
1297
|
+
@delete_policy_tag = ::Gapic::Config::Method.new delete_policy_tag_config
|
1298
|
+
update_policy_tag_config = parent_rpcs.update_policy_tag if parent_rpcs.respond_to? :update_policy_tag
|
1299
|
+
@update_policy_tag = ::Gapic::Config::Method.new update_policy_tag_config
|
1300
|
+
list_policy_tags_config = parent_rpcs.list_policy_tags if parent_rpcs.respond_to? :list_policy_tags
|
1301
|
+
@list_policy_tags = ::Gapic::Config::Method.new list_policy_tags_config
|
1302
|
+
get_policy_tag_config = parent_rpcs.get_policy_tag if parent_rpcs.respond_to? :get_policy_tag
|
1303
|
+
@get_policy_tag = ::Gapic::Config::Method.new get_policy_tag_config
|
1304
|
+
get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
|
1305
|
+
@get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
|
1306
|
+
set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
|
1307
|
+
@set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
|
1308
|
+
test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
|
1309
|
+
@test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
|
1310
|
+
|
1311
|
+
yield self if block_given?
|
1312
|
+
end
|
1313
|
+
end
|
1314
|
+
end
|
1315
|
+
end
|
1316
|
+
end
|
1317
|
+
end
|
1318
|
+
end
|
1319
|
+
end
|
1320
|
+
end
|