google-apis-cloudresourcemanager_v3 0.1.0
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.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-cloudresourcemanager_v3.rb +15 -0
- data/lib/google/apis/cloudresourcemanager_v3.rb +40 -0
- data/lib/google/apis/cloudresourcemanager_v3/classes.rb +1159 -0
- data/lib/google/apis/cloudresourcemanager_v3/gem_version.rb +28 -0
- data/lib/google/apis/cloudresourcemanager_v3/representations.rb +499 -0
- data/lib/google/apis/cloudresourcemanager_v3/service.rb +943 -0
- metadata +76 -0
|
@@ -0,0 +1,943 @@
|
|
|
1
|
+
# Copyright 2020 Google LLC
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'google/apis/core/base_service'
|
|
16
|
+
require 'google/apis/core/json_representation'
|
|
17
|
+
require 'google/apis/core/hashable'
|
|
18
|
+
require 'google/apis/errors'
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Apis
|
|
22
|
+
module CloudresourcemanagerV3
|
|
23
|
+
# Cloud Resource Manager API
|
|
24
|
+
#
|
|
25
|
+
# Creates, reads, and updates metadata for Google Cloud Platform resource
|
|
26
|
+
# containers.
|
|
27
|
+
#
|
|
28
|
+
# @example
|
|
29
|
+
# require 'google/apis/cloudresourcemanager_v3'
|
|
30
|
+
#
|
|
31
|
+
# Cloudresourcemanager = Google::Apis::CloudresourcemanagerV3 # Alias the module
|
|
32
|
+
# service = Cloudresourcemanager::CloudResourceManagerService.new
|
|
33
|
+
#
|
|
34
|
+
# @see https://cloud.google.com/resource-manager
|
|
35
|
+
class CloudResourceManagerService < Google::Apis::Core::BaseService
|
|
36
|
+
# @return [String]
|
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
|
39
|
+
attr_accessor :key
|
|
40
|
+
|
|
41
|
+
# @return [String]
|
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
44
|
+
attr_accessor :quota_user
|
|
45
|
+
|
|
46
|
+
def initialize
|
|
47
|
+
super('https://cloudresourcemanager.googleapis.com/', '',
|
|
48
|
+
client_name: 'google-apis-cloudresourcemanager_v3',
|
|
49
|
+
client_version: Google::Apis::CloudresourcemanagerV3::GEM_VERSION)
|
|
50
|
+
@batch_path = 'batch'
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Create a Lien which applies to the resource denoted by the `parent` field.
|
|
54
|
+
# Callers of this method will require permission on the `parent` resource. For
|
|
55
|
+
# example, applying to `projects/1234` requires permission `resourcemanager.
|
|
56
|
+
# projects.updateLiens`. NOTE: Some resources may limit the number of Liens
|
|
57
|
+
# which may be applied.
|
|
58
|
+
# @param [Google::Apis::CloudresourcemanagerV3::Lien] lien_object
|
|
59
|
+
# @param [String] fields
|
|
60
|
+
# Selector specifying which fields to include in a partial response.
|
|
61
|
+
# @param [String] quota_user
|
|
62
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
63
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
64
|
+
# @param [Google::Apis::RequestOptions] options
|
|
65
|
+
# Request-specific options
|
|
66
|
+
#
|
|
67
|
+
# @yield [result, err] Result & error if block supplied
|
|
68
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Lien] parsed result object
|
|
69
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
70
|
+
#
|
|
71
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Lien]
|
|
72
|
+
#
|
|
73
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
74
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
75
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
76
|
+
def create_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
77
|
+
command = make_simple_command(:post, 'v3/liens', options)
|
|
78
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::Lien::Representation
|
|
79
|
+
command.request_object = lien_object
|
|
80
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Lien::Representation
|
|
81
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Lien
|
|
82
|
+
command.query['fields'] = fields unless fields.nil?
|
|
83
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
84
|
+
execute_or_queue_command(command, &block)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Delete a Lien by `name`. Callers of this method will require permission on the
|
|
88
|
+
# `parent` resource. For example, a Lien with a `parent` of `projects/1234`
|
|
89
|
+
# requires permission `resourcemanager.projects.updateLiens`.
|
|
90
|
+
# @param [String] name
|
|
91
|
+
# Required. The name/identifier of the Lien to delete.
|
|
92
|
+
# @param [String] fields
|
|
93
|
+
# Selector specifying which fields to include in a partial response.
|
|
94
|
+
# @param [String] quota_user
|
|
95
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
96
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
97
|
+
# @param [Google::Apis::RequestOptions] options
|
|
98
|
+
# Request-specific options
|
|
99
|
+
#
|
|
100
|
+
# @yield [result, err] Result & error if block supplied
|
|
101
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Empty] parsed result object
|
|
102
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
103
|
+
#
|
|
104
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Empty]
|
|
105
|
+
#
|
|
106
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
107
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
108
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
109
|
+
def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
110
|
+
command = make_simple_command(:delete, 'v3/{+name}', options)
|
|
111
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Empty::Representation
|
|
112
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Empty
|
|
113
|
+
command.params['name'] = name unless name.nil?
|
|
114
|
+
command.query['fields'] = fields unless fields.nil?
|
|
115
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
116
|
+
execute_or_queue_command(command, &block)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Retrieve a Lien by `name`. Callers of this method will require permission on
|
|
120
|
+
# the `parent` resource. For example, a Lien with a `parent` of `projects/1234`
|
|
121
|
+
# requires permission requires permission `resourcemanager.projects.get` or `
|
|
122
|
+
# resourcemanager.projects.updateLiens`.
|
|
123
|
+
# @param [String] name
|
|
124
|
+
# Required. The name/identifier of the Lien.
|
|
125
|
+
# @param [String] fields
|
|
126
|
+
# Selector specifying which fields to include in a partial response.
|
|
127
|
+
# @param [String] quota_user
|
|
128
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
129
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
130
|
+
# @param [Google::Apis::RequestOptions] options
|
|
131
|
+
# Request-specific options
|
|
132
|
+
#
|
|
133
|
+
# @yield [result, err] Result & error if block supplied
|
|
134
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Lien] parsed result object
|
|
135
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
136
|
+
#
|
|
137
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Lien]
|
|
138
|
+
#
|
|
139
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
140
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
141
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
142
|
+
def get_lien(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
143
|
+
command = make_simple_command(:get, 'v3/{+name}', options)
|
|
144
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Lien::Representation
|
|
145
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Lien
|
|
146
|
+
command.params['name'] = name unless name.nil?
|
|
147
|
+
command.query['fields'] = fields unless fields.nil?
|
|
148
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
149
|
+
execute_or_queue_command(command, &block)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# List all Liens applied to the `parent` resource. Callers of this method will
|
|
153
|
+
# require permission on the `parent` resource. For example, a Lien with a `
|
|
154
|
+
# parent` of `projects/1234` requires permission `resourcemanager.projects.get`.
|
|
155
|
+
# @param [Fixnum] page_size
|
|
156
|
+
# The maximum number of items to return. This is a suggestion for the server.
|
|
157
|
+
# @param [String] page_token
|
|
158
|
+
# The `next_page_token` value returned from a previous List request, if any.
|
|
159
|
+
# @param [String] parent
|
|
160
|
+
# Required. The name of the resource to list all attached Liens. For example, `
|
|
161
|
+
# projects/1234`. (google.api.field_policy).resource_type annotation is not set
|
|
162
|
+
# since the parent depends on the meta api implementation. This field could be a
|
|
163
|
+
# project or other sub project resources.
|
|
164
|
+
# @param [String] fields
|
|
165
|
+
# Selector specifying which fields to include in a partial response.
|
|
166
|
+
# @param [String] quota_user
|
|
167
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
168
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
169
|
+
# @param [Google::Apis::RequestOptions] options
|
|
170
|
+
# Request-specific options
|
|
171
|
+
#
|
|
172
|
+
# @yield [result, err] Result & error if block supplied
|
|
173
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::ListLiensResponse] parsed result object
|
|
174
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
175
|
+
#
|
|
176
|
+
# @return [Google::Apis::CloudresourcemanagerV3::ListLiensResponse]
|
|
177
|
+
#
|
|
178
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
179
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
180
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
181
|
+
def list_liens(page_size: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
182
|
+
command = make_simple_command(:get, 'v3/liens', options)
|
|
183
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::ListLiensResponse::Representation
|
|
184
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::ListLiensResponse
|
|
185
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
186
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
187
|
+
command.query['parent'] = parent unless parent.nil?
|
|
188
|
+
command.query['fields'] = fields unless fields.nil?
|
|
189
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
190
|
+
execute_or_queue_command(command, &block)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Gets the latest state of a long-running operation. Clients can use this method
|
|
194
|
+
# to poll the operation result at intervals as recommended by the API service.
|
|
195
|
+
# @param [String] name
|
|
196
|
+
# The name of the operation resource.
|
|
197
|
+
# @param [String] fields
|
|
198
|
+
# Selector specifying which fields to include in a partial response.
|
|
199
|
+
# @param [String] quota_user
|
|
200
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
201
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
202
|
+
# @param [Google::Apis::RequestOptions] options
|
|
203
|
+
# Request-specific options
|
|
204
|
+
#
|
|
205
|
+
# @yield [result, err] Result & error if block supplied
|
|
206
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
207
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
208
|
+
#
|
|
209
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
210
|
+
#
|
|
211
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
212
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
213
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
214
|
+
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
215
|
+
command = make_simple_command(:get, 'v3/{+name}', options)
|
|
216
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
217
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
218
|
+
command.params['name'] = name unless name.nil?
|
|
219
|
+
command.query['fields'] = fields unless fields.nil?
|
|
220
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
221
|
+
execute_or_queue_command(command, &block)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Creates a TagBinding between a TagValue and a cloud resource (currently
|
|
225
|
+
# project, folder, or organization).
|
|
226
|
+
# @param [Google::Apis::CloudresourcemanagerV3::TagBinding] tag_binding_object
|
|
227
|
+
# @param [Boolean] validate_only
|
|
228
|
+
# Optional. Set to true to perform the validations necessary for creating the
|
|
229
|
+
# resource, but not actually perform the action.
|
|
230
|
+
# @param [String] fields
|
|
231
|
+
# Selector specifying which fields to include in a partial response.
|
|
232
|
+
# @param [String] quota_user
|
|
233
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
234
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
235
|
+
# @param [Google::Apis::RequestOptions] options
|
|
236
|
+
# Request-specific options
|
|
237
|
+
#
|
|
238
|
+
# @yield [result, err] Result & error if block supplied
|
|
239
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
240
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
241
|
+
#
|
|
242
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
243
|
+
#
|
|
244
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
245
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
246
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
247
|
+
def create_tag_binding(tag_binding_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
248
|
+
command = make_simple_command(:post, 'v3/tagBindings', options)
|
|
249
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::TagBinding::Representation
|
|
250
|
+
command.request_object = tag_binding_object
|
|
251
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
252
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
253
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
|
254
|
+
command.query['fields'] = fields unless fields.nil?
|
|
255
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
256
|
+
execute_or_queue_command(command, &block)
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Deletes a TagBinding.
|
|
260
|
+
# @param [String] name
|
|
261
|
+
# Required. The name of the TagBinding. This is a String of the form: `
|
|
262
|
+
# tagBindings/`id`` (e.g. `tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%
|
|
263
|
+
# 2Fprojects%2F123/tagValues/456`).
|
|
264
|
+
# @param [String] fields
|
|
265
|
+
# Selector specifying which fields to include in a partial response.
|
|
266
|
+
# @param [String] quota_user
|
|
267
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
268
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
269
|
+
# @param [Google::Apis::RequestOptions] options
|
|
270
|
+
# Request-specific options
|
|
271
|
+
#
|
|
272
|
+
# @yield [result, err] Result & error if block supplied
|
|
273
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
274
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
275
|
+
#
|
|
276
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
277
|
+
#
|
|
278
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
279
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
280
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
281
|
+
def delete_tag_binding(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
282
|
+
command = make_simple_command(:delete, 'v3/{+name}', options)
|
|
283
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
284
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
285
|
+
command.params['name'] = name unless name.nil?
|
|
286
|
+
command.query['fields'] = fields unless fields.nil?
|
|
287
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
288
|
+
execute_or_queue_command(command, &block)
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Lists the TagBindings for the given cloud resource, as specified with `parent`.
|
|
292
|
+
# NOTE: The `parent` field is expected to be a full resource name: https://
|
|
293
|
+
# cloud.google.com/apis/design/resource_names#full_resource_name
|
|
294
|
+
# @param [Fixnum] page_size
|
|
295
|
+
# Optional. The maximum number of TagBindings to return in the response. This is
|
|
296
|
+
# currently not used by the server and will return the full page even if a size
|
|
297
|
+
# is specified.
|
|
298
|
+
# @param [String] page_token
|
|
299
|
+
# Optional. A pagination token returned from a previous call to `ListTagBindings`
|
|
300
|
+
# that indicates where this listing should continue from.
|
|
301
|
+
# @param [String] parent
|
|
302
|
+
# Required. The full resource name of a resource for which you want to list
|
|
303
|
+
# existing TagBindings. E.g. "//cloudresourcemanager.googleapis.com/projects/123"
|
|
304
|
+
# @param [String] fields
|
|
305
|
+
# Selector specifying which fields to include in a partial response.
|
|
306
|
+
# @param [String] quota_user
|
|
307
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
308
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
309
|
+
# @param [Google::Apis::RequestOptions] options
|
|
310
|
+
# Request-specific options
|
|
311
|
+
#
|
|
312
|
+
# @yield [result, err] Result & error if block supplied
|
|
313
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::ListTagBindingsResponse] parsed result object
|
|
314
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
315
|
+
#
|
|
316
|
+
# @return [Google::Apis::CloudresourcemanagerV3::ListTagBindingsResponse]
|
|
317
|
+
#
|
|
318
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
319
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
320
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
321
|
+
def list_tag_bindings(page_size: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
322
|
+
command = make_simple_command(:get, 'v3/tagBindings', options)
|
|
323
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::ListTagBindingsResponse::Representation
|
|
324
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::ListTagBindingsResponse
|
|
325
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
326
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
327
|
+
command.query['parent'] = parent unless parent.nil?
|
|
328
|
+
command.query['fields'] = fields unless fields.nil?
|
|
329
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
330
|
+
execute_or_queue_command(command, &block)
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Creates a new TagKey. If another request with the same parameters is sent
|
|
334
|
+
# while the original request is in process, the second request will receive an
|
|
335
|
+
# error. A maximum of 300 TagKeys can exist under a parent at any given time.
|
|
336
|
+
# @param [Google::Apis::CloudresourcemanagerV3::TagKey] tag_key_object
|
|
337
|
+
# @param [Boolean] validate_only
|
|
338
|
+
# Optional. Set to true to perform validations necessary for creating the
|
|
339
|
+
# resource, but not actually perform the action.
|
|
340
|
+
# @param [String] fields
|
|
341
|
+
# Selector specifying which fields to include in a partial response.
|
|
342
|
+
# @param [String] quota_user
|
|
343
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
344
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
345
|
+
# @param [Google::Apis::RequestOptions] options
|
|
346
|
+
# Request-specific options
|
|
347
|
+
#
|
|
348
|
+
# @yield [result, err] Result & error if block supplied
|
|
349
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
350
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
351
|
+
#
|
|
352
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
353
|
+
#
|
|
354
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
355
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
356
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
357
|
+
def create_tag_key(tag_key_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
358
|
+
command = make_simple_command(:post, 'v3/tagKeys', options)
|
|
359
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::TagKey::Representation
|
|
360
|
+
command.request_object = tag_key_object
|
|
361
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
362
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
363
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
|
364
|
+
command.query['fields'] = fields unless fields.nil?
|
|
365
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
366
|
+
execute_or_queue_command(command, &block)
|
|
367
|
+
end
|
|
368
|
+
|
|
369
|
+
# Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
|
|
370
|
+
# @param [String] name
|
|
371
|
+
# Required. The resource name of a TagKey to be deleted in the format `tagKeys/
|
|
372
|
+
# 123`. The TagKey cannot be a parent of any existing TagValues or it will not
|
|
373
|
+
# be deleted successfully.
|
|
374
|
+
# @param [String] etag
|
|
375
|
+
# Optional. The etag known to the client for the expected state of the TagKey.
|
|
376
|
+
# This is to be used for optimistic concurrency.
|
|
377
|
+
# @param [Boolean] validate_only
|
|
378
|
+
# Optional. Set as true to perform validations necessary for deletion, but not
|
|
379
|
+
# actually perform the action.
|
|
380
|
+
# @param [String] fields
|
|
381
|
+
# Selector specifying which fields to include in a partial response.
|
|
382
|
+
# @param [String] quota_user
|
|
383
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
384
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
385
|
+
# @param [Google::Apis::RequestOptions] options
|
|
386
|
+
# Request-specific options
|
|
387
|
+
#
|
|
388
|
+
# @yield [result, err] Result & error if block supplied
|
|
389
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
390
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
391
|
+
#
|
|
392
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
393
|
+
#
|
|
394
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
395
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
396
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
397
|
+
def delete_tag_key(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
398
|
+
command = make_simple_command(:delete, 'v3/{+name}', options)
|
|
399
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
400
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
401
|
+
command.params['name'] = name unless name.nil?
|
|
402
|
+
command.query['etag'] = etag unless etag.nil?
|
|
403
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
|
404
|
+
command.query['fields'] = fields unless fields.nil?
|
|
405
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
406
|
+
execute_or_queue_command(command, &block)
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
# Retrieves a TagKey. This method will return `PERMISSION_DENIED` if the key
|
|
410
|
+
# does not exist or the user does not have permission to view it.
|
|
411
|
+
# @param [String] name
|
|
412
|
+
# Required. A resource name in the format `tagKeys/`id``, such as `tagKeys/123`.
|
|
413
|
+
# @param [String] fields
|
|
414
|
+
# Selector specifying which fields to include in a partial response.
|
|
415
|
+
# @param [String] quota_user
|
|
416
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
417
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
418
|
+
# @param [Google::Apis::RequestOptions] options
|
|
419
|
+
# Request-specific options
|
|
420
|
+
#
|
|
421
|
+
# @yield [result, err] Result & error if block supplied
|
|
422
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::TagKey] parsed result object
|
|
423
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
424
|
+
#
|
|
425
|
+
# @return [Google::Apis::CloudresourcemanagerV3::TagKey]
|
|
426
|
+
#
|
|
427
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
428
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
429
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
430
|
+
def get_tag_key(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
431
|
+
command = make_simple_command(:get, 'v3/{+name}', options)
|
|
432
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::TagKey::Representation
|
|
433
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::TagKey
|
|
434
|
+
command.params['name'] = name unless name.nil?
|
|
435
|
+
command.query['fields'] = fields unless fields.nil?
|
|
436
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
437
|
+
execute_or_queue_command(command, &block)
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Gets the access control policy for a TagKey. The returned policy may be empty
|
|
441
|
+
# if no such policy or resource exists. The `resource` field should be the
|
|
442
|
+
# TagKey's resource name. For example, "tagKeys/1234". The caller must have `
|
|
443
|
+
# cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy` permission on the
|
|
444
|
+
# specified TagKey.
|
|
445
|
+
# @param [String] resource
|
|
446
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
|
447
|
+
# operation documentation for the appropriate value for this field.
|
|
448
|
+
# @param [Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest] get_iam_policy_request_object
|
|
449
|
+
# @param [String] fields
|
|
450
|
+
# Selector specifying which fields to include in a partial response.
|
|
451
|
+
# @param [String] quota_user
|
|
452
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
453
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
454
|
+
# @param [Google::Apis::RequestOptions] options
|
|
455
|
+
# Request-specific options
|
|
456
|
+
#
|
|
457
|
+
# @yield [result, err] Result & error if block supplied
|
|
458
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
|
|
459
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
460
|
+
#
|
|
461
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Policy]
|
|
462
|
+
#
|
|
463
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
464
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
465
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
466
|
+
def get_tag_key_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
467
|
+
command = make_simple_command(:post, 'v3/{+resource}:getIamPolicy', options)
|
|
468
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest::Representation
|
|
469
|
+
command.request_object = get_iam_policy_request_object
|
|
470
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
|
|
471
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
|
|
472
|
+
command.params['resource'] = resource unless resource.nil?
|
|
473
|
+
command.query['fields'] = fields unless fields.nil?
|
|
474
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
475
|
+
execute_or_queue_command(command, &block)
|
|
476
|
+
end
|
|
477
|
+
|
|
478
|
+
# Lists all TagKeys for a parent resource.
|
|
479
|
+
# @param [Fixnum] page_size
|
|
480
|
+
# Optional. The maximum number of TagKeys to return in the response. This is
|
|
481
|
+
# currently not used by the server and will return the full page even if a size
|
|
482
|
+
# is specified currently.
|
|
483
|
+
# @param [String] page_token
|
|
484
|
+
# Optional. A pagination token returned from a previous call to `ListTagKey`
|
|
485
|
+
# that indicates where this listing should continue from. This is currently not
|
|
486
|
+
# used by the server.
|
|
487
|
+
# @param [String] parent
|
|
488
|
+
# Required. The resource name of the new TagKey's parent. Must be of the form `
|
|
489
|
+
# folders/`folder_id`` or `organizations/`org_id``.
|
|
490
|
+
# @param [String] fields
|
|
491
|
+
# Selector specifying which fields to include in a partial response.
|
|
492
|
+
# @param [String] quota_user
|
|
493
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
494
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
495
|
+
# @param [Google::Apis::RequestOptions] options
|
|
496
|
+
# Request-specific options
|
|
497
|
+
#
|
|
498
|
+
# @yield [result, err] Result & error if block supplied
|
|
499
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::ListTagKeysResponse] parsed result object
|
|
500
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
501
|
+
#
|
|
502
|
+
# @return [Google::Apis::CloudresourcemanagerV3::ListTagKeysResponse]
|
|
503
|
+
#
|
|
504
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
505
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
506
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
507
|
+
def list_tag_keys(page_size: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
508
|
+
command = make_simple_command(:get, 'v3/tagKeys', options)
|
|
509
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::ListTagKeysResponse::Representation
|
|
510
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::ListTagKeysResponse
|
|
511
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
512
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
513
|
+
command.query['parent'] = parent unless parent.nil?
|
|
514
|
+
command.query['fields'] = fields unless fields.nil?
|
|
515
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
516
|
+
execute_or_queue_command(command, &block)
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
# Updates the attributes of the TagKey resource.
|
|
520
|
+
# @param [String] name
|
|
521
|
+
# Immutable. The resource name for a TagKey. Must be in the format `tagKeys/`
|
|
522
|
+
# tag_key_id``, where `tag_key_id` is the generated numeric id for the TagKey.
|
|
523
|
+
# @param [Google::Apis::CloudresourcemanagerV3::TagKey] tag_key_object
|
|
524
|
+
# @param [String] update_mask
|
|
525
|
+
# Fields to be updated. The mask may only contain `description` or `etag`. If
|
|
526
|
+
# omitted entirely, both `description` and `etag` are assumed to be significant.
|
|
527
|
+
# @param [Boolean] validate_only
|
|
528
|
+
# Set as true to perform validations necessary for updating the resource, but
|
|
529
|
+
# not actually perform the action.
|
|
530
|
+
# @param [String] fields
|
|
531
|
+
# Selector specifying which fields to include in a partial response.
|
|
532
|
+
# @param [String] quota_user
|
|
533
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
534
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
535
|
+
# @param [Google::Apis::RequestOptions] options
|
|
536
|
+
# Request-specific options
|
|
537
|
+
#
|
|
538
|
+
# @yield [result, err] Result & error if block supplied
|
|
539
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
540
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
541
|
+
#
|
|
542
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
543
|
+
#
|
|
544
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
545
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
546
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
547
|
+
def patch_tag_key(name, tag_key_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
548
|
+
command = make_simple_command(:patch, 'v3/{+name}', options)
|
|
549
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::TagKey::Representation
|
|
550
|
+
command.request_object = tag_key_object
|
|
551
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
552
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
553
|
+
command.params['name'] = name unless name.nil?
|
|
554
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
555
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
|
556
|
+
command.query['fields'] = fields unless fields.nil?
|
|
557
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
558
|
+
execute_or_queue_command(command, &block)
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
# Sets the access control policy on a TagKey, replacing any existing policy. The
|
|
562
|
+
# `resource` field should be the TagKey's resource name. For example, "tagKeys/
|
|
563
|
+
# 1234". The caller must have `resourcemanager.tagKeys.setIamPolicy` permission
|
|
564
|
+
# on the identified tagValue.
|
|
565
|
+
# @param [String] resource
|
|
566
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
|
567
|
+
# operation documentation for the appropriate value for this field.
|
|
568
|
+
# @param [Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest] set_iam_policy_request_object
|
|
569
|
+
# @param [String] fields
|
|
570
|
+
# Selector specifying which fields to include in a partial response.
|
|
571
|
+
# @param [String] quota_user
|
|
572
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
573
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
574
|
+
# @param [Google::Apis::RequestOptions] options
|
|
575
|
+
# Request-specific options
|
|
576
|
+
#
|
|
577
|
+
# @yield [result, err] Result & error if block supplied
|
|
578
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
|
|
579
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
580
|
+
#
|
|
581
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Policy]
|
|
582
|
+
#
|
|
583
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
584
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
585
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
586
|
+
def set_tag_key_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
587
|
+
command = make_simple_command(:post, 'v3/{+resource}:setIamPolicy', options)
|
|
588
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest::Representation
|
|
589
|
+
command.request_object = set_iam_policy_request_object
|
|
590
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
|
|
591
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
|
|
592
|
+
command.params['resource'] = resource unless resource.nil?
|
|
593
|
+
command.query['fields'] = fields unless fields.nil?
|
|
594
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
595
|
+
execute_or_queue_command(command, &block)
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# Returns permissions that a caller has on the specified TagKey. The `resource`
|
|
599
|
+
# field should be the TagKey's resource name. For example, "tagKeys/1234". There
|
|
600
|
+
# are no permissions required for making this API call.
|
|
601
|
+
# @param [String] resource
|
|
602
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
|
603
|
+
# operation documentation for the appropriate value for this field.
|
|
604
|
+
# @param [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest] test_iam_permissions_request_object
|
|
605
|
+
# @param [String] fields
|
|
606
|
+
# Selector specifying which fields to include in a partial response.
|
|
607
|
+
# @param [String] quota_user
|
|
608
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
609
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
610
|
+
# @param [Google::Apis::RequestOptions] options
|
|
611
|
+
# Request-specific options
|
|
612
|
+
#
|
|
613
|
+
# @yield [result, err] Result & error if block supplied
|
|
614
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse] parsed result object
|
|
615
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
616
|
+
#
|
|
617
|
+
# @return [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse]
|
|
618
|
+
#
|
|
619
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
620
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
621
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
622
|
+
def test_tag_key_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
623
|
+
command = make_simple_command(:post, 'v3/{+resource}:testIamPermissions', options)
|
|
624
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest::Representation
|
|
625
|
+
command.request_object = test_iam_permissions_request_object
|
|
626
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse::Representation
|
|
627
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse
|
|
628
|
+
command.params['resource'] = resource unless resource.nil?
|
|
629
|
+
command.query['fields'] = fields unless fields.nil?
|
|
630
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
631
|
+
execute_or_queue_command(command, &block)
|
|
632
|
+
end
|
|
633
|
+
|
|
634
|
+
# Creates a TagValue as a child of the specified TagKey. If a another request
|
|
635
|
+
# with the same parameters is sent while the original request is in process the
|
|
636
|
+
# second request will receive an error. A maximum of 300 TagValues can exist
|
|
637
|
+
# under a TagKey at any given time.
|
|
638
|
+
# @param [Google::Apis::CloudresourcemanagerV3::TagValue] tag_value_object
|
|
639
|
+
# @param [Boolean] validate_only
|
|
640
|
+
# Optional. Set as true to perform the validations necessary for creating the
|
|
641
|
+
# resource, but not actually perform the action.
|
|
642
|
+
# @param [String] fields
|
|
643
|
+
# Selector specifying which fields to include in a partial response.
|
|
644
|
+
# @param [String] quota_user
|
|
645
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
646
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
647
|
+
# @param [Google::Apis::RequestOptions] options
|
|
648
|
+
# Request-specific options
|
|
649
|
+
#
|
|
650
|
+
# @yield [result, err] Result & error if block supplied
|
|
651
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
652
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
653
|
+
#
|
|
654
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
655
|
+
#
|
|
656
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
657
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
658
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
659
|
+
def create_tag_value(tag_value_object = nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
660
|
+
command = make_simple_command(:post, 'v3/tagValues', options)
|
|
661
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::TagValue::Representation
|
|
662
|
+
command.request_object = tag_value_object
|
|
663
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
664
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
665
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
|
666
|
+
command.query['fields'] = fields unless fields.nil?
|
|
667
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
668
|
+
execute_or_queue_command(command, &block)
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
# Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.
|
|
672
|
+
# @param [String] name
|
|
673
|
+
# Required. Resource name for TagValue to be deleted in the format tagValues/456.
|
|
674
|
+
# @param [String] etag
|
|
675
|
+
# Optional. The etag known to the client for the expected state of the TagValue.
|
|
676
|
+
# This is to be used for optimistic concurrency.
|
|
677
|
+
# @param [Boolean] validate_only
|
|
678
|
+
# Optional. Set as true to perform the validations necessary for deletion, but
|
|
679
|
+
# not actually perform the action.
|
|
680
|
+
# @param [String] fields
|
|
681
|
+
# Selector specifying which fields to include in a partial response.
|
|
682
|
+
# @param [String] quota_user
|
|
683
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
684
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
685
|
+
# @param [Google::Apis::RequestOptions] options
|
|
686
|
+
# Request-specific options
|
|
687
|
+
#
|
|
688
|
+
# @yield [result, err] Result & error if block supplied
|
|
689
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
690
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
691
|
+
#
|
|
692
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
693
|
+
#
|
|
694
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
695
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
696
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
697
|
+
def delete_tag_value(name, etag: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
698
|
+
command = make_simple_command(:delete, 'v3/{+name}', options)
|
|
699
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
700
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
701
|
+
command.params['name'] = name unless name.nil?
|
|
702
|
+
command.query['etag'] = etag unless etag.nil?
|
|
703
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
|
704
|
+
command.query['fields'] = fields unless fields.nil?
|
|
705
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
706
|
+
execute_or_queue_command(command, &block)
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
# Retrieves TagValue. If the TagValue or namespaced name does not exist, or if
|
|
710
|
+
# the user does not have permission to view it, this method will return `
|
|
711
|
+
# PERMISSION_DENIED`.
|
|
712
|
+
# @param [String] name
|
|
713
|
+
# Required. Resource name for TagValue to be fetched in the format `tagValues/
|
|
714
|
+
# 456`.
|
|
715
|
+
# @param [String] fields
|
|
716
|
+
# Selector specifying which fields to include in a partial response.
|
|
717
|
+
# @param [String] quota_user
|
|
718
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
719
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
720
|
+
# @param [Google::Apis::RequestOptions] options
|
|
721
|
+
# Request-specific options
|
|
722
|
+
#
|
|
723
|
+
# @yield [result, err] Result & error if block supplied
|
|
724
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::TagValue] parsed result object
|
|
725
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
726
|
+
#
|
|
727
|
+
# @return [Google::Apis::CloudresourcemanagerV3::TagValue]
|
|
728
|
+
#
|
|
729
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
730
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
731
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
732
|
+
def get_tag_value(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
733
|
+
command = make_simple_command(:get, 'v3/{+name}', options)
|
|
734
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::TagValue::Representation
|
|
735
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::TagValue
|
|
736
|
+
command.params['name'] = name unless name.nil?
|
|
737
|
+
command.query['fields'] = fields unless fields.nil?
|
|
738
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
739
|
+
execute_or_queue_command(command, &block)
|
|
740
|
+
end
|
|
741
|
+
|
|
742
|
+
# Gets the access control policy for a TagValue. The returned policy may be
|
|
743
|
+
# empty if no such policy or resource exists. The `resource` field should be the
|
|
744
|
+
# TagValue's resource name. For example: `tagValues/1234`. The caller must have
|
|
745
|
+
# the `cloudresourcemanager.googleapis.com/tagValues.getIamPolicy` permission on
|
|
746
|
+
# the identified TagValue to get the access control policy.
|
|
747
|
+
# @param [String] resource
|
|
748
|
+
# REQUIRED: The resource for which the policy is being requested. See the
|
|
749
|
+
# operation documentation for the appropriate value for this field.
|
|
750
|
+
# @param [Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest] get_iam_policy_request_object
|
|
751
|
+
# @param [String] fields
|
|
752
|
+
# Selector specifying which fields to include in a partial response.
|
|
753
|
+
# @param [String] quota_user
|
|
754
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
755
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
756
|
+
# @param [Google::Apis::RequestOptions] options
|
|
757
|
+
# Request-specific options
|
|
758
|
+
#
|
|
759
|
+
# @yield [result, err] Result & error if block supplied
|
|
760
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
|
|
761
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
762
|
+
#
|
|
763
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Policy]
|
|
764
|
+
#
|
|
765
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
766
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
767
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
768
|
+
def get_tag_value_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
769
|
+
command = make_simple_command(:post, 'v3/{+resource}:getIamPolicy', options)
|
|
770
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest::Representation
|
|
771
|
+
command.request_object = get_iam_policy_request_object
|
|
772
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
|
|
773
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
|
|
774
|
+
command.params['resource'] = resource unless resource.nil?
|
|
775
|
+
command.query['fields'] = fields unless fields.nil?
|
|
776
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
777
|
+
execute_or_queue_command(command, &block)
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
# Lists all TagValues for a specific TagKey.
|
|
781
|
+
# @param [Fixnum] page_size
|
|
782
|
+
# Optional. The maximum number of TagValues to return in the response. This is
|
|
783
|
+
# currently not used by the server and will return the full page even if a size
|
|
784
|
+
# is specified currently.
|
|
785
|
+
# @param [String] page_token
|
|
786
|
+
# Optional. A pagination token returned from a previous call to `ListTagValues`
|
|
787
|
+
# that indicates where this listing should continue from. This is currently not
|
|
788
|
+
# used by the server.
|
|
789
|
+
# @param [String] parent
|
|
790
|
+
# Required. Resource name for TagKey, parent of the TagValues to be listed, in
|
|
791
|
+
# the format `tagKeys/123`.
|
|
792
|
+
# @param [String] fields
|
|
793
|
+
# Selector specifying which fields to include in a partial response.
|
|
794
|
+
# @param [String] quota_user
|
|
795
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
796
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
797
|
+
# @param [Google::Apis::RequestOptions] options
|
|
798
|
+
# Request-specific options
|
|
799
|
+
#
|
|
800
|
+
# @yield [result, err] Result & error if block supplied
|
|
801
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::ListTagValuesResponse] parsed result object
|
|
802
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
803
|
+
#
|
|
804
|
+
# @return [Google::Apis::CloudresourcemanagerV3::ListTagValuesResponse]
|
|
805
|
+
#
|
|
806
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
807
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
808
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
809
|
+
def list_tag_values(page_size: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
810
|
+
command = make_simple_command(:get, 'v3/tagValues', options)
|
|
811
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::ListTagValuesResponse::Representation
|
|
812
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::ListTagValuesResponse
|
|
813
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
814
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
815
|
+
command.query['parent'] = parent unless parent.nil?
|
|
816
|
+
command.query['fields'] = fields unless fields.nil?
|
|
817
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
818
|
+
execute_or_queue_command(command, &block)
|
|
819
|
+
end
|
|
820
|
+
|
|
821
|
+
# Updates the attributes of the TagValue resource.
|
|
822
|
+
# @param [String] name
|
|
823
|
+
# Immutable. Resource name for TagValue in the format `tagValues/456`.
|
|
824
|
+
# @param [Google::Apis::CloudresourcemanagerV3::TagValue] tag_value_object
|
|
825
|
+
# @param [String] update_mask
|
|
826
|
+
# Optional. Fields to be updated.
|
|
827
|
+
# @param [Boolean] validate_only
|
|
828
|
+
# Optional. True to perform validations necessary for updating the resource, but
|
|
829
|
+
# not actually perform the action.
|
|
830
|
+
# @param [String] fields
|
|
831
|
+
# Selector specifying which fields to include in a partial response.
|
|
832
|
+
# @param [String] quota_user
|
|
833
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
834
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
835
|
+
# @param [Google::Apis::RequestOptions] options
|
|
836
|
+
# Request-specific options
|
|
837
|
+
#
|
|
838
|
+
# @yield [result, err] Result & error if block supplied
|
|
839
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
|
|
840
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
841
|
+
#
|
|
842
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Operation]
|
|
843
|
+
#
|
|
844
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
845
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
846
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
847
|
+
def patch_tag_value(name, tag_value_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
848
|
+
command = make_simple_command(:patch, 'v3/{+name}', options)
|
|
849
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::TagValue::Representation
|
|
850
|
+
command.request_object = tag_value_object
|
|
851
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
|
|
852
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
|
|
853
|
+
command.params['name'] = name unless name.nil?
|
|
854
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
855
|
+
command.query['validateOnly'] = validate_only unless validate_only.nil?
|
|
856
|
+
command.query['fields'] = fields unless fields.nil?
|
|
857
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
858
|
+
execute_or_queue_command(command, &block)
|
|
859
|
+
end
|
|
860
|
+
|
|
861
|
+
# Sets the access control policy on a TagValue, replacing any existing policy.
|
|
862
|
+
# The `resource` field should be the TagValue's resource name. For example: `
|
|
863
|
+
# tagValues/1234`. The caller must have `resourcemanager.tagValues.setIamPolicy`
|
|
864
|
+
# permission on the identified tagValue.
|
|
865
|
+
# @param [String] resource
|
|
866
|
+
# REQUIRED: The resource for which the policy is being specified. See the
|
|
867
|
+
# operation documentation for the appropriate value for this field.
|
|
868
|
+
# @param [Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest] set_iam_policy_request_object
|
|
869
|
+
# @param [String] fields
|
|
870
|
+
# Selector specifying which fields to include in a partial response.
|
|
871
|
+
# @param [String] quota_user
|
|
872
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
873
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
874
|
+
# @param [Google::Apis::RequestOptions] options
|
|
875
|
+
# Request-specific options
|
|
876
|
+
#
|
|
877
|
+
# @yield [result, err] Result & error if block supplied
|
|
878
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
|
|
879
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
880
|
+
#
|
|
881
|
+
# @return [Google::Apis::CloudresourcemanagerV3::Policy]
|
|
882
|
+
#
|
|
883
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
884
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
885
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
886
|
+
def set_tag_value_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
887
|
+
command = make_simple_command(:post, 'v3/{+resource}:setIamPolicy', options)
|
|
888
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest::Representation
|
|
889
|
+
command.request_object = set_iam_policy_request_object
|
|
890
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
|
|
891
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
|
|
892
|
+
command.params['resource'] = resource unless resource.nil?
|
|
893
|
+
command.query['fields'] = fields unless fields.nil?
|
|
894
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
895
|
+
execute_or_queue_command(command, &block)
|
|
896
|
+
end
|
|
897
|
+
|
|
898
|
+
# Returns permissions that a caller has on the specified TagValue. The `resource`
|
|
899
|
+
# field should be the TagValue's resource name. For example: `tagValues/1234`.
|
|
900
|
+
# There are no permissions required for making this API call.
|
|
901
|
+
# @param [String] resource
|
|
902
|
+
# REQUIRED: The resource for which the policy detail is being requested. See the
|
|
903
|
+
# operation documentation for the appropriate value for this field.
|
|
904
|
+
# @param [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest] test_iam_permissions_request_object
|
|
905
|
+
# @param [String] fields
|
|
906
|
+
# Selector specifying which fields to include in a partial response.
|
|
907
|
+
# @param [String] quota_user
|
|
908
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
909
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
910
|
+
# @param [Google::Apis::RequestOptions] options
|
|
911
|
+
# Request-specific options
|
|
912
|
+
#
|
|
913
|
+
# @yield [result, err] Result & error if block supplied
|
|
914
|
+
# @yieldparam result [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse] parsed result object
|
|
915
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
916
|
+
#
|
|
917
|
+
# @return [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse]
|
|
918
|
+
#
|
|
919
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
920
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
921
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
922
|
+
def test_tag_value_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
923
|
+
command = make_simple_command(:post, 'v3/{+resource}:testIamPermissions', options)
|
|
924
|
+
command.request_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest::Representation
|
|
925
|
+
command.request_object = test_iam_permissions_request_object
|
|
926
|
+
command.response_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse::Representation
|
|
927
|
+
command.response_class = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse
|
|
928
|
+
command.params['resource'] = resource unless resource.nil?
|
|
929
|
+
command.query['fields'] = fields unless fields.nil?
|
|
930
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
931
|
+
execute_or_queue_command(command, &block)
|
|
932
|
+
end
|
|
933
|
+
|
|
934
|
+
protected
|
|
935
|
+
|
|
936
|
+
def apply_command_defaults(command)
|
|
937
|
+
command.query['key'] = key unless key.nil?
|
|
938
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
939
|
+
end
|
|
940
|
+
end
|
|
941
|
+
end
|
|
942
|
+
end
|
|
943
|
+
end
|