google-cloud-resource_manager-v3 0.4.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/resource_manager/v3/folders/client.rb +47 -35
  4. data/lib/google/cloud/resource_manager/v3/folders/operations.rb +2 -2
  5. data/lib/google/cloud/resource_manager/v3/folders/rest/client.rb +47 -35
  6. data/lib/google/cloud/resource_manager/v3/folders/rest/operations.rb +2 -2
  7. data/lib/google/cloud/resource_manager/v3/organizations/client.rb +12 -10
  8. data/lib/google/cloud/resource_manager/v3/organizations/rest/client.rb +12 -10
  9. data/lib/google/cloud/resource_manager/v3/projects/client.rb +53 -54
  10. data/lib/google/cloud/resource_manager/v3/projects/operations.rb +2 -2
  11. data/lib/google/cloud/resource_manager/v3/projects/rest/client.rb +53 -54
  12. data/lib/google/cloud/resource_manager/v3/projects/rest/operations.rb +2 -2
  13. data/lib/google/cloud/resource_manager/v3/rest.rb +1 -0
  14. data/lib/google/cloud/resource_manager/v3/tag_bindings/client.rb +115 -17
  15. data/lib/google/cloud/resource_manager/v3/tag_bindings/operations.rb +2 -2
  16. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/client.rb +96 -17
  17. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/operations.rb +2 -2
  18. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest/service_stub.rb +57 -0
  19. data/lib/google/cloud/resource_manager/v3/tag_bindings/rest.rb +1 -1
  20. data/lib/google/cloud/resource_manager/v3/tag_bindings.rb +1 -1
  21. data/lib/google/cloud/resource_manager/v3/tag_holds/client.rb +640 -0
  22. data/lib/google/cloud/resource_manager/v3/tag_holds/credentials.rb +52 -0
  23. data/lib/google/cloud/resource_manager/v3/tag_holds/operations.rb +768 -0
  24. data/lib/google/cloud/resource_manager/v3/tag_holds/paths.rb +64 -0
  25. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/client.rb +533 -0
  26. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/operations.rb +793 -0
  27. data/lib/google/cloud/resource_manager/v3/tag_holds/rest/service_stub.rb +226 -0
  28. data/lib/google/cloud/resource_manager/v3/tag_holds/rest.rb +57 -0
  29. data/lib/google/cloud/resource_manager/v3/tag_holds.rb +60 -0
  30. data/lib/google/cloud/resource_manager/v3/tag_keys/client.rb +114 -24
  31. data/lib/google/cloud/resource_manager/v3/tag_keys/operations.rb +2 -2
  32. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/client.rb +99 -24
  33. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/operations.rb +2 -2
  34. data/lib/google/cloud/resource_manager/v3/tag_keys/rest/service_stub.rb +57 -0
  35. data/lib/google/cloud/resource_manager/v3/tag_values/client.rb +123 -29
  36. data/lib/google/cloud/resource_manager/v3/tag_values/operations.rb +2 -2
  37. data/lib/google/cloud/resource_manager/v3/tag_values/rest/client.rb +108 -29
  38. data/lib/google/cloud/resource_manager/v3/tag_values/rest/operations.rb +2 -2
  39. data/lib/google/cloud/resource_manager/v3/tag_values/rest/service_stub.rb +57 -0
  40. data/lib/google/cloud/resource_manager/v3/version.rb +1 -1
  41. data/lib/google/cloud/resource_manager/v3.rb +1 -0
  42. data/lib/google/cloud/resourcemanager/v3/folders_services_pb.rb +23 -17
  43. data/lib/google/cloud/resourcemanager/v3/projects_services_pb.rb +16 -13
  44. data/lib/google/cloud/resourcemanager/v3/tag_bindings_pb.rb +22 -0
  45. data/lib/google/cloud/resourcemanager/v3/tag_bindings_services_pb.rb +7 -5
  46. data/lib/google/cloud/resourcemanager/v3/tag_holds_pb.rb +63 -0
  47. data/lib/google/cloud/resourcemanager/v3/tag_holds_services_pb.rb +54 -0
  48. data/lib/google/cloud/resourcemanager/v3/tag_keys_pb.rb +11 -0
  49. data/lib/google/cloud/resourcemanager/v3/tag_keys_services_pb.rb +6 -2
  50. data/lib/google/cloud/resourcemanager/v3/tag_values_pb.rb +4 -0
  51. data/lib/google/cloud/resourcemanager/v3/tag_values_services_pb.rb +7 -4
  52. data/proto_docs/google/api/client.rb +67 -4
  53. data/proto_docs/google/cloud/resourcemanager/v3/folders.rb +25 -19
  54. data/proto_docs/google/cloud/resourcemanager/v3/organizations.rb +13 -11
  55. data/proto_docs/google/cloud/resourcemanager/v3/projects.rb +41 -45
  56. data/proto_docs/google/cloud/resourcemanager/v3/tag_bindings.rb +104 -15
  57. data/proto_docs/google/cloud/resourcemanager/v3/tag_holds.rb +161 -0
  58. data/proto_docs/google/cloud/resourcemanager/v3/tag_keys.rb +93 -27
  59. data/proto_docs/google/cloud/resourcemanager/v3/tag_values.rb +52 -29
  60. data/proto_docs/google/iam/v1/policy.rb +8 -4
  61. metadata +14 -2
