google-cloud-resource_manager-v3 0.4.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/resource_manager/v3/folders/client.rb +47 -35
- data/lib/google/cloud/resource_manager/v3/folders/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/folders/rest/client.rb +47 -35
- data/lib/google/cloud/resource_manager/v3/folders/rest/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/organizations/client.rb +12 -10
- data/lib/google/cloud/resource_manager/v3/organizations/rest/client.rb +12 -10
- data/lib/google/cloud/resource_manager/v3/projects/client.rb +53 -54
- data/lib/google/cloud/resource_manager/v3/projects/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/projects/rest/client.rb +53 -54
- data/lib/google/cloud/resource_manager/v3/projects/rest/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/rest.rb +1 -0
- data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +115 -17
- data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/client.rb +96 -17
- data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/service_stub.rb +57 -0
- data/lib/google/cloud/resource_manager/v3/tag_bindings/rest.rb +1 -1
- data/lib/google/cloud/resource_manager/v3/tag_bindings.rb +1 -1
- data/lib/google/cloud/resource_manager/v3/tag_holds/client.rb +640 -0
- data/lib/google/cloud/resource_manager/v3/tag_holds/credentials.rb +52 -0
- data/lib/google/cloud/resource_manager/v3/tag_holds/operations.rb +768 -0
- data/lib/google/cloud/resource_manager/v3/tag_holds/paths.rb +64 -0
- data/lib/google/cloud/resource_manager/v3/tag_holds/rest/client.rb +533 -0
- data/lib/google/cloud/resource_manager/v3/tag_holds/rest/operations.rb +793 -0
- data/lib/google/cloud/resource_manager/v3/tag_holds/rest/service_stub.rb +226 -0
- data/lib/google/cloud/resource_manager/v3/tag_holds/rest.rb +57 -0
- data/lib/google/cloud/resource_manager/v3/tag_holds.rb +60 -0
- data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +114 -24
- data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/tag_keys/rest/client.rb +99 -24
- data/lib/google/cloud/resource_manager/v3/tag_keys/rest/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/tag_keys/rest/service_stub.rb +57 -0
- data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +123 -29
- data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/tag_values/rest/client.rb +108 -29
- data/lib/google/cloud/resource_manager/v3/tag_values/rest/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/tag_values/rest/service_stub.rb +57 -0
- data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
- data/lib/google/cloud/resource_manager/v3.rb +1 -0
- data/lib/google/cloud/resourcemanager/v3/folders_services_pb.rb +23 -17
- data/lib/google/cloud/resourcemanager/v3/projects_services_pb.rb +16 -13
- data/lib/google/cloud/resourcemanager/v3/tag_bindings_pb.rb +22 -0
- data/lib/google/cloud/resourcemanager/v3/tag_bindings_services_pb.rb +7 -5
- data/lib/google/cloud/resourcemanager/v3/tag_holds_pb.rb +63 -0
- data/lib/google/cloud/resourcemanager/v3/tag_holds_services_pb.rb +54 -0
- data/lib/google/cloud/resourcemanager/v3/tag_keys_pb.rb +11 -0
- data/lib/google/cloud/resourcemanager/v3/tag_keys_services_pb.rb +6 -2
- data/lib/google/cloud/resourcemanager/v3/tag_values_pb.rb +4 -0
- data/lib/google/cloud/resourcemanager/v3/tag_values_services_pb.rb +7 -4
- data/proto_docs/google/api/client.rb +67 -4
- data/proto_docs/google/cloud/resourcemanager/v3/folders.rb +25 -19
- data/proto_docs/google/cloud/resourcemanager/v3/organizations.rb +13 -11
- data/proto_docs/google/cloud/resourcemanager/v3/projects.rb +41 -45
- data/proto_docs/google/cloud/resourcemanager/v3/tag_bindings.rb +104 -15
- data/proto_docs/google/cloud/resourcemanager/v3/tag_holds.rb +161 -0
- data/proto_docs/google/cloud/resourcemanager/v3/tag_keys.rb +93 -27
- data/proto_docs/google/cloud/resourcemanager/v3/tag_values.rb +52 -29
- data/proto_docs/google/iam/v1/policy.rb +8 -4
- metadata +14 -2
@@ -190,12 +190,13 @@ module Google
|
|
190
190
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
191
191
|
#
|
192
192
|
# @param parent [::String]
|
193
|
-
# Required. The resource name of the
|
194
|
-
# Must be of the form `
|
193
|
+
# Required. The resource name of the TagKey's parent.
|
194
|
+
# Must be of the form `organizations/{org_id}` or `projects/{project_id}` or
|
195
|
+
# `projects/{project_number}`
|
195
196
|
# @param page_size [::Integer]
|
196
|
-
# Optional. The maximum number of TagKeys to return in the response. The
|
197
|
-
# a maximum of 300 TagKeys to return. If unspecified, the
|
198
|
-
# as the default.
|
197
|
+
# Optional. The maximum number of TagKeys to return in the response. The
|
198
|
+
# server allows a maximum of 300 TagKeys to return. If unspecified, the
|
199
|
+
# server will use 100 as the default.
|
199
200
|
# @param page_token [::String]
|
200
201
|
# Optional. A pagination token returned from a previous call to `ListTagKey`
|
201
202
|
# that indicates where this listing should continue from.
|
@@ -306,11 +307,78 @@ module Google
|
|
306
307
|
raise ::Google::Cloud::Error.from_error(e)
|
307
308
|
end
|
308
309
|
|
310
|
+
##
|
311
|
+
# Retrieves a TagKey by its namespaced name.
|
312
|
+
# This method will return `PERMISSION_DENIED` if the key does not exist
|
313
|
+
# or the user does not have permission to view it.
|
314
|
+
#
|
315
|
+
# @overload get_namespaced_tag_key(request, options = nil)
|
316
|
+
# Pass arguments to `get_namespaced_tag_key` via a request object, either of type
|
317
|
+
# {::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest} or an equivalent Hash.
|
318
|
+
#
|
319
|
+
# @param request [::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest, ::Hash]
|
320
|
+
# A request object representing the call parameters. Required. To specify no
|
321
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
322
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
323
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
324
|
+
#
|
325
|
+
# @overload get_namespaced_tag_key(name: nil)
|
326
|
+
# Pass arguments to `get_namespaced_tag_key` via keyword arguments. Note that at
|
327
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
328
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
329
|
+
#
|
330
|
+
# @param name [::String]
|
331
|
+
# Required. A namespaced tag key name in the format
|
332
|
+
# `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
|
333
|
+
# "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
|
334
|
+
# name "bar" under the project `r2-d2`.
|
335
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
336
|
+
# @yieldparam result [::Google::Cloud::ResourceManager::V3::TagKey]
|
337
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
338
|
+
#
|
339
|
+
# @return [::Google::Cloud::ResourceManager::V3::TagKey]
|
340
|
+
#
|
341
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
342
|
+
def get_namespaced_tag_key request, options = nil
|
343
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
344
|
+
|
345
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest
|
346
|
+
|
347
|
+
# Converts hash and nil to an options object
|
348
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
349
|
+
|
350
|
+
# Customize the options with defaults
|
351
|
+
call_metadata = @config.rpcs.get_namespaced_tag_key.metadata.to_h
|
352
|
+
|
353
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
354
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
355
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
356
|
+
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION,
|
357
|
+
transports_version_send: [:rest]
|
358
|
+
|
359
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
360
|
+
|
361
|
+
options.apply_defaults timeout: @config.rpcs.get_namespaced_tag_key.timeout,
|
362
|
+
metadata: call_metadata,
|
363
|
+
retry_policy: @config.rpcs.get_namespaced_tag_key.retry_policy
|
364
|
+
|
365
|
+
options.apply_defaults timeout: @config.timeout,
|
366
|
+
metadata: @config.metadata,
|
367
|
+
retry_policy: @config.retry_policy
|
368
|
+
|
369
|
+
@tag_keys_stub.get_namespaced_tag_key request, options do |result, operation|
|
370
|
+
yield result, operation if block_given?
|
371
|
+
return result
|
372
|
+
end
|
373
|
+
rescue ::Gapic::Rest::Error => e
|
374
|
+
raise ::Google::Cloud::Error.from_error(e)
|
375
|
+
end
|
376
|
+
|
309
377
|
##
|
310
378
|
# Creates a new TagKey. If another request with the same parameters is
|
311
379
|
# sent while the original request is in process, the second request
|
312
|
-
# will receive an error. A maximum of
|
313
|
-
# any given time.
|
380
|
+
# will receive an error. A maximum of 1000 TagKeys can exist under a parent
|
381
|
+
# at any given time.
|
314
382
|
#
|
315
383
|
# @overload create_tag_key(request, options = nil)
|
316
384
|
# Pass arguments to `create_tag_key` via a request object, either of type
|
@@ -328,11 +396,11 @@ module Google
|
|
328
396
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
329
397
|
#
|
330
398
|
# @param tag_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
|
331
|
-
# Required. The TagKey to be created. Only fields `short_name`,
|
332
|
-
# and `parent` are considered during the creation request.
|
399
|
+
# Required. The TagKey to be created. Only fields `short_name`,
|
400
|
+
# `description`, and `parent` are considered during the creation request.
|
333
401
|
# @param validate_only [::Boolean]
|
334
|
-
# Optional. Set to true to perform validations necessary for creating the
|
335
|
-
# not actually perform the action.
|
402
|
+
# Optional. Set to true to perform validations necessary for creating the
|
403
|
+
# resource, but not actually perform the action.
|
336
404
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
337
405
|
# @yieldparam result [::Gapic::Operation]
|
338
406
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -395,10 +463,10 @@ module Google
|
|
395
463
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
396
464
|
#
|
397
465
|
# @param tag_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
|
398
|
-
# Required. The new definition of the TagKey. Only the `description` and
|
399
|
-
# can be updated by this request. If the `etag` field is not
|
400
|
-
# must match the `etag` field of the existing tag key. Otherwise,
|
401
|
-
# `
|
466
|
+
# Required. The new definition of the TagKey. Only the `description` and
|
467
|
+
# `etag` fields can be updated by this request. If the `etag` field is not
|
468
|
+
# empty, it must match the `etag` field of the existing tag key. Otherwise,
|
469
|
+
# `ABORTED` will be returned.
|
402
470
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
403
471
|
# Fields to be updated. The mask may only contain `description` or
|
404
472
|
# `etag`. If omitted entirely, both `description` and `etag` are assumed to
|
@@ -469,15 +537,15 @@ module Google
|
|
469
537
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
470
538
|
#
|
471
539
|
# @param name [::String]
|
472
|
-
# Required. The resource name of a TagKey to be deleted in the format
|
473
|
-
# The TagKey cannot be a parent of any existing TagValues or
|
474
|
-
# deleted successfully.
|
540
|
+
# Required. The resource name of a TagKey to be deleted in the format
|
541
|
+
# `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
|
542
|
+
# it will not be deleted successfully.
|
475
543
|
# @param validate_only [::Boolean]
|
476
|
-
# Optional. Set as true to perform validations necessary for deletion, but
|
477
|
-
# perform the action.
|
544
|
+
# Optional. Set as true to perform validations necessary for deletion, but
|
545
|
+
# not actually perform the action.
|
478
546
|
# @param etag [::String]
|
479
|
-
# Optional. The etag known to the client for the expected state of the
|
480
|
-
# to be used for optimistic concurrency.
|
547
|
+
# Optional. The etag known to the client for the expected state of the
|
548
|
+
# TagKey. This is to be used for optimistic concurrency.
|
481
549
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
482
550
|
# @yieldparam result [::Gapic::Operation]
|
483
551
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -780,9 +848,9 @@ module Google
|
|
780
848
|
# * (`String`) The path to a service account key file in JSON format
|
781
849
|
# * (`Hash`) A service account key as a Hash
|
782
850
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
783
|
-
# (see the [googleauth docs](https://
|
851
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
784
852
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
785
|
-
# (see the [signet docs](https://
|
853
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
786
854
|
# * (`nil`) indicating no credentials
|
787
855
|
# @return [::Object]
|
788
856
|
# @!attribute [rw] scope
|
@@ -876,6 +944,11 @@ module Google
|
|
876
944
|
#
|
877
945
|
attr_reader :get_tag_key
|
878
946
|
##
|
947
|
+
# RPC-specific configuration for `get_namespaced_tag_key`
|
948
|
+
# @return [::Gapic::Config::Method]
|
949
|
+
#
|
950
|
+
attr_reader :get_namespaced_tag_key
|
951
|
+
##
|
879
952
|
# RPC-specific configuration for `create_tag_key`
|
880
953
|
# @return [::Gapic::Config::Method]
|
881
954
|
#
|
@@ -912,6 +985,8 @@ module Google
|
|
912
985
|
@list_tag_keys = ::Gapic::Config::Method.new list_tag_keys_config
|
913
986
|
get_tag_key_config = parent_rpcs.get_tag_key if parent_rpcs.respond_to? :get_tag_key
|
914
987
|
@get_tag_key = ::Gapic::Config::Method.new get_tag_key_config
|
988
|
+
get_namespaced_tag_key_config = parent_rpcs.get_namespaced_tag_key if parent_rpcs.respond_to? :get_namespaced_tag_key
|
989
|
+
@get_namespaced_tag_key = ::Gapic::Config::Method.new get_namespaced_tag_key_config
|
915
990
|
create_tag_key_config = parent_rpcs.create_tag_key if parent_rpcs.respond_to? :create_tag_key
|
916
991
|
@create_tag_key = ::Gapic::Config::Method.new create_tag_key_config
|
917
992
|
update_tag_key_config = parent_rpcs.update_tag_key if parent_rpcs.respond_to? :update_tag_key
|
@@ -411,9 +411,9 @@ module Google
|
|
411
411
|
# * (`String`) The path to a service account key file in JSON format
|
412
412
|
# * (`Hash`) A service account key as a Hash
|
413
413
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
414
|
-
# (see the [googleauth docs](https://
|
414
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
415
415
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
416
|
-
# (see the [signet docs](https://
|
416
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
417
417
|
# * (`nil`) indicating no credentials
|
418
418
|
# @return [::Object]
|
419
419
|
# @!attribute [rw] scope
|
@@ -116,6 +116,44 @@ module Google
|
|
116
116
|
result
|
117
117
|
end
|
118
118
|
|
119
|
+
##
|
120
|
+
# Baseline implementation for the get_namespaced_tag_key REST call
|
121
|
+
#
|
122
|
+
# @param request_pb [::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest]
|
123
|
+
# A request object representing the call parameters. Required.
|
124
|
+
# @param options [::Gapic::CallOptions]
|
125
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
126
|
+
#
|
127
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
128
|
+
# @yieldparam result [::Google::Cloud::ResourceManager::V3::TagKey]
|
129
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
130
|
+
#
|
131
|
+
# @return [::Google::Cloud::ResourceManager::V3::TagKey]
|
132
|
+
# A result object deserialized from the server's reply
|
133
|
+
def get_namespaced_tag_key request_pb, options = nil
|
134
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
135
|
+
|
136
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_namespaced_tag_key_request request_pb
|
137
|
+
query_string_params = if query_string_params.any?
|
138
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
139
|
+
else
|
140
|
+
{}
|
141
|
+
end
|
142
|
+
|
143
|
+
response = @client_stub.make_http_request(
|
144
|
+
verb,
|
145
|
+
uri: uri,
|
146
|
+
body: body || "",
|
147
|
+
params: query_string_params,
|
148
|
+
options: options
|
149
|
+
)
|
150
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
151
|
+
result = ::Google::Cloud::ResourceManager::V3::TagKey.decode_json response.body, ignore_unknown_fields: true
|
152
|
+
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
156
|
+
|
119
157
|
##
|
120
158
|
# Baseline implementation for the create_tag_key REST call
|
121
159
|
#
|
@@ -384,6 +422,25 @@ module Google
|
|
384
422
|
transcoder.transcode request_pb
|
385
423
|
end
|
386
424
|
|
425
|
+
##
|
426
|
+
# @private
|
427
|
+
#
|
428
|
+
# GRPC transcoding helper method for the get_namespaced_tag_key REST call
|
429
|
+
#
|
430
|
+
# @param request_pb [::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest]
|
431
|
+
# A request object representing the call parameters. Required.
|
432
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
433
|
+
# Uri, Body, Query string parameters
|
434
|
+
def self.transcode_get_namespaced_tag_key_request request_pb
|
435
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
436
|
+
.with_bindings(
|
437
|
+
uri_method: :get,
|
438
|
+
uri_template: "/v3/tagKeys/namespaced",
|
439
|
+
matches: []
|
440
|
+
)
|
441
|
+
transcoder.transcode request_pb
|
442
|
+
end
|
443
|
+
|
387
444
|
##
|
388
445
|
# @private
|
389
446
|
#
|
@@ -199,15 +199,14 @@ module Google
|
|
199
199
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
200
200
|
#
|
201
201
|
# @param parent [::String]
|
202
|
-
# Required.
|
203
|
-
# in the format `tagKeys/123`.
|
202
|
+
# Required.
|
204
203
|
# @param page_size [::Integer]
|
205
|
-
# Optional. The maximum number of TagValues to return in the response. The
|
206
|
-
# allows a maximum of 300 TagValues to return. If unspecified, the
|
207
|
-
# will use 100 as the default.
|
204
|
+
# Optional. The maximum number of TagValues to return in the response. The
|
205
|
+
# server allows a maximum of 300 TagValues to return. If unspecified, the
|
206
|
+
# server will use 100 as the default.
|
208
207
|
# @param page_token [::String]
|
209
|
-
# Optional. A pagination token returned from a previous call to
|
210
|
-
# that indicates where this listing should continue from.
|
208
|
+
# Optional. A pagination token returned from a previous call to
|
209
|
+
# `ListTagValues` that indicates where this listing should continue from.
|
211
210
|
#
|
212
211
|
# @yield [response, operation] Access the result along with the RPC operation
|
213
212
|
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagValue>]
|
@@ -271,9 +270,8 @@ module Google
|
|
271
270
|
end
|
272
271
|
|
273
272
|
##
|
274
|
-
# Retrieves TagValue.
|
275
|
-
#
|
276
|
-
# `PERMISSION_DENIED`.
|
273
|
+
# Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the
|
274
|
+
# value does not exist or the user does not have permission to view it.
|
277
275
|
#
|
278
276
|
# @overload get_tag_value(request, options = nil)
|
279
277
|
# Pass arguments to `get_tag_value` via a request object, either of type
|
@@ -291,7 +289,8 @@ module Google
|
|
291
289
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
292
290
|
#
|
293
291
|
# @param name [::String]
|
294
|
-
# Required. Resource name for TagValue to be fetched in the format
|
292
|
+
# Required. Resource name for TagValue to be fetched in the format
|
293
|
+
# `tagValues/456`.
|
295
294
|
#
|
296
295
|
# @yield [response, operation] Access the result along with the RPC operation
|
297
296
|
# @yieldparam response [::Google::Cloud::ResourceManager::V3::TagValue]
|
@@ -357,10 +356,97 @@ module Google
|
|
357
356
|
raise ::Google::Cloud::Error.from_error(e)
|
358
357
|
end
|
359
358
|
|
359
|
+
##
|
360
|
+
# Retrieves a TagValue by its namespaced name.
|
361
|
+
# This method will return `PERMISSION_DENIED` if the value does not exist
|
362
|
+
# or the user does not have permission to view it.
|
363
|
+
#
|
364
|
+
# @overload get_namespaced_tag_value(request, options = nil)
|
365
|
+
# Pass arguments to `get_namespaced_tag_value` via a request object, either of type
|
366
|
+
# {::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest} or an equivalent Hash.
|
367
|
+
#
|
368
|
+
# @param request [::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest, ::Hash]
|
369
|
+
# A request object representing the call parameters. Required. To specify no
|
370
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
371
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
372
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
373
|
+
#
|
374
|
+
# @overload get_namespaced_tag_value(name: nil)
|
375
|
+
# Pass arguments to `get_namespaced_tag_value` via keyword arguments. Note that at
|
376
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
377
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
378
|
+
#
|
379
|
+
# @param name [::String]
|
380
|
+
# Required. A namespaced tag value name in the following format:
|
381
|
+
#
|
382
|
+
# `{parentId}/{tagKeyShort}/{tagValueShort}`
|
383
|
+
#
|
384
|
+
# Examples:
|
385
|
+
# - `42/foo/abc` for a value with short name "abc" under the key with short
|
386
|
+
# name "foo" under the organization with ID 42
|
387
|
+
# - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
|
388
|
+
# short name "bar" under the project with ID "r2-d2"
|
389
|
+
#
|
390
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
391
|
+
# @yieldparam response [::Google::Cloud::ResourceManager::V3::TagValue]
|
392
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
393
|
+
#
|
394
|
+
# @return [::Google::Cloud::ResourceManager::V3::TagValue]
|
395
|
+
#
|
396
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
397
|
+
#
|
398
|
+
# @example Basic example
|
399
|
+
# require "google/cloud/resource_manager/v3"
|
400
|
+
#
|
401
|
+
# # Create a client object. The client can be reused for multiple calls.
|
402
|
+
# client = Google::Cloud::ResourceManager::V3::TagValues::Client.new
|
403
|
+
#
|
404
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
405
|
+
# request = Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest.new
|
406
|
+
#
|
407
|
+
# # Call the get_namespaced_tag_value method.
|
408
|
+
# result = client.get_namespaced_tag_value request
|
409
|
+
#
|
410
|
+
# # The returned object is of type Google::Cloud::ResourceManager::V3::TagValue.
|
411
|
+
# p result
|
412
|
+
#
|
413
|
+
def get_namespaced_tag_value request, options = nil
|
414
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
415
|
+
|
416
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest
|
417
|
+
|
418
|
+
# Converts hash and nil to an options object
|
419
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
420
|
+
|
421
|
+
# Customize the options with defaults
|
422
|
+
metadata = @config.rpcs.get_namespaced_tag_value.metadata.to_h
|
423
|
+
|
424
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
425
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
426
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
427
|
+
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
|
428
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
429
|
+
|
430
|
+
options.apply_defaults timeout: @config.rpcs.get_namespaced_tag_value.timeout,
|
431
|
+
metadata: metadata,
|
432
|
+
retry_policy: @config.rpcs.get_namespaced_tag_value.retry_policy
|
433
|
+
|
434
|
+
options.apply_defaults timeout: @config.timeout,
|
435
|
+
metadata: @config.metadata,
|
436
|
+
retry_policy: @config.retry_policy
|
437
|
+
|
438
|
+
@tag_values_stub.call_rpc :get_namespaced_tag_value, request, options: options do |response, operation|
|
439
|
+
yield response, operation if block_given?
|
440
|
+
return response
|
441
|
+
end
|
442
|
+
rescue ::GRPC::BadStatus => e
|
443
|
+
raise ::Google::Cloud::Error.from_error(e)
|
444
|
+
end
|
445
|
+
|
360
446
|
##
|
361
447
|
# Creates a TagValue as a child of the specified TagKey. If a another
|
362
448
|
# request with the same parameters is sent while the original request is in
|
363
|
-
# process the second request will receive an error. A maximum of
|
449
|
+
# process the second request will receive an error. A maximum of 1000
|
364
450
|
# TagValues can exist under a TagKey at any given time.
|
365
451
|
#
|
366
452
|
# @overload create_tag_value(request, options = nil)
|
@@ -379,11 +465,11 @@ module Google
|
|
379
465
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
380
466
|
#
|
381
467
|
# @param tag_value [::Google::Cloud::ResourceManager::V3::TagValue, ::Hash]
|
382
|
-
# Required. The TagValue to be created. Only fields `short_name`,
|
383
|
-
# and `parent` are considered during the creation request.
|
468
|
+
# Required. The TagValue to be created. Only fields `short_name`,
|
469
|
+
# `description`, and `parent` are considered during the creation request.
|
384
470
|
# @param validate_only [::Boolean]
|
385
|
-
# Optional. Set as true to perform the validations necessary for creating the
|
386
|
-
# but not actually perform the action.
|
471
|
+
# Optional. Set as true to perform the validations necessary for creating the
|
472
|
+
# resource, but not actually perform the action.
|
387
473
|
#
|
388
474
|
# @yield [response, operation] Access the result along with the RPC operation
|
389
475
|
# @yieldparam response [::Gapic::Operation]
|
@@ -468,15 +554,15 @@ module Google
|
|
468
554
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
469
555
|
#
|
470
556
|
# @param tag_value [::Google::Cloud::ResourceManager::V3::TagValue, ::Hash]
|
471
|
-
# Required. The new definition of the TagValue. Only fields `description` and
|
472
|
-
# fields can be updated by this request. If the `etag` field is
|
473
|
-
# must match the `etag` field of the existing ControlGroup.
|
474
|
-
# `
|
557
|
+
# Required. The new definition of the TagValue. Only fields `description` and
|
558
|
+
# `etag` fields can be updated by this request. If the `etag` field is
|
559
|
+
# nonempty, it must match the `etag` field of the existing ControlGroup.
|
560
|
+
# Otherwise, `ABORTED` will be returned.
|
475
561
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
476
562
|
# Optional. Fields to be updated.
|
477
563
|
# @param validate_only [::Boolean]
|
478
|
-
# Optional. True to perform validations necessary for updating the resource,
|
479
|
-
# actually perform the action.
|
564
|
+
# Optional. True to perform validations necessary for updating the resource,
|
565
|
+
# but not actually perform the action.
|
480
566
|
#
|
481
567
|
# @yield [response, operation] Access the result along with the RPC operation
|
482
568
|
# @yieldparam response [::Gapic::Operation]
|
@@ -570,13 +656,14 @@ module Google
|
|
570
656
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
571
657
|
#
|
572
658
|
# @param name [::String]
|
573
|
-
# Required. Resource name for TagValue to be deleted in the format
|
659
|
+
# Required. Resource name for TagValue to be deleted in the format
|
660
|
+
# tagValues/456.
|
574
661
|
# @param validate_only [::Boolean]
|
575
|
-
# Optional. Set as true to perform the validations necessary for deletion,
|
576
|
-
# actually perform the action.
|
662
|
+
# Optional. Set as true to perform the validations necessary for deletion,
|
663
|
+
# but not actually perform the action.
|
577
664
|
# @param etag [::String]
|
578
|
-
# Optional. The etag known to the client for the expected state of the
|
579
|
-
# is to be used for optimistic concurrency.
|
665
|
+
# Optional. The etag known to the client for the expected state of the
|
666
|
+
# TagValue. This is to be used for optimistic concurrency.
|
580
667
|
#
|
581
668
|
# @yield [response, operation] Access the result along with the RPC operation
|
582
669
|
# @yieldparam response [::Gapic::Operation]
|
@@ -978,9 +1065,9 @@ module Google
|
|
978
1065
|
# * (`String`) The path to a service account key file in JSON format
|
979
1066
|
# * (`Hash`) A service account key as a Hash
|
980
1067
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
981
|
-
# (see the [googleauth docs](https://
|
1068
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
982
1069
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
983
|
-
# (see the [signet docs](https://
|
1070
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
984
1071
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
985
1072
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
986
1073
|
# * (`nil`) indicating no credentials
|
@@ -1086,6 +1173,11 @@ module Google
|
|
1086
1173
|
#
|
1087
1174
|
attr_reader :get_tag_value
|
1088
1175
|
##
|
1176
|
+
# RPC-specific configuration for `get_namespaced_tag_value`
|
1177
|
+
# @return [::Gapic::Config::Method]
|
1178
|
+
#
|
1179
|
+
attr_reader :get_namespaced_tag_value
|
1180
|
+
##
|
1089
1181
|
# RPC-specific configuration for `create_tag_value`
|
1090
1182
|
# @return [::Gapic::Config::Method]
|
1091
1183
|
#
|
@@ -1122,6 +1214,8 @@ module Google
|
|
1122
1214
|
@list_tag_values = ::Gapic::Config::Method.new list_tag_values_config
|
1123
1215
|
get_tag_value_config = parent_rpcs.get_tag_value if parent_rpcs.respond_to? :get_tag_value
|
1124
1216
|
@get_tag_value = ::Gapic::Config::Method.new get_tag_value_config
|
1217
|
+
get_namespaced_tag_value_config = parent_rpcs.get_namespaced_tag_value if parent_rpcs.respond_to? :get_namespaced_tag_value
|
1218
|
+
@get_namespaced_tag_value = ::Gapic::Config::Method.new get_namespaced_tag_value_config
|
1125
1219
|
create_tag_value_config = parent_rpcs.create_tag_value if parent_rpcs.respond_to? :create_tag_value
|
1126
1220
|
@create_tag_value = ::Gapic::Config::Method.new create_tag_value_config
|
1127
1221
|
update_tag_value_config = parent_rpcs.update_tag_value if parent_rpcs.respond_to? :update_tag_value
|
@@ -620,9 +620,9 @@ module Google
|
|
620
620
|
# * (`String`) The path to a service account key file in JSON format
|
621
621
|
# * (`Hash`) A service account key as a Hash
|
622
622
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
623
|
-
# (see the [googleauth docs](https://
|
623
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
624
624
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
625
|
-
# (see the [signet docs](https://
|
625
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
626
626
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
627
627
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
628
628
|
# * (`nil`) indicating no credentials
|