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
@@ -190,15 +190,14 @@ 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. Resource name for TagKey, parent of the TagValues to be listed,
194
- # in the format `tagKeys/123`.
193
+ # Required.
195
194
  # @param page_size [::Integer]
196
- # Optional. The maximum number of TagValues to return in the response. The server
197
- # allows a maximum of 300 TagValues to return. If unspecified, the server
198
- # will use 100 as the default.
195
+ # Optional. The maximum number of TagValues to return in the response. The
196
+ # server allows a maximum of 300 TagValues to return. If unspecified, the
197
+ # server will use 100 as the default.
199
198
  # @param page_token [::String]
200
- # Optional. A pagination token returned from a previous call to `ListTagValues`
201
- # that indicates where this listing should continue from.
199
+ # Optional. A pagination token returned from a previous call to
200
+ # `ListTagValues` that indicates where this listing should continue from.
202
201
  # @yield [result, operation] Access the result along with the TransportOperation object
203
202
  # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ResourceManager::V3::TagValue>]
204
203
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -243,9 +242,8 @@ module Google
243
242
  end
244
243
 
245
244
  ##
246
- # Retrieves TagValue. If the TagValue or namespaced name does not exist, or
247
- # if the user does not have permission to view it, this method will return
248
- # `PERMISSION_DENIED`.
245
+ # Retrieves a TagValue. This method will return `PERMISSION_DENIED` if the
246
+ # value does not exist or the user does not have permission to view it.
249
247
  #
250
248
  # @overload get_tag_value(request, options = nil)
251
249
  # Pass arguments to `get_tag_value` via a request object, either of type
@@ -263,7 +261,8 @@ module Google
263
261
  # the default parameter values, pass an empty Hash as a request object (see above).
264
262
  #
265
263
  # @param name [::String]
266
- # Required. Resource name for TagValue to be fetched in the format `tagValues/456`.
264
+ # Required. Resource name for TagValue to be fetched in the format
265
+ # `tagValues/456`.
267
266
  # @yield [result, operation] Access the result along with the TransportOperation object
268
267
  # @yieldparam result [::Google::Cloud::ResourceManager::V3::TagValue]
269
268
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -306,10 +305,82 @@ module Google
306
305
  raise ::Google::Cloud::Error.from_error(e)
307
306
  end
308
307
 
308
+ ##
309
+ # Retrieves a TagValue by its namespaced name.
310
+ # This method will return `PERMISSION_DENIED` if the value does not exist
311
+ # or the user does not have permission to view it.
312
+ #
313
+ # @overload get_namespaced_tag_value(request, options = nil)
314
+ # Pass arguments to `get_namespaced_tag_value` via a request object, either of type
315
+ # {::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest} or an equivalent Hash.
316
+ #
317
+ # @param request [::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest, ::Hash]
318
+ # A request object representing the call parameters. Required. To specify no
319
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
320
+ # @param options [::Gapic::CallOptions, ::Hash]
321
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
322
+ #
323
+ # @overload get_namespaced_tag_value(name: nil)
324
+ # Pass arguments to `get_namespaced_tag_value` via keyword arguments. Note that at
325
+ # least one keyword argument is required. To specify no parameters, or to keep all
326
+ # the default parameter values, pass an empty Hash as a request object (see above).
327
+ #
328
+ # @param name [::String]
329
+ # Required. A namespaced tag value name in the following format:
330
+ #
331
+ # `{parentId}/{tagKeyShort}/{tagValueShort}`
332
+ #
333
+ # Examples:
334
+ # - `42/foo/abc` for a value with short name "abc" under the key with short
335
+ # name "foo" under the organization with ID 42
336
+ # - `r2-d2/bar/xyz` for a value with short name "xyz" under the key with
337
+ # short name "bar" under the project with ID "r2-d2"
338
+ # @yield [result, operation] Access the result along with the TransportOperation object
339
+ # @yieldparam result [::Google::Cloud::ResourceManager::V3::TagValue]
340
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
341
+ #
342
+ # @return [::Google::Cloud::ResourceManager::V3::TagValue]
343
+ #
344
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
345
+ def get_namespaced_tag_value request, options = nil
346
+ raise ::ArgumentError, "request must be provided" if request.nil?
347
+
348
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest
349
+
350
+ # Converts hash and nil to an options object
351
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
352
+
353
+ # Customize the options with defaults
354
+ call_metadata = @config.rpcs.get_namespaced_tag_value.metadata.to_h
355
+
356
+ # Set x-goog-api-client and x-goog-user-project headers
357
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
358
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
359
+ gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION,
360
+ transports_version_send: [:rest]
361
+
362
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
363
+
364
+ options.apply_defaults timeout: @config.rpcs.get_namespaced_tag_value.timeout,
365
+ metadata: call_metadata,
366
+ retry_policy: @config.rpcs.get_namespaced_tag_value.retry_policy
367
+
368
+ options.apply_defaults timeout: @config.timeout,
369
+ metadata: @config.metadata,
370
+ retry_policy: @config.retry_policy
371
+
372
+ @tag_values_stub.get_namespaced_tag_value request, options do |result, operation|
373
+ yield result, operation if block_given?
374
+ return result
375
+ end
376
+ rescue ::Gapic::Rest::Error => e
377
+ raise ::Google::Cloud::Error.from_error(e)
378
+ end
379
+
309
380
  ##