@@ -0,0 +1,226 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/resourcemanager/v3/tag_holds_pb"
20
+
21
+ module Google
22
+ module Cloud
23
+ module ResourceManager
24
+ module V3
25
+ module TagHolds
26
+ module Rest
27
+ ##
28
+ # REST service stub for the TagHolds service.
29
+ # Service stub contains baseline method implementations
30
+ # including transcoding, making the REST call, and deserialing the response.
31
+ #
32
+ class ServiceStub
33
+ def initialize endpoint:, credentials:
34
+ # These require statements are intentionally placed here to initialize
35
+ # the REST modules only when it's required.
36
+ require "gapic/rest"
37
+
38
+ @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
39
+ numeric_enums: true,
40
+ raise_faraday_errors: false
41
+ end
42
+
43
+ ##
44
+ # Baseline implementation for the create_tag_hold REST call
45
+ #
46
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::CreateTagHoldRequest]
47
+ # A request object representing the call parameters. Required.
48
+ # @param options [::Gapic::CallOptions]
49
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
50
+ #
51
+ # @yield [result, operation] Access the result along with the TransportOperation object
52
+ # @yieldparam result [::Google::Longrunning::Operation]
53
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
54
+ #
55
+ # @return [::Google::Longrunning::Operation]
56
+ # A result object deserialized from the server's reply
57
+ def create_tag_hold request_pb, options = nil
58
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
59
+
60
+ verb, uri, query_string_params, body = ServiceStub.transcode_create_tag_hold_request request_pb
61
+ query_string_params = if query_string_params.any?
62
+ query_string_params.to_h { |p| p.split("=", 2) }
63
+ else
64
+ {}
65
+ end
66
+
67
+ response = @client_stub.make_http_request(
68
+ verb,
69
+ uri: uri,
70
+ body: body || "",
71
+ params: query_string_params,
72
+ options: options
73
+ )
74
+ operation = ::Gapic::Rest::TransportOperation.new response
75
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
76
+
77
+ yield result, operation if block_given?
78
+ result
79
+ end
80
+
81
+ ##
82
+ # Baseline implementation for the delete_tag_hold REST call
83
+ #
84
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::DeleteTagHoldRequest]
85
+ # A request object representing the call parameters. Required.
86
+ # @param options [::Gapic::CallOptions]
87
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
88
+ #
89
+ # @yield [result, operation] Access the result along with the TransportOperation object
90
+ # @yieldparam result [::Google::Longrunning::Operation]
91
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
92
+ #
93
+ # @return [::Google::Longrunning::Operation]
94
+ # A result object deserialized from the server's reply
95
+ def delete_tag_hold request_pb, options = nil
96
+ raise ::ArgumentError, "request must be provided" if request_pb.nil?
97
+
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_delete_tag_hold_request request_pb
99
+ query_string_params = if query_string_params.any?
100
+ query_string_params.to_h { |p| p.split("=", 2) }
101
+ else
102
+ {}
103
+ end
104
+
105
+ response = @client_stub.make_http_request(
106
+ verb,
107
+ uri: uri,
108
+ body: body || "",
109
+ params: query_string_params,
110
+ options: options
111
+ )
112
+ operation = ::Gapic::Rest::TransportOperation.new response
113
+ result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
114
+
115
+ yield result, operation if block_given?
116
+ result
117
+ end
118
+
119
+ ##
120
+ # Baseline implementation for the list_tag_holds REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::ListTagHoldsRequest]
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::ListTagHoldsResponse]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::ResourceManager::V3::ListTagHoldsResponse]
132
+ # A result object deserialized from the server's reply
133
+ def list_tag_holds 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_list_tag_holds_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::ListTagHoldsResponse.decode_json response.body, ignore_unknown_fields: true
152
+
153
+ yield result, operation if block_given?
154
+ result
155
+ end
156
+
157
+ ##
158
+ # @private
159
+ #
160
+ # GRPC transcoding helper method for the create_tag_hold REST call
161
+ #
162
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::CreateTagHoldRequest]
163
+ # A request object representing the call parameters. Required.
164
+ # @return [Array(String, [String, nil], Hash{String => String})]
165
+ # Uri, Body, Query string parameters
166
+ def self.transcode_create_tag_hold_request request_pb
167
+ transcoder = Gapic::Rest::GrpcTranscoder.new
168
+ .with_bindings(
169
+ uri_method: :post,
170
+ uri_template: "/v3/{parent}/tagHolds",
171
+ body: "tag_hold",
172
+ matches: [
173
+ ["parent", %r{^tagValues/[^/]+/?$}, false]
174
+ ]
175
+ )
176
+ transcoder.transcode request_pb
177
+ end
178
+
179
+ ##
180
+ # @private
181
+ #
182
+ # GRPC transcoding helper method for the delete_tag_hold REST call
183
+ #
184
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::DeleteTagHoldRequest]
185
+ # A request object representing the call parameters. Required.
186
+ # @return [Array(String, [String, nil], Hash{String => String})]
187
+ # Uri, Body, Query string parameters
188
+ def self.transcode_delete_tag_hold_request request_pb
189
+ transcoder = Gapic::Rest::GrpcTranscoder.new
190
+ .with_bindings(
191
+ uri_method: :delete,
192
+ uri_template: "/v3/{name}",
193
+ matches: [
194
+ ["name", %r{^tagValues/[^/]+/tagHolds/[^/]+/?$}, false]
195
+ ]
196
+ )
197
+ transcoder.transcode request_pb
198
+ end
199
+
200
+ ##
201
+ # @private
202
+ #
203
+ # GRPC transcoding helper method for the list_tag_holds REST call
204
+ #
205
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::ListTagHoldsRequest]
206
+ # A request object representing the call parameters. Required.
207
+ # @return [Array(String, [String, nil], Hash{String => String})]
208
+ # Uri, Body, Query string parameters
209
+ def self.transcode_list_tag_holds_request request_pb
210
+ transcoder = Gapic::Rest::GrpcTranscoder.new
211
+ .with_bindings(
212
+ uri_method: :get,
213
+ uri_template: "/v3/{parent}/tagHolds",
214
+ matches: [
215
+ ["parent", %r{^tagValues/[^/]+/?$}, false]
216
+ ]
217
+ )
218
+ transcoder.transcode request_pb
219
+ end
220
+ end
221
+ end
222
+ end
223
+ end
224
+ end
225
+ end
226
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/rest"
20
+ require "gapic/config"
21
+ require "gapic/config/method"
22
+
23
+ require "google/cloud/resource_manager/v3/version"
24
+
25
+ require "google/cloud/resource_manager/v3/tag_holds/credentials"
26
+ require "google/cloud/resource_manager/v3/tag_holds/paths"
27
+ require "google/cloud/resource_manager/v3/tag_holds/rest/operations"
28
+ require "google/cloud/resource_manager/v3/tag_holds/rest/client"
29
+
30
+ module Google
31
+ module Cloud
32
+ module ResourceManager
33
+ module V3
34
+ ##
35
+ # Allow users to create and manage TagHolds for TagValues. TagHolds represent
36
+ # the use of a Tag Value that is not captured by TagBindings but
37
+ # should still block TagValue deletion (such as a reference in a policy
38
+ # condition). This service provides isolated failure domains by cloud location
39
+ # so that TagHolds can be managed in the same location as their usage.
40
+ #
41
+ # To load this service and instantiate a REST client:
42
+ #
43
+ # require "google/cloud/resource_manager/v3/tag_holds/rest"
44
+ # client = ::Google::Cloud::ResourceManager::V3::TagHolds::Rest::Client.new
45
+ #
46
+ module TagHolds
47
+ # Client for the REST transport
48
+ module Rest
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
55
+
56
+ helper_path = ::File.join __dir__, "rest", "helpers.rb"
57
+ require "google/cloud/resource_manager/v3/tag_holds/rest/helpers" if ::File.file? helper_path
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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/resource_manager/v3/version"
24
+
25
+ require "google/cloud/resource_manager/v3/tag_holds/credentials"
26
+ require "google/cloud/resource_manager/v3/tag_holds/paths"
27
+ require "google/cloud/resource_manager/v3/tag_holds/operations"
28
+ require "google/cloud/resource_manager/v3/tag_holds/client"
29
+ require "google/cloud/resource_manager/v3/tag_holds/rest"
30
+
31
+ module Google
32
+ module Cloud
33
+ module ResourceManager
34
+ module V3
35
+ ##
36
+ # Allow users to create and manage TagHolds for TagValues. TagHolds represent
37
+ # the use of a Tag Value that is not captured by TagBindings but
38
+ # should still block TagValue deletion (such as a reference in a policy
39
+ # condition). This service provides isolated failure domains by cloud location
40
+ # so that TagHolds can be managed in the same location as their usage.
41
+ #
42
+ # @example Load this service and instantiate a gRPC client
43
+ #
44
+ # require "google/cloud/resource_manager/v3/tag_holds"
45
+ # client = ::Google::Cloud::ResourceManager::V3::TagHolds::Client.new
46
+ #
47
+ # @example Load this service and instantiate a REST client
48
+ #
49
+ # require "google/cloud/resource_manager/v3/tag_holds/rest"
50
+ # client = ::Google::Cloud::ResourceManager::V3::TagHolds::Rest::Client.new
51
+ #
52
+ module TagHolds
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+
59
+ helper_path = ::File.join __dir__, "tag_holds", "helpers.rb"
60
+ require "google/cloud/resource_manager/v3/tag_holds/helpers" if ::File.file? helper_path
@@ -199,12 +199,13 @@ 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. The resource name of the new TagKey's parent.
203
- # Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
202
+ # Required. The resource name of the TagKey's parent.
203
+ # Must be of the form `organizations/{org_id}` or `projects/{project_id}` or
204
+ # `projects/{project_number}`
204
205
  # @param page_size [::Integer]
