google-cloud-resource_manager-v3 0.4.0 → 0.5.0
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 +44 -39
- data/lib/google/cloud/resource_manager/v3/projects/operations.rb +2 -2
- data/lib/google/cloud/resource_manager/v3/projects/rest/client.rb +44 -39
- 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 +111 -22
- 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 +96 -22
- 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 +57 -3
- 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 +32 -30
- data/proto_docs/google/cloud/resourcemanager/v3/tag_bindings.rb +101 -15
- data/proto_docs/google/cloud/resourcemanager/v3/tag_holds.rb +161 -0
- data/proto_docs/google/cloud/resourcemanager/v3/tag_keys.rb +81 -23
- 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
@@ -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
|
@@ -202,9 +202,9 @@ module Google
|
|
202
202
|
# Required. The resource name of the new TagKey's parent.
|
203
203
|
# Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
|
204
204
|
# @param page_size [::Integer]
|
205
|
-
# Optional. The maximum number of TagKeys to return in the response. The
|
206
|
-
# a maximum of 300 TagKeys to return. If unspecified, the
|
207
|
-
# as the default.
|
205
|
+
# Optional. The maximum number of TagKeys to return in the response. The
|
206
|
+
# server allows a maximum of 300 TagKeys to return. If unspecified, the
|
207
|
+
# server will use 100 as the default.
|
208
208
|
# @param page_token [::String]
|
209
209
|
# Optional. A pagination token returned from a previous call to `ListTagKey`
|
210
210
|
# that indicates where this listing should continue from.
|
@@ -357,11 +357,93 @@ module Google
|
|
357
357
|
raise ::Google::Cloud::Error.from_error(e)
|
358
358
|
end
|
359
359
|
|
360
|
+
##
|
361
|
+
# Retrieves a TagKey by its namespaced name.
|
362
|
+
# This method will return `PERMISSION_DENIED` if the key does not exist
|
363
|
+
# or the user does not have permission to view it.
|
364
|
+
#
|
365
|
+
# @overload get_namespaced_tag_key(request, options = nil)
|
366
|
+
# Pass arguments to `get_namespaced_tag_key` via a request object, either of type
|
367
|
+
# {::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest} or an equivalent Hash.
|
368
|
+
#
|
369
|
+
# @param request [::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest, ::Hash]
|
370
|
+
# A request object representing the call parameters. Required. To specify no
|
371
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
372
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
373
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
374
|
+
#
|
375
|
+
# @overload get_namespaced_tag_key(name: nil)
|
376
|
+
# Pass arguments to `get_namespaced_tag_key` via keyword arguments. Note that at
|
377
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
378
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
379
|
+
#
|
380
|
+
# @param name [::String]
|
381
|
+
# Required. A namespaced tag key name in the format
|
382
|
+
# `{parentId}/{tagKeyShort}`, such as `42/foo` for a key with short name
|
383
|
+
# "foo" under the organization with ID 42 or `r2-d2/bar` for a key with short
|
384
|
+
# name "bar" under the project `r2-d2`.
|
385
|
+
#
|
386
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
387
|
+
# @yieldparam response [::Google::Cloud::ResourceManager::V3::TagKey]
|
388
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
389
|
+
#
|
390
|
+
# @return [::Google::Cloud::ResourceManager::V3::TagKey]
|
391
|
+
#
|
392
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
393
|
+
#
|
394
|
+
# @example Basic example
|
395
|
+
# require "google/cloud/resource_manager/v3"
|
396
|
+
#
|
397
|
+
# # Create a client object. The client can be reused for multiple calls.
|
398
|
+
# client = Google::Cloud::ResourceManager::V3::TagKeys::Client.new
|
399
|
+
#
|
400
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
401
|
+
# request = Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest.new
|
402
|
+
#
|
403
|
+
# # Call the get_namespaced_tag_key method.
|
404
|
+
# result = client.get_namespaced_tag_key request
|
405
|
+
#
|
406
|
+
# # The returned object is of type Google::Cloud::ResourceManager::V3::TagKey.
|
407
|
+
# p result
|
408
|
+
#
|
409
|
+
def get_namespaced_tag_key request, options = nil
|
410
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
411
|
+
|
412
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ResourceManager::V3::GetNamespacedTagKeyRequest
|
413
|
+
|
414
|
+
# Converts hash and nil to an options object
|
415
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
416
|
+
|
417
|
+
# Customize the options with defaults
|
418
|
+
metadata = @config.rpcs.get_namespaced_tag_key.metadata.to_h
|
419
|
+
|
420
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
421
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
422
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
423
|
+
gapic_version: ::Google::Cloud::ResourceManager::V3::VERSION
|
424
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
425
|
+
|
426
|
+
options.apply_defaults timeout: @config.rpcs.get_namespaced_tag_key.timeout,
|
427
|
+
metadata: metadata,
|
428
|
+
retry_policy: @config.rpcs.get_namespaced_tag_key.retry_policy
|
429
|
+
|
430
|
+
options.apply_defaults timeout: @config.timeout,
|
431
|
+
metadata: @config.metadata,
|
432
|
+
retry_policy: @config.retry_policy
|
433
|
+
|
434
|
+
@tag_keys_stub.call_rpc :get_namespaced_tag_key, request, options: options do |response, operation|
|
435
|
+
yield response, operation if block_given?
|
436
|
+
return response
|
437
|
+
end
|
438
|
+
rescue ::GRPC::BadStatus => e
|
439
|
+
raise ::Google::Cloud::Error.from_error(e)
|
440
|
+
end
|
441
|
+
|
360
442
|
##
|
361
443
|
# Creates a new TagKey. If another request with the same parameters is
|
362
444
|
# sent while the original request is in process, the second request
|
363
|
-
# will receive an error. A maximum of
|
364
|
-
# any given time.
|
445
|
+
# will receive an error. A maximum of 1000 TagKeys can exist under a parent
|
446
|
+
# at any given time.
|
365
447
|
#
|
366
448
|
# @overload create_tag_key(request, options = nil)
|
367
449
|
# Pass arguments to `create_tag_key` via a request object, either of type
|
@@ -379,11 +461,11 @@ module Google
|
|
379
461
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
380
462
|
#
|
381
463
|
# @param tag_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
|
382
|
-
# Required. The TagKey to be created. Only fields `short_name`,
|
383
|
-
# and `parent` are considered during the creation request.
|
464
|
+
# Required. The TagKey to be created. Only fields `short_name`,
|
465
|
+
# `description`, and `parent` are considered during the creation request.
|
384
466
|
# @param validate_only [::Boolean]
|
385
|
-
# Optional. Set to true to perform validations necessary for creating the
|
386
|
-
# not actually perform the action.
|
467
|
+
# Optional. Set to true to perform validations necessary for creating the
|
468
|
+
# resource, but not actually perform the action.
|
387
469
|
#
|
388
470
|
# @yield [response, operation] Access the result along with the RPC operation
|
389
471
|
# @yieldparam response [::Gapic::Operation]
|
@@ -468,10 +550,10 @@ module Google
|
|
468
550
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
469
551
|
#
|
470
552
|
# @param tag_key [::Google::Cloud::ResourceManager::V3::TagKey, ::Hash]
|
471
|
-
# Required. The new definition of the TagKey. Only the `description` and
|
472
|
-
# can be updated by this request. If the `etag` field is not
|
473
|
-
# must match the `etag` field of the existing tag key. Otherwise,
|
474
|
-
# `
|
553
|
+
# Required. The new definition of the TagKey. Only the `description` and
|
554
|
+
# `etag` fields can be updated by this request. If the `etag` field is not
|
555
|
+
# empty, it must match the `etag` field of the existing tag key. Otherwise,
|
556
|
+
# `ABORTED` will be returned.
|
475
557
|
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
476
558
|
# Fields to be updated. The mask may only contain `description` or
|
477
559
|
# `etag`. If omitted entirely, both `description` and `etag` are assumed to
|
@@ -572,15 +654,15 @@ module Google
|
|
572
654
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
573
655
|
#
|
574
656
|
# @param name [::String]
|
575
|
-
# Required. The resource name of a TagKey to be deleted in the format
|
576
|
-
# The TagKey cannot be a parent of any existing TagValues or
|
577
|
-
# deleted successfully.
|
657
|
+
# Required. The resource name of a TagKey to be deleted in the format
|
658
|
+
# `tagKeys/123`. The TagKey cannot be a parent of any existing TagValues or
|
659
|
+
# it will not be deleted successfully.
|
578
660
|
# @param validate_only [::Boolean]
|
579
|
-
# Optional. Set as true to perform validations necessary for deletion, but
|
580
|
-
# perform the action.
|
661
|
+
# Optional. Set as true to perform validations necessary for deletion, but
|
662
|
+
# not actually perform the action.
|
581
663
|
# @param etag [::String]
|
582
|
-
# Optional. The etag known to the client for the expected state of the
|
583
|
-
# to be used for optimistic concurrency.
|
664
|
+
# Optional. The etag known to the client for the expected state of the
|
665
|
+
# TagKey. This is to be used for optimistic concurrency.
|
584
666
|
#
|
585
667
|
# @yield [response, operation] Access the result along with the RPC operation
|
586
668
|
# @yieldparam response [::Gapic::Operation]
|
@@ -982,9 +1064,9 @@ module Google
|
|
982
1064
|
# * (`String`) The path to a service account key file in JSON format
|
983
1065
|
# * (`Hash`) A service account key as a Hash
|
984
1066
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
985
|
-
# (see the [googleauth docs](https://
|
1067
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
986
1068
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
987
|
-
# (see the [signet docs](https://
|
1069
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
988
1070
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
989
1071
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
990
1072
|
# * (`nil`) indicating no credentials
|
@@ -1090,6 +1172,11 @@ module Google
|
|
1090
1172
|
#
|
1091
1173
|
attr_reader :get_tag_key
|
1092
1174
|
##
|
1175
|
+
# RPC-specific configuration for `get_namespaced_tag_key`
|
1176
|
+
# @return [::Gapic::Config::Method]
|
1177
|
+
#
|
1178
|
+
attr_reader :get_namespaced_tag_key
|
1179
|
+
##
|
1093
1180
|
# RPC-specific configuration for `create_tag_key`
|
1094
1181
|
# @return [::Gapic::Config::Method]
|
1095
1182
|
#
|
@@ -1126,6 +1213,8 @@ module Google
|
|
1126
1213
|
@list_tag_keys = ::Gapic::Config::Method.new list_tag_keys_config
|
1127
1214
|
get_tag_key_config = parent_rpcs.get_tag_key if parent_rpcs.respond_to? :get_tag_key
|
1128
1215
|
@get_tag_key = ::Gapic::Config::Method.new get_tag_key_config
|
1216
|
+
get_namespaced_tag_key_config = parent_rpcs.get_namespaced_tag_key if parent_rpcs.respond_to? :get_namespaced_tag_key
|
1217
|
+
@get_namespaced_tag_key = ::Gapic::Config::Method.new get_namespaced_tag_key_config
|
1129
1218
|
create_tag_key_config = parent_rpcs.create_tag_key if parent_rpcs.respond_to? :create_tag_key
|
1130
1219
|
@create_tag_key = ::Gapic::Config::Method.new create_tag_key_config
|
1131
1220
|
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://
|
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
|