310
381
  # Creates a TagValue as a child of the specified TagKey. If a another
311
382
  # request with the same parameters is sent while the original request is in
312
- # process the second request will receive an error. A maximum of 300
383
+ # process the second request will receive an error. A maximum of 1000
313
384
  # TagValues can exist under a TagKey at any given time.
314
385
  #
315
386
  # @overload create_tag_value(request, options = nil)
@@ -328,11 +399,11 @@ module Google
328
399
  # the default parameter values, pass an empty Hash as a request object (see above).
329
400
  #
330
401
  # @param tag_value [::Google::Cloud::ResourceManager::V3::TagValue, ::Hash]
331
- # Required. The TagValue to be created. Only fields `short_name`, `description`,
332
- # and `parent` are considered during the creation request.
402
+ # Required. The TagValue to be created. Only fields `short_name`,
403
+ # `description`, and `parent` are considered during the creation request.
333
404
  # @param validate_only [::Boolean]
334
- # Optional. Set as true to perform the validations necessary for creating the resource,
335
- # but not actually perform the action.
405
+ # Optional. Set as true to perform the validations necessary for creating the
406
+ # resource, but not actually perform the action.
336
407
  # @yield [result, operation] Access the result along with the TransportOperation object
337
408
  # @yieldparam result [::Gapic::Operation]
338
409
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -395,15 +466,15 @@ module Google
395
466
  # the default parameter values, pass an empty Hash as a request object (see above).
396
467
  #
397
468
  # @param tag_value [::Google::Cloud::ResourceManager::V3::TagValue, ::Hash]
398
- # Required. The new definition of the TagValue. Only fields `description` and `etag`
399
- # fields can be updated by this request. If the `etag` field is nonempty, it
400
- # must match the `etag` field of the existing ControlGroup. Otherwise,
401
- # `FAILED_PRECONDITION` will be returned.
469
+ # Required. The new definition of the TagValue. Only fields `description` and
470
+ # `etag` fields can be updated by this request. If the `etag` field is
471
+ # nonempty, it must match the `etag` field of the existing ControlGroup.
472
+ # Otherwise, `ABORTED` will be returned.
402
473
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
403
474
  # Optional. Fields to be updated.
404
475
  # @param validate_only [::Boolean]
405
- # Optional. True to perform validations necessary for updating the resource, but not
406
- # actually perform the action.
476
+ # Optional. True to perform validations necessary for updating the resource,
477
+ # but not actually perform the action.
407
478
  # @yield [result, operation] Access the result along with the TransportOperation object