205
- # Optional. The maximum number of TagKeys to return in the response. The server allows
206
- # a maximum of 300 TagKeys to return. If unspecified, the server will use 100
207
- # as the default.
206
+ # Optional. The maximum number of TagKeys to return in the response. The
207
+ # server allows a maximum of 300 TagKeys to return. If unspecified, the
208
+ # server will use 100 as the default.
208
209
  # @param page_token [::String]
209
210
  # Optional. A pagination token returned from a previous call to `ListTagKey`
210
211
  # that indicates where this listing should continue from.
@@ -357,11 +358,93 @@ module Google
357
358
  raise ::Google::Cloud::Error.from_error(e)
358
359
  end
359
360
 
361
+ ##
362
+ # Retrieves a TagKey by its namespaced name.
363
+ # This method will return `PERMISSION_DENIED` if the key does not exist
364
+ # or the user does not have permission to view it.
365
+ #
366
+ # @overload get_namespaced_tag_key(request, options = nil)
367
+ # Pass arguments to `get_namespaced_tag_key` via a request object, either of type
368
+ # {::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest} or an equivalent Hash.
369
+ #
370
+ # @param request [::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest, ::Hash]
371
+ # A request object representing the call parameters. Required. To specify no
372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
373
+ # @param options [::Gapic::CallOptions, ::Hash]
374
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
375
+ #
376
+ # @overload get_namespaced_tag_key(name: nil)
377
+ # Pass arguments to `get_namespaced_tag_key` via keyword arguments. Note that at
378
+ # least one keyword argument is required. To specify no parameters, or to keep all
379
+ # the default parameter values, pass an empty Hash as a request object (see above).
380
+ #
381
+ # @param name [::String]
382
+ # Required. A namespaced tag key name in the format
383
+ # `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
384
+ # "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
385
+ # name "bar" under the project `r2-d2`.
386
+ #
387
+ # @yield [response, operation] Access the result along with the RPC operation
388
+ # @yieldparam response [::Google::Cloud::ResourceManager::V3::TagKey]
389
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
390
+ #
391
+ # @return [::Google::Cloud::ResourceManager::V3::TagKey]
392
+ #
393
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
394
+ #
395
+ # @example Basic example
396
+ # require "google/cloud/resource_manager/v3"
397
+ #
398
+ # # Create a client object. The client can be reused for multiple calls.
399
+ # client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
400
+ #
401
+ # # Create a request. To set request fields, pass in keyword arguments.
402
+ # request = Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest.new
403
+ #
404
+ # # Call the get_namespaced_tag_key method.
405
+ # result = client.get_namespaced_tag_key request
406
+ #
407
+ # # The returned object is of type Google::Cloud::ResourceManager::V3::TagKey.
408
+ # p result
409
+ #
410
+ def get_namespaced_tag_key request, options = nil
411
+ raise ::ArgumentError, "request must be provided" if request.nil?
412
+
413
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest
414
+
415
+ # Converts hash and nil to an options object
416
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
417
+
418
+ # Customize the options with defaults
419
+ metadata = @config.rpcs.get_namespaced_tag_key.metadata.to_h
420
+
421
+ # Set x-goog-api-client and x-goog-user-project headers
422
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
423
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
424
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
425
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
426
+
427
+ options.apply_defaults timeout: @config.rpcs.get_namespaced_tag_key.timeout,
428
+ metadata: metadata,
429
+ retry_policy: @config.rpcs.get_namespaced_tag_key.retry_policy
430
+
431
+ options.apply_defaults timeout: @config.timeout,
432
+ metadata: @config.metadata,
433
+ retry_policy: @config.retry_policy
434
+
435
+ @tag_keys_stub.call_rpc :get_namespaced_tag_key, request, options: options do |response, operation|
436
+ yield response, operation if block_given?
437
+ return response
438
+ end
439
+ rescue ::GRPC::BadStatus => e
440
+ raise ::Google::Cloud::Error.from_error(e)
441
+ end
442
+
360
443
  ##