408
479
  # @yieldparam result [::Gapic::Operation]
409
480
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -467,13 +538,14 @@ module Google
467
538
  # the default parameter values, pass an empty Hash as a request object (see above).
468
539
  #
469
540
  # @param name [::String]
470
- # Required. Resource name for TagValue to be deleted in the format tagValues/456.
541
+ # Required. Resource name for TagValue to be deleted in the format
542
+ # tagValues/456.
471
543
  # @param validate_only [::Boolean]
472
- # Optional. Set as true to perform the validations necessary for deletion, but not
473
- # actually perform the action.
544
+ # Optional. Set as true to perform the validations necessary for deletion,
545
+ # but not actually perform the action.
474
546
  # @param etag [::String]
475
- # Optional. The etag known to the client for the expected state of the TagValue. This
476
- # is to be used for optimistic concurrency.
547
+ # Optional. The etag known to the client for the expected state of the
548
+ # TagValue. This is to be used for optimistic concurrency.
477
549
  # @yield [result, operation] Access the result along with the TransportOperation object
478
550
  # @yieldparam result [::Gapic::Operation]
479
551
  # @yieldparam operation [::Gapic::Rest::TransportOperation]
@@ -776,9 +848,9 @@ module Google
776
848
  # * (`String`) The path to a service account key file in JSON format
777
849
  # * (`Hash`) A service account key as a Hash
778
850
  # * (`Google::Auth::Credentials`) A googleauth credentials object
779
- # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
851
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
780
852
  # * (`Signet::OAuth2::Client`) A signet oauth2 client object
781
- # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
853
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
782
854
  # * (`nil`) indicating no credentials
783
855
  # @return [::Object]
784
856
  # @!attribute [rw] scope
@@ -872,6 +944,11 @@ module Google
872
944
  #
873
945
  attr_reader :get_tag_value
874
946
  ##
947
+ # RPC-specific configuration for `get_namespaced_tag_value`
948
+ # @return [::Gapic::Config::Method]
949
+ #
950
+ attr_reader :get_namespaced_tag_value
951
+ ##
875
952
  # RPC-specific configuration for `create_tag_value`
876
953
  # @return [::Gapic::Config::Method]
877
954
  #
@@ -908,6 +985,8 @@ module Google
908
985
  @list_tag_values = ::Gapic::Config::Method.new list_tag_values_config
909
986
  get_tag_value_config = parent_rpcs.get_tag_value if parent_rpcs.respond_to? :get_tag_value
910
987
  @get_tag_value = ::Gapic::Config::Method.new get_tag_value_config
988
+ get_namespaced_tag_value_config = parent_rpcs.get_namespaced_tag_value if parent_rpcs.respond_to? :get_namespaced_tag_value
989
+ @get_namespaced_tag_value = ::Gapic::Config::Method.new get_namespaced_tag_value_config
911
990
  create_tag_value_config = parent_rpcs.create_tag_value if parent_rpcs.respond_to? :create_tag_value
912
991
  @create_tag_value = ::Gapic::Config::Method.new create_tag_value_config
913
992
  update_tag_value_config = parent_rpcs.update_tag_value if parent_rpcs.respond_to? :update_tag_value
@@ -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://googleapis.dev/ruby/googleauth/latest/index.html))
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://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
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_value REST call
121
+ #
122
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest]
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::TagValue]
129
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
130
+ #
131
+ # @return [::Google::Cloud::ResourceManager::V3::TagValue]
132
+ # A result object deserialized from the server's reply
133
+ def get_namespaced_tag_value 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_value_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::TagValue.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_value 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_value REST call
429
+ #
430
+ # @param request_pb [::Google::Cloud::ResourceManager::V3::GetNamespacedTagValueRequest]
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_value_request request_pb
435
+ transcoder = Gapic::Rest::GrpcTranscoder.new
436
+ .with_bindings(
437
+ uri_method: :get,
438
+ uri_template: "/v3/tagValues/namespaced",
439
+ matches: []
440
+ )
441
+ transcoder.transcode request_pb
442
+ end
443
+
387
444
  ##
388
445
  # @private
389
446
  #
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ResourceManager
23
23
  module V3
24
- VERSION = "0.4.0"
24
+ VERSION = "0.5.1"
25
25
  end
26
26
  end
27
27
  end
@@ -20,6 +20,7 @@ require "google/cloud/resource_manager/v3/folders"
20
20
  require "google/cloud/resource_manager/v3/organizations"
21
21
  require "google/cloud/resource_manager/v3/projects"
22
22
  require "google/cloud/resource_manager/v3/tag_bindings"
23
+ require "google/cloud/resource_manager/v3/tag_holds"
23
24
  require "google/cloud/resource_manager/v3/tag_keys"
24
25
  require "google/cloud/resource_manager/v3/tag_values"
25
26
  require "google/cloud/resource_manager/v3/version"
@@ -87,7 +87,9 @@ module Google
87
87
  # Updates a folder, changing its `display_name`.
88
88
  # Changes to the folder `display_name` will be rejected if they violate
89
89
  # either the `display_name` formatting rules or the naming constraints
90
- # described in the [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation.
90
+ # described in the
91
+ # [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder]
92
+ # documentation.
91
93
  #
92
94
  # The folder's `display_name` must start and end with a letter or digit,
93
95
  # may contain letters, digits, spaces, hyphens and underscores and can be
@@ -114,29 +116,33 @@ module Google
114
116
  # `FolderOperation` message as an aid to stateless clients.
115
117
  # Folder moves will be rejected if they violate either the naming, height,
116
118
  # or fanout constraints described in the
117
- # [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation.
118
- # The caller must have `resourcemanager.folders.move` permission on the
119
- # folder's current and proposed new parent.
119
+ # [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder]
120
+ # documentation. The caller must have `resourcemanager.folders.move`
121
+ # permission on the folder's current and proposed new parent.
120
122
  rpc :MoveFolder, ::Google::Cloud::ResourceManager::V3::MoveFolderRequest, ::Google::Longrunning::Operation
121
123
  # Requests deletion of a folder. The folder is moved into the
122
- # [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED] state
123
- # immediately, and is deleted approximately 30 days later. This method may
124
- # only be called on an empty folder, where a folder is empty if it doesn't
125
- # contain any folders or projects in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state.
126
- # If called on a folder in [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
124
+ # [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
125
+ # state immediately, and is deleted approximately 30 days later. This method
126
+ # may only be called on an empty folder, where a folder is empty if it
127
+ # doesn't contain any folders or projects in the
128
+ # [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. If
129
+ # called on a folder in
130
+ # [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Folder.State.DELETE_REQUESTED]
127
131
  # state the operation will result in a no-op success.
128
132
  # The caller must have `resourcemanager.folders.delete` permission on the
129
133
  # identified folder.
130
134
  rpc :DeleteFolder, ::Google::Cloud::ResourceManager::V3::DeleteFolderRequest, ::Google::Longrunning::Operation
131
135
  # Cancels the deletion request for a folder. This method may be called on a
132
- # folder in any state. If the folder is in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE]
133
- # state the result will be a no-op success. In order to succeed, the folder's
134
- # parent must be in the [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In addition,
135
- # reintroducing the folder into the tree must not violate folder naming,
136
- # height, and fanout constraints described in the
137
- # [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder] documentation.
138
- # The caller must have `resourcemanager.folders.undelete` permission on the
139
- # identified folder.
136
+ # folder in any state. If the folder is in the
137
+ # [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state the
138
+ # result will be a no-op success. In order to succeed, the folder's parent
139
+ # must be in the
140
+ # [ACTIVE][google.cloud.resourcemanager.v3.Folder.State.ACTIVE] state. In
141
+ # addition, reintroducing the folder into the tree must not violate folder
142
+ # naming, height, and fanout constraints described in the
143
+ # [CreateFolder][google.cloud.resourcemanager.v3.Folders.CreateFolder]
144
+ # documentation. The caller must have `resourcemanager.folders.undelete`
145
+ # permission on the identified folder.
140
146
  rpc :UndeleteFolder, ::Google::Cloud::ResourceManager::V3::UndeleteFolderRequest, ::Google::Longrunning::Operation