361
444
  # Creates a new TagKey. If another request with the same parameters is
362
445
  # sent while the original request is in process, the second request
363
- # will receive an error. A maximum of 300 TagKeys can exist under a parent at
364
- # any given time.
446
+ # will receive an error. A maximum of 1000 TagKeys can exist under a parent
447
+ # at any given time.
365
448
  #
366
449
  # @overload create_tag_key(request, options = nil)
367
450
  # Pass arguments to `create_tag_key` via a request object, either of type
@@ -379,11 +462,11 @@ module Google
379
462
  # the default parameter values, pass an empty Hash as a request object (see above).
380
463
  #
381
464
  # @param tag_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
382
- # Required. The TagKey to be created. Only fields `short_name`, `description`,
383
- # and `parent` are considered during the creation request.
465
+ # Required. The TagKey to be created. Only fields `short_name`,
466
+ # `description`, and `parent` are considered during the creation request.
384
467
  # @param validate_only [::Boolean]
385
- # Optional. Set to true to perform validations necessary for creating the resource, but
386
- # not actually perform the action.
468
+ # Optional. Set to true to perform validations necessary for creating the
469
+ # resource, but not actually perform the action.
387
470
  #
388
471
  # @yield [response, operation] Access the result along with the RPC operation
389
472
  # @yieldparam response [::Gapic::Operation]