141
147
  # Gets the access control policy for a folder. The returned policy may be
142
148
  # empty if no such policy or resource exists. The `resource` field should
@@ -78,9 +78,12 @@ module Google
78
78
  # Upon success, the `Operation.response` field will be populated with the
79
79
  # moved project.
80
80
  #
81
- # The caller must have `resourcemanager.projects.update` permission on the
82
- # project and have `resourcemanager.projects.move` permission on the
83
- # project's current and proposed new parent.
81
+ # The caller must have `resourcemanager.projects.move` permission on the
82
+ # project, on the project's current and proposed new parent.
83
+ #
84
+ # If project has no current parent, or it currently does not have an
85
+ # associated organization resource, you will also need the
86
+ # `resourcemanager.projects.setIamPolicy` permission in the project.
84
87
  #
85
88
  #
86
89
  rpc :MoveProject, ::Google::Cloud::ResourceManager::V3::MoveProjectRequest, ::Google::Longrunning::Operation
@@ -92,7 +95,8 @@ module Google
92
95
  #
93
96
  # This method changes the Project's lifecycle state from
94
97
  # [ACTIVE][google.cloud.resourcemanager.v3.Project.State.ACTIVE]
95
- # to [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED].
98
+ # to
99
+ # [DELETE_REQUESTED][google.cloud.resourcemanager.v3.Project.State.DELETE_REQUESTED].
96
100
  # The deletion starts at an unspecified time,
97
101
  # at which point the Project is no longer accessible.
98
102
  #
@@ -127,10 +131,12 @@ module Google
127
131
  # The caller must have `resourcemanager.projects.undelete` permission for
128
132
  # this project.
129
133
  rpc :UndeleteProject, ::Google::Cloud::ResourceManager::V3::UndeleteProjectRequest, ::Google::Longrunning::Operation
130
- # Returns the IAM access control policy for the specified project.
134
+ # Returns the IAM access control policy for the specified project, in the
135
+ # format `projects/{ProjectIdOrNumber}` e.g. projects/123.
131
136
  # Permission is denied if the policy or the resource do not exist.
132
137
  rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy
133
- # Sets the IAM access control policy for the specified project.
138
+ # Sets the IAM access control policy for the specified project, in the
139
+ # format `projects/{ProjectIdOrNumber}` e.g. projects/123.
134
140
  #
135
141
  # CAUTION: This method will replace the existing policy, and cannot be used
136
142
  # to append additional IAM settings.
@@ -162,20 +168,17 @@ module Google
162
168
  # `setIamPolicy()`;
163
169
  # they must be sent only using the Cloud Platform Console.
164
170
  #
165
- # + Membership changes that leave the project without any owners that have
166
- # accepted the Terms of Service (ToS) will be rejected.
167
- #
168
171
  # + If the project is not part of an organization, there must be at least
169
172
  # one owner who has accepted the Terms of Service (ToS) agreement in the
170
173
  # policy. Calling `setIamPolicy()` to remove the last ToS-accepted owner
171
174
  # from the policy will fail. This restriction also applies to legacy
172
175
  # projects that no longer have owners who have accepted the ToS. Edits to
173
176
  # IAM policies will be rejected until the lack of a ToS-accepting owner is
174
- # rectified.
175
- #
176
- # + Calling this method requires enabling the App Engine Admin API.
177
+ # rectified. If the project is part of an organization, you can remove all
178
+ # owners, potentially making the organization inaccessible.
177
179
  rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy
178
- # Returns permissions that a caller has on the specified project.
180
+ # Returns permissions that a caller has on the specified project, in the
181
+ # format `projects/{ProjectIdOrNumber}` e.g. projects/123..
179
182
  rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse
180
183
  end
181
184
 
@@ -8,6 +8,7 @@ require 'google/api/client_pb'
8
8
  require 'google/api/field_behavior_pb'
9
9
  require 'google/api/resource_pb'
10
10
  require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/empty_pb'
11
12
 
12
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
14
  add_file("google/cloud/resourcemanager/v3/tag_bindings.proto", :syntax => :proto3) do
@@ -15,6 +16,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
15
16
  optional :name, :string, 1
16
17
  optional :parent, :string, 2
17
18
  optional :tag_value, :string, 3
19
+ optional :tag_value_namespaced_name, :string, 4
18
20
  end
19
21
  add_message "google.cloud.resourcemanager.v3.CreateTagBindingMetadata" do
20
22
  end
@@ -36,6 +38,23 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
36
38
  repeated :tag_bindings, :message, 1, "google.cloud.resourcemanager.v3.TagBinding"
37
39
  optional :next_page_token, :string, 2
38
40
  end
41
+ add_message "google.cloud.resourcemanager.v3.ListEffectiveTagsRequest" do
42
+ optional :parent, :string, 1
43
+ optional :page_size, :int32, 2
44
+ optional :page_token, :string, 3
45
+ end
46
+ add_message "google.cloud.resourcemanager.v3.ListEffectiveTagsResponse" do
47
+ repeated :effective_tags, :message, 1, "google.cloud.resourcemanager.v3.EffectiveTag"
48
+ optional :next_page_token, :string, 2
49
+ end
50
+ add_message "google.cloud.resourcemanager.v3.EffectiveTag" do
51
+ optional :tag_value, :string, 1
52
+ optional :namespaced_tag_value, :string, 2
53
+ optional :tag_key, :string, 3
54
+ optional :namespaced_tag_key, :string, 4
55
+ optional :tag_key_parent_name, :string, 6
56
+ optional :inherited, :bool, 5
57
+ end
39
58
  end
40
59
  end
41
60
 
@@ -50,6 +69,9 @@ module Google
50
69
  DeleteTagBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.DeleteTagBindingRequest").msgclass
51
70
  ListTagBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.ListTagBindingsRequest").msgclass
52
71
  ListTagBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.ListTagBindingsResponse").msgclass
72
+ ListEffectiveTagsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.ListEffectiveTagsRequest").msgclass
73
+ ListEffectiveTagsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.ListEffectiveTagsResponse").msgclass
74
+ EffectiveTag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.EffectiveTag").msgclass
53
75
  end
54
76
  end
55
77
  end
@@ -25,7 +25,7 @@ module Google
25
25
  module V3
26
26
  module TagBindings
27
27
  # Allow users to create and manage TagBindings between TagValues and
28
- # different cloud resources throughout the GCP resource hierarchy.
28
+ # different Google Cloud resources throughout the GCP resource hierarchy.
29
29
  class Service
30
30
 
31
31
  include ::GRPC::GenericService
@@ -34,17 +34,19 @@ module Google
34
34
  self.unmarshal_class_method = :decode
35
35
  self.service_name = 'google.cloud.resourcemanager.v3.TagBindings'
36
36
 
37
- # Lists the TagBindings for the given cloud resource, as specified with
38
- # `parent`.
37
+ # Lists the TagBindings for the given Google Cloud resource, as specified
38
+ # with `parent`.
39
39
  #
40
40
  # NOTE: The `parent` field is expected to be a full resource name:
41
41
  # https://cloud.google.com/apis/design/resource_names#full_resource_name
42
42
  rpc :ListTagBindings, ::Google::Cloud::ResourceManager::V3::ListTagBindingsRequest, ::Google::Cloud::ResourceManager::V3::ListTagBindingsResponse
43
- # Creates a TagBinding between a TagValue and a cloud resource
44
- # (currently project, folder, or organization).
43
+ # Creates a TagBinding between a TagValue and a Google Cloud resource.
45
44
  rpc :CreateTagBinding, ::Google::Cloud::ResourceManager::V3::CreateTagBindingRequest, ::Google::Longrunning::Operation
46
45
  # Deletes a TagBinding.
47
46
  rpc :DeleteTagBinding, ::Google::Cloud::ResourceManager::V3::DeleteTagBindingRequest, ::Google::Longrunning::Operation
47
+ # Return a list of effective tags for the given Google Cloud resource, as
48
+ # specified in `parent`.
49
+ rpc :ListEffectiveTags, ::Google::Cloud::ResourceManager::V3::ListEffectiveTagsRequest, ::Google::Cloud::ResourceManager::V3::ListEffectiveTagsResponse
48
50
  end
49
51
 
50
52
  Stub = Service.rpc_stub_class
@@ -0,0 +1,63 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/resourcemanager/v3/tag_holds.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/api/annotations_pb'
7
+ require 'google/api/client_pb'
8
+ require 'google/api/field_behavior_pb'
9
+ require 'google/api/resource_pb'
10
+ require 'google/longrunning/operations_pb'
11
+ require 'google/protobuf/empty_pb'
12
+ require 'google/protobuf/timestamp_pb'
13
+
14
+ Google::Protobuf::DescriptorPool.generated_pool.build do
15
+ add_file("google/cloud/resourcemanager/v3/tag_holds.proto", :syntax => :proto3) do
16
+ add_message "google.cloud.resourcemanager.v3.TagHold" do
17
+ optional :name, :string, 1
18
+ optional :holder, :string, 2
19
+ optional :origin, :string, 3
20
+ optional :help_link, :string, 4
21
+ optional :create_time, :message, 5, "google.protobuf.Timestamp"
22
+ end
23
+ add_message "google.cloud.resourcemanager.v3.CreateTagHoldRequest" do
24
+ optional :parent, :string, 1
25
+ optional :tag_hold, :message, 2, "google.cloud.resourcemanager.v3.TagHold"
26
+ optional :validate_only, :bool, 3
27
+ end
28
+ add_message "google.cloud.resourcemanager.v3.CreateTagHoldMetadata" do
29
+ end
30
+ add_message "google.cloud.resourcemanager.v3.DeleteTagHoldRequest" do
31
+ optional :name, :string, 1
32
+ optional :validate_only, :bool, 2
33
+ end
34
+ add_message "google.cloud.resourcemanager.v3.DeleteTagHoldMetadata" do
35
+ end
36
+ add_message "google.cloud.resourcemanager.v3.ListTagHoldsRequest" do
37
+ optional :parent, :string, 1
38
+ optional :page_size, :int32, 2
39
+ optional :page_token, :string, 3
40
+ optional :filter, :string, 4
41
+ end
42
+ add_message "google.cloud.resourcemanager.v3.ListTagHoldsResponse" do
43
+ repeated :tag_holds, :message, 1, "google.cloud.resourcemanager.v3.TagHold"
44
+ optional :next_page_token, :string, 2
45
+ end
46
+ end
47
+ end
48
+
49
+ module Google
50
+ module Cloud
51
+ module ResourceManager
52
+ module V3
53
+ TagHold = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.TagHold").msgclass
54
+ CreateTagHoldRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.CreateTagHoldRequest").msgclass
55
+ CreateTagHoldMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.CreateTagHoldMetadata").msgclass
56
+ DeleteTagHoldRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.DeleteTagHoldRequest").msgclass
57
+ DeleteTagHoldMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.DeleteTagHoldMetadata").msgclass
58
+ ListTagHoldsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.ListTagHoldsRequest").msgclass
59
+ ListTagHoldsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.resourcemanager.v3.ListTagHoldsResponse").msgclass
60
+ end
61
+ end
62
+ end
63
+ end