@@ -468,10 +551,10 @@ module Google
468
551
  # the default parameter values, pass an empty Hash as a request object (see above).
469
552
  #
470
553
  # @param tag_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
471
- # Required. The new definition of the TagKey. Only the `description` and `etag` fields
472
- # can be updated by this request. If the `etag` field is not empty, it
473
- # must match the `etag` field of the existing tag key. Otherwise,
474
- # `FAILED_PRECONDITION` will be returned.
554
+ # Required. The new definition of the TagKey. Only the `description` and
555
+ # `etag` fields can be updated by this request. If the `etag` field is not
556
+ # empty, it must match the `etag` field of the existing tag key. Otherwise,
557
+ # `ABORTED` will be returned.
475
558
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
476
559
  # Fields to be updated. The mask may only contain `description` or
477
560
  # `etag`. If omitted entirely, both `description` and `etag` are assumed to
@@ -572,15 +655,15 @@ module Google
572
655
  # the default parameter values, pass an empty Hash as a request object (see above).
573
656
  #
574
657
  # @param name [::String]
575
- # Required. The resource name of a TagKey to be deleted in the format `tagKeys/123`.
576
- # The TagKey cannot be a parent of any existing TagValues or it will not be
577
- # deleted successfully.
658
+ # Required. The resource name of a TagKey to be deleted in the format
659
+ # `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
660
+ # it will not be deleted successfully.
578
661
  # @param validate_only [::Boolean]
579
- # Optional. Set as true to perform validations necessary for deletion, but not actually
580
- # perform the action.
662
+ # Optional. Set as true to perform validations necessary for deletion, but
663
+ # not actually perform the action.
581
664
  # @param etag [::String]
582
- # Optional. The etag known to the client for the expected state of the TagKey. This is
583
- # to be used for optimistic concurrency.
665
+ # Optional. The etag known to the client for the expected state of the
666
+ # TagKey. This is to be used for optimistic concurrency.
584
667
  #
585
668
  # @yield [response, operation] Access the result along with the RPC operation
586
669
  # @yieldparam response [::Gapic::Operation]
@@ -982,9 +1065,9 @@ module Google
982
1065
  # * (`String`) The path to a service account key file in JSON format
983
1066
  # * (`Hash`) A service account key as a Hash
984
1067
  # * (`Google::Auth::Credentials`) A googleauth credentials object
985
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
1068
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
986
1069
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
987
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
1070
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
988
1071
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
989
1072
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
990
1073
  # * (`nil`) indicating no credentials
@@ -1090,6 +1173,11 @@ module Google
1090
1173
  #
1091
1174
  attr_reader :get_tag_key
1092
1175
  ##
1176
+ # RPC-specific configuration for `get_namespaced_tag_key`
1177
+ # @return [::Gapic::Config::Method]
1178
+ #
1179
+ attr_reader :get_namespaced_tag_key
1180
+ ##
1093
1181
  # RPC-specific configuration for `create_tag_key`
1094
1182
  # @return [::Gapic::Config::Method]
1095
1183
  #
@@ -1126,6 +1214,8 @@ module Google
1126
1214
  @list_tag_keys = ::Gapic::Config::Method.new list_tag_keys_config
1127
1215
  get_tag_key_config = parent_rpcs.get_tag_key if parent_rpcs.respond_to? :get_tag_key
1128
1216
  @get_tag_key = ::Gapic::Config::Method.new get_tag_key_config
1217
+ get_namespaced_tag_key_config = parent_rpcs.get_namespaced_tag_key if parent_rpcs.respond_to? :get_namespaced_tag_key
1218
+ @get_namespaced_tag_key = ::Gapic::Config::Method.new get_namespaced_tag_key_config
1129
1219
  create_tag_key_config = parent_rpcs.create_tag_key if parent_rpcs.respond_to? :create_tag_key
1130
1220
  @create_tag_key = ::Gapic::Config::Method.new create_tag_key_config
1131
1221
  update_tag_key_config = parent_rpcs.update_tag_key if parent_rpcs.respond_to? :update_tag_key
@@ -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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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