google-apis-cloudresourcemanager_v3 0.2.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,6 +50,471 @@ module Google
50
50
  @batch_path = 'batch'
51
51
  end
52
52
 
53
+ # Creates a folder in the resource hierarchy. Returns an `Operation` which can
54
+ # be used to track the progress of the folder creation workflow. Upon success,
55
+ # the `Operation.response` field will be populated with the created Folder. In
56
+ # order to succeed, the addition of this new folder must not violate the folder
57
+ # naming, height, or fanout constraints. + The folder's `display_name` must be
58
+ # distinct from all other folders that share its parent. + The addition of the
59
+ # folder must not cause the active folder hierarchy to exceed a height of 10.
60
+ # Note, the full active + deleted folder hierarchy is allowed to reach a height
61
+ # of 20; this provides additional headroom when moving folders that contain
62
+ # deleted folders. + The addition of the folder must not cause the total number
63
+ # of folders under its parent to exceed 300. If the operation fails due to a
64
+ # folder constraint violation, some errors may be returned by the `CreateFolder`
65
+ # request, with status code `FAILED_PRECONDITION` and an error description.
66
+ # Other folder constraint violations will be communicated in the `Operation`,
67
+ # with the specific `PreconditionFailure` returned in the details list in the `
68
+ # Operation.error` field. The caller must have `resourcemanager.folders.create`
69
+ # permission on the identified parent.
70
+ # @param [Google::Apis::CloudresourcemanagerV3::Folder] folder_object
71
+ # @param [String] fields
72
+ # Selector specifying which fields to include in a partial response.
73
+ # @param [String] quota_user
74
+ # Available to use for quota purposes for server-side applications. Can be any
75
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
76
+ # @param [Google::Apis::RequestOptions] options
77
+ # Request-specific options
78
+ #
79
+ # @yield [result, err] Result & error if block supplied
80
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
81
+ # @yieldparam err [StandardError] error object if request failed
82
+ #
83
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
84
+ #
85
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
86
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
87
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
88
+ def create_folder(folder_object = nil, fields: nil, quota_user: nil, options: nil, &block)
89
+ command = make_simple_command(:post, 'v3/folders', options)
90
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::Folder::Representation
91
+ command.request_object = folder_object
92
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
93
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
94
+ command.query['fields'] = fields unless fields.nil?
95
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
96
+ execute_or_queue_command(command, &block)
97
+ end
98
+
99
+ # Requests deletion of a folder. The folder is moved into the DELETE_REQUESTED
100
+ # state immediately, and is deleted approximately 30 days later. This method may
101
+ # only be called on an empty folder, where a folder is empty if it doesn't
102
+ # contain any folders or projects in the ACTIVE state. If called on a folder in
103
+ # DELETE_REQUESTED state the operation will result in a no-op success. The
104
+ # caller must have `resourcemanager.folders.delete` permission on the identified
105
+ # folder.
106
+ # @param [String] name
107
+ # Required. The resource name of the folder to be deleted. Must be of the form `
108
+ # folders/`folder_id``.
109
+ # @param [String] fields
110
+ # Selector specifying which fields to include in a partial response.
111
+ # @param [String] quota_user
112
+ # Available to use for quota purposes for server-side applications. Can be any
113
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
114
+ # @param [Google::Apis::RequestOptions] options
115
+ # Request-specific options
116
+ #
117
+ # @yield [result, err] Result & error if block supplied
118
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
119
+ # @yieldparam err [StandardError] error object if request failed
120
+ #
121
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
122
+ #
123
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
124
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
125
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
126
+ def delete_folder(name, fields: nil, quota_user: nil, options: nil, &block)
127
+ command = make_simple_command(:delete, 'v3/{+name}', options)
128
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
129
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
130
+ command.params['name'] = name unless name.nil?
131
+ command.query['fields'] = fields unless fields.nil?
132
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
133
+ execute_or_queue_command(command, &block)
134
+ end
135
+
136
+ # Retrieves a folder identified by the supplied resource name. Valid folder
137
+ # resource names have the format `folders/`folder_id`` (for example, `folders/
138
+ # 1234`). The caller must have `resourcemanager.folders.get` permission on the
139
+ # identified folder.
140
+ # @param [String] name
141
+ # Required. The resource name of the folder to retrieve. Must be of the form `
142
+ # folders/`folder_id``.
143
+ # @param [String] fields
144
+ # Selector specifying which fields to include in a partial response.
145
+ # @param [String] quota_user
146
+ # Available to use for quota purposes for server-side applications. Can be any
147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
148
+ # @param [Google::Apis::RequestOptions] options
149
+ # Request-specific options
150
+ #
151
+ # @yield [result, err] Result & error if block supplied
152
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Folder] parsed result object
153
+ # @yieldparam err [StandardError] error object if request failed
154
+ #
155
+ # @return [Google::Apis::CloudresourcemanagerV3::Folder]
156
+ #
157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
160
+ def get_folder(name, fields: nil, quota_user: nil, options: nil, &block)
161
+ command = make_simple_command(:get, 'v3/{+name}', options)
162
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Folder::Representation
163
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Folder
164
+ command.params['name'] = name unless name.nil?
165
+ command.query['fields'] = fields unless fields.nil?
166
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
167
+ execute_or_queue_command(command, &block)
168
+ end
169
+
170
+ # Gets the access control policy for a folder. The returned policy may be empty
171
+ # if no such policy or resource exists. The `resource` field should be the
172
+ # folder's resource name, for example: "folders/1234". The caller must have `
173
+ # resourcemanager.folders.getIamPolicy` permission on the identified folder.
174
+ # @param [String] resource
175
+ # REQUIRED: The resource for which the policy is being requested. See the
176
+ # operation documentation for the appropriate value for this field.
177
+ # @param [Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest] get_iam_policy_request_object
178
+ # @param [String] fields
179
+ # Selector specifying which fields to include in a partial response.
180
+ # @param [String] quota_user
181
+ # Available to use for quota purposes for server-side applications. Can be any
182
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
183
+ # @param [Google::Apis::RequestOptions] options
184
+ # Request-specific options
185
+ #
186
+ # @yield [result, err] Result & error if block supplied
187
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
188
+ # @yieldparam err [StandardError] error object if request failed
189
+ #
190
+ # @return [Google::Apis::CloudresourcemanagerV3::Policy]
191
+ #
192
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
193
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
194
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
195
+ def get_folder_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
196
+ command = make_simple_command(:post, 'v3/{+resource}:getIamPolicy', options)
197
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest::Representation
198
+ command.request_object = get_iam_policy_request_object
199
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
200
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
201
+ command.params['resource'] = resource unless resource.nil?
202
+ command.query['fields'] = fields unless fields.nil?
203
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
204
+ execute_or_queue_command(command, &block)
205
+ end
206
+
207
+ # Lists the folders that are direct descendants of supplied parent resource. `
208
+ # list()` provides a strongly consistent view of the folders underneath the
209
+ # specified parent resource. `list()` returns folders sorted based upon the (
210
+ # ascending) lexical ordering of their display_name. The caller must have `
211
+ # resourcemanager.folders.list` permission on the identified parent.
212
+ # @param [Fixnum] page_size
213
+ # Optional. The maximum number of folders to return in the response. If
214
+ # unspecified, server picks an appropriate default.
215
+ # @param [String] page_token
216
+ # Optional. A pagination token returned from a previous call to `ListFolders`
217
+ # that indicates where this listing should continue from.
218
+ # @param [String] parent
219
+ # Required. The resource name of the organization or folder whose folders are
220
+ # being listed. Must be of the form `folders/`folder_id`` or `organizations/`
221
+ # org_id``. Access to this method is controlled by checking the `resourcemanager.
222
+ # folders.list` permission on the `parent`.
223
+ # @param [Boolean] show_deleted
224
+ # Optional. Controls whether folders in the DELETE_REQUESTED state should be
225
+ # returned. Defaults to false.
226
+ # @param [String] fields
227
+ # Selector specifying which fields to include in a partial response.
228
+ # @param [String] quota_user
229
+ # Available to use for quota purposes for server-side applications. Can be any
230
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
231
+ # @param [Google::Apis::RequestOptions] options
232
+ # Request-specific options
233
+ #
234
+ # @yield [result, err] Result & error if block supplied
235
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::ListFoldersResponse] parsed result object
236
+ # @yieldparam err [StandardError] error object if request failed
237
+ #
238
+ # @return [Google::Apis::CloudresourcemanagerV3::ListFoldersResponse]
239
+ #
240
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
241
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
242
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
243
+ def list_folders(page_size: nil, page_token: nil, parent: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
244
+ command = make_simple_command(:get, 'v3/folders', options)
245
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::ListFoldersResponse::Representation
246
+ command.response_class = Google::Apis::CloudresourcemanagerV3::ListFoldersResponse
247
+ command.query['pageSize'] = page_size unless page_size.nil?
248
+ command.query['pageToken'] = page_token unless page_token.nil?
249
+ command.query['parent'] = parent unless parent.nil?
250
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
251
+ command.query['fields'] = fields unless fields.nil?
252
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
253
+ execute_or_queue_command(command, &block)
254
+ end
255
+
256
+ # Moves a folder under a new resource parent. Returns an `Operation` which can
257
+ # be used to track the progress of the folder move workflow. Upon success, the `
258
+ # Operation.response` field will be populated with the moved folder. Upon
259
+ # failure, a `FolderOperationError` categorizing the failure cause will be
260
+ # returned - if the failure occurs synchronously then the `FolderOperationError`
261
+ # will be returned in the `Status.details` field. If it occurs asynchronously,
262
+ # then the FolderOperation will be returned in the `Operation.error` field. In
263
+ # addition, the `Operation.metadata` field will be populated with a `
264
+ # FolderOperation` message as an aid to stateless clients. Folder moves will be
265
+ # rejected if they violate either the naming, height, or fanout constraints
266
+ # described in the CreateFolder documentation. The caller must have `
267
+ # resourcemanager.folders.move` permission on the folder's current and proposed
268
+ # new parent.
269
+ # @param [String] name
270
+ # Required. The resource name of the Folder to move. Must be of the form folders/
271
+ # `folder_id`
272
+ # @param [Google::Apis::CloudresourcemanagerV3::MoveFolderRequest] move_folder_request_object
273
+ # @param [String] fields
274
+ # Selector specifying which fields to include in a partial response.
275
+ # @param [String] quota_user
276
+ # Available to use for quota purposes for server-side applications. Can be any
277
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
278
+ # @param [Google::Apis::RequestOptions] options
279
+ # Request-specific options
280
+ #
281
+ # @yield [result, err] Result & error if block supplied
282
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
283
+ # @yieldparam err [StandardError] error object if request failed
284
+ #
285
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
286
+ #
287
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
288
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
289
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
290
+ def move_folder(name, move_folder_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
291
+ command = make_simple_command(:post, 'v3/{+name}:move', options)
292
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::MoveFolderRequest::Representation
293
+ command.request_object = move_folder_request_object
294
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
295
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
296
+ command.params['name'] = name unless name.nil?
297
+ command.query['fields'] = fields unless fields.nil?
298
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
299
+ execute_or_queue_command(command, &block)
300
+ end
301
+
302
+ # Updates a folder, changing its `display_name`. Changes to the folder `
303
+ # display_name` will be rejected if they violate either the `display_name`
304
+ # formatting rules or the naming constraints described in the CreateFolder
305
+ # documentation. The folder's `display_name` must start and end with a letter or
306
+ # digit, may contain letters, digits, spaces, hyphens and underscores and can be
307
+ # between 3 and 30 characters. This is captured by the regular expression: `\p`L`
308
+ # \p`N``1,28`[\p`L`\p`N`]`. The caller must have `resourcemanager.folders.update`
309
+ # permission on the identified folder. If the update fails due to the unique
310
+ # name constraint then a `PreconditionFailure` explaining this violation will be
311
+ # returned in the Status.details field.
312
+ # @param [String] name
313
+ # Output only. The resource name of the folder. Its format is `folders/`
314
+ # folder_id``, for example: "folders/1234".
315
+ # @param [Google::Apis::CloudresourcemanagerV3::Folder] folder_object
316
+ # @param [String] update_mask
317
+ # Required. Fields to be updated. Only the `display_name` can be updated.
318
+ # @param [String] fields
319
+ # Selector specifying which fields to include in a partial response.
320
+ # @param [String] quota_user
321
+ # Available to use for quota purposes for server-side applications. Can be any
322
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
323
+ # @param [Google::Apis::RequestOptions] options
324
+ # Request-specific options
325
+ #
326
+ # @yield [result, err] Result & error if block supplied
327
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
328
+ # @yieldparam err [StandardError] error object if request failed
329
+ #
330
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
331
+ #
332
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
333
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
334
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
335
+ def patch_folder(name, folder_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
336
+ command = make_simple_command(:patch, 'v3/{+name}', options)
337
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::Folder::Representation
338
+ command.request_object = folder_object
339
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
340
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
341
+ command.params['name'] = name unless name.nil?
342
+ command.query['updateMask'] = update_mask unless update_mask.nil?
343
+ command.query['fields'] = fields unless fields.nil?
344
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
345
+ execute_or_queue_command(command, &block)
346
+ end
347
+
348
+ # Search for folders that match specific filter criteria. `search()` provides an
349
+ # eventually consistent view of the folders a user has access to which meet the
350
+ # specified filter criteria. This will only return folders on which the caller
351
+ # has the permission `resourcemanager.folders.get`.
352
+ # @param [Fixnum] page_size
353
+ # Optional. The maximum number of folders to return in the response. If
354
+ # unspecified, server picks an appropriate default.
355
+ # @param [String] page_token
356
+ # Optional. A pagination token returned from a previous call to `SearchFolders`
357
+ # that indicates from where search should continue.
358
+ # @param [String] query
359
+ # Optional. Search criteria used to select the folders to return. If no search
360
+ # criteria is specified then all accessible folders will be returned. Query
361
+ # expressions can be used to restrict results based upon displayName, state and
362
+ # parent, where the operators `=` (`:`) `NOT`, `AND` and `OR` can be used along
363
+ # with the suffix wildcard symbol `*`. The `displayName` field in a query
364
+ # expression should use escaped quotes for values that include whitespace to
365
+ # prevent unexpected behavior. | Field | Description | |-------------------------
366
+ # |----------------------------------------| | displayName | Filters by
367
+ # displayName. | | parent | Filters by parent (for example: folders/123). | |
368
+ # state, lifecycleState | Filters by state. | Some example queries are: * Query `
369
+ # displayName=Test*` returns Folder resources whose display name starts with "
370
+ # Test". * Query `state=ACTIVE` returns Folder resources with `state` set to `
371
+ # ACTIVE`. * Query `parent=folders/123` returns Folder resources that have `
372
+ # folders/123` as a parent resource. * Query `parent=folders/123 AND state=
373
+ # ACTIVE` returns active Folder resources that have `folders/123` as a parent
374
+ # resource. * Query `displayName=\\"Test String\\"` returns Folder resources
375
+ # with display names that include both "Test" and "String".
376
+ # @param [String] fields
377
+ # Selector specifying which fields to include in a partial response.
378
+ # @param [String] quota_user
379
+ # Available to use for quota purposes for server-side applications. Can be any
380
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
381
+ # @param [Google::Apis::RequestOptions] options
382
+ # Request-specific options
383
+ #
384
+ # @yield [result, err] Result & error if block supplied
385
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::SearchFoldersResponse] parsed result object
386
+ # @yieldparam err [StandardError] error object if request failed
387
+ #
388
+ # @return [Google::Apis::CloudresourcemanagerV3::SearchFoldersResponse]
389
+ #
390
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
391
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
392
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
393
+ def search_folders(page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
394
+ command = make_simple_command(:get, 'v3/folders:search', options)
395
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::SearchFoldersResponse::Representation
396
+ command.response_class = Google::Apis::CloudresourcemanagerV3::SearchFoldersResponse
397
+ command.query['pageSize'] = page_size unless page_size.nil?
398
+ command.query['pageToken'] = page_token unless page_token.nil?
399
+ command.query['query'] = query unless query.nil?
400
+ command.query['fields'] = fields unless fields.nil?
401
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
402
+ execute_or_queue_command(command, &block)
403
+ end
404
+
405
+ # Sets the access control policy on a folder, replacing any existing policy. The
406
+ # `resource` field should be the folder's resource name, for example: "folders/
407
+ # 1234". The caller must have `resourcemanager.folders.setIamPolicy` permission
408
+ # on the identified folder.
409
+ # @param [String] resource
410
+ # REQUIRED: The resource for which the policy is being specified. See the
411
+ # operation documentation for the appropriate value for this field.
412
+ # @param [Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest] set_iam_policy_request_object
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::Policy] parsed result object
423
+ # @yieldparam err [StandardError] error object if request failed
424
+ #
425
+ # @return [Google::Apis::CloudresourcemanagerV3::Policy]
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 set_folder_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
431
+ command = make_simple_command(:post, 'v3/{+resource}:setIamPolicy', options)
432
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest::Representation
433
+ command.request_object = set_iam_policy_request_object
434
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
435
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
436
+ command.params['resource'] = resource unless resource.nil?
437
+ command.query['fields'] = fields unless fields.nil?
438
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
439
+ execute_or_queue_command(command, &block)
440
+ end
441
+
442
+ # Returns permissions that a caller has on the specified folder. The `resource`
443
+ # field should be the folder's resource name, for example: "folders/1234". There
444
+ # are no permissions required for making this API call.
445
+ # @param [String] resource
446
+ # REQUIRED: The resource for which the policy detail is being requested. See the
447
+ # operation documentation for the appropriate value for this field.
448
+ # @param [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest] test_iam_permissions_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::TestIamPermissionsResponse] parsed result object
459
+ # @yieldparam err [StandardError] error object if request failed
460
+ #
461
+ # @return [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse]
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 test_folder_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
467
+ command = make_simple_command(:post, 'v3/{+resource}:testIamPermissions', options)
468
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest::Representation
469
+ command.request_object = test_iam_permissions_request_object
470
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse::Representation
471
+ command.response_class = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse
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
+ # Cancels the deletion request for a folder. This method may be called on a
479
+ # folder in any state. If the folder is in the ACTIVE state the result will be a
480
+ # no-op success. In order to succeed, the folder's parent must be in the ACTIVE
481
+ # state. In addition, reintroducing the folder into the tree must not violate
482
+ # folder naming, height, and fanout constraints described in the CreateFolder
483
+ # documentation. The caller must have `resourcemanager.folders.undelete`
484
+ # permission on the identified folder.
485
+ # @param [String] name
486
+ # Required. The resource name of the folder to undelete. Must be of the form `
487
+ # folders/`folder_id``.
488
+ # @param [Google::Apis::CloudresourcemanagerV3::UndeleteFolderRequest] undelete_folder_request_object
489
+ # @param [String] fields
490
+ # Selector specifying which fields to include in a partial response.
491
+ # @param [String] quota_user
492
+ # Available to use for quota purposes for server-side applications. Can be any
493
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
494
+ # @param [Google::Apis::RequestOptions] options
495
+ # Request-specific options
496
+ #
497
+ # @yield [result, err] Result & error if block supplied
498
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
499
+ # @yieldparam err [StandardError] error object if request failed
500
+ #
501
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
502
+ #
503
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
504
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
505
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
506
+ def undelete_folder(name, undelete_folder_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
507
+ command = make_simple_command(:post, 'v3/{+name}:undelete', options)
508
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::UndeleteFolderRequest::Representation
509
+ command.request_object = undelete_folder_request_object
510
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
511
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
512
+ command.params['name'] = name unless name.nil?
513
+ command.query['fields'] = fields unless fields.nil?
514
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
515
+ execute_or_queue_command(command, &block)
516
+ end
517
+
53
518
  # Create a Lien which applies to the resource denoted by the `parent` field.
54
519
  # Callers of this method will require permission on the `parent` resource. For
55
520
  # example, applying to `projects/1234` requires permission `resourcemanager.
@@ -65,30 +530,404 @@ module Google
65
530
  # Request-specific options
66
531
  #
67
532
  # @yield [result, err] Result & error if block supplied
68
- # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Lien] parsed result object
533
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Lien] parsed result object
534
+ # @yieldparam err [StandardError] error object if request failed
535
+ #
536
+ # @return [Google::Apis::CloudresourcemanagerV3::Lien]
537
+ #
538
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
539
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
540
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
541
+ def create_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block)
542
+ command = make_simple_command(:post, 'v3/liens', options)
543
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::Lien::Representation
544
+ command.request_object = lien_object
545
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Lien::Representation
546
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Lien
547
+ command.query['fields'] = fields unless fields.nil?
548
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
549
+ execute_or_queue_command(command, &block)
550
+ end
551
+
552
+ # Delete a Lien by `name`. Callers of this method will require permission on the
553
+ # `parent` resource. For example, a Lien with a `parent` of `projects/1234`
554
+ # requires permission `resourcemanager.projects.updateLiens`.
555
+ # @param [String] name
556
+ # Required. The name/identifier of the Lien to delete.
557
+ # @param [String] fields
558
+ # Selector specifying which fields to include in a partial response.
559
+ # @param [String] quota_user
560
+ # Available to use for quota purposes for server-side applications. Can be any
561
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
562
+ # @param [Google::Apis::RequestOptions] options
563
+ # Request-specific options
564
+ #
565
+ # @yield [result, err] Result & error if block supplied
566
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Empty] parsed result object
567
+ # @yieldparam err [StandardError] error object if request failed
568
+ #
569
+ # @return [Google::Apis::CloudresourcemanagerV3::Empty]
570
+ #
571
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
572
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
573
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
574
+ def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block)
575
+ command = make_simple_command(:delete, 'v3/{+name}', options)
576
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Empty::Representation
577
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Empty
578
+ command.params['name'] = name unless name.nil?
579
+ command.query['fields'] = fields unless fields.nil?
580
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
581
+ execute_or_queue_command(command, &block)
582
+ end
583
+
584
+ # Retrieve a Lien by `name`. Callers of this method will require permission on
585
+ # the `parent` resource. For example, a Lien with a `parent` of `projects/1234`
586
+ # requires permission `resourcemanager.projects.get`
587
+ # @param [String] name
588
+ # Required. The name/identifier of the Lien.
589
+ # @param [String] fields
590
+ # Selector specifying which fields to include in a partial response.
591
+ # @param [String] quota_user
592
+ # Available to use for quota purposes for server-side applications. Can be any
593
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
594
+ # @param [Google::Apis::RequestOptions] options
595
+ # Request-specific options
596
+ #
597
+ # @yield [result, err] Result & error if block supplied
598
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Lien] parsed result object
599
+ # @yieldparam err [StandardError] error object if request failed
600
+ #
601
+ # @return [Google::Apis::CloudresourcemanagerV3::Lien]
602
+ #
603
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
604
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
605
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
606
+ def get_lien(name, fields: nil, quota_user: nil, options: nil, &block)
607
+ command = make_simple_command(:get, 'v3/{+name}', options)
608
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Lien::Representation
609
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Lien
610
+ command.params['name'] = name unless name.nil?
611
+ command.query['fields'] = fields unless fields.nil?
612
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
613
+ execute_or_queue_command(command, &block)
614
+ end
615
+
616
+ # List all Liens applied to the `parent` resource. Callers of this method will
617
+ # require permission on the `parent` resource. For example, a Lien with a `
618
+ # parent` of `projects/1234` requires permission `resourcemanager.projects.get`.
619
+ # @param [Fixnum] page_size
620
+ # The maximum number of items to return. This is a suggestion for the server.
621
+ # @param [String] page_token
622
+ # The `next_page_token` value returned from a previous List request, if any.
623
+ # @param [String] parent
624
+ # Required. The name of the resource to list all attached Liens. For example, `
625
+ # projects/1234`. (google.api.field_policy).resource_type annotation is not set
626
+ # since the parent depends on the meta api implementation. This field could be a
627
+ # project or other sub project resources.
628
+ # @param [String] fields
629
+ # Selector specifying which fields to include in a partial response.
630
+ # @param [String] quota_user
631
+ # Available to use for quota purposes for server-side applications. Can be any
632
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
633
+ # @param [Google::Apis::RequestOptions] options
634
+ # Request-specific options
635
+ #
636
+ # @yield [result, err] Result & error if block supplied
637
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::ListLiensResponse] parsed result object
638
+ # @yieldparam err [StandardError] error object if request failed
639
+ #
640
+ # @return [Google::Apis::CloudresourcemanagerV3::ListLiensResponse]
641
+ #
642
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
643
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
644
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
645
+ def list_liens(page_size: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
646
+ command = make_simple_command(:get, 'v3/liens', options)
647
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::ListLiensResponse::Representation
648
+ command.response_class = Google::Apis::CloudresourcemanagerV3::ListLiensResponse
649
+ command.query['pageSize'] = page_size unless page_size.nil?
650
+ command.query['pageToken'] = page_token unless page_token.nil?
651
+ command.query['parent'] = parent unless parent.nil?
652
+ command.query['fields'] = fields unless fields.nil?
653
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
654
+ execute_or_queue_command(command, &block)
655
+ end
656
+
657
+ # Gets the latest state of a long-running operation. Clients can use this method
658
+ # to poll the operation result at intervals as recommended by the API service.
659
+ # @param [String] name
660
+ # The name of the operation resource.
661
+ # @param [String] fields
662
+ # Selector specifying which fields to include in a partial response.
663
+ # @param [String] quota_user
664
+ # Available to use for quota purposes for server-side applications. Can be any
665
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
666
+ # @param [Google::Apis::RequestOptions] options
667
+ # Request-specific options
668
+ #
669
+ # @yield [result, err] Result & error if block supplied
670
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
671
+ # @yieldparam err [StandardError] error object if request failed
672
+ #
673
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
674
+ #
675
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
676
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
677
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
678
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
679
+ command = make_simple_command(:get, 'v3/{+name}', options)
680
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
681
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
682
+ command.params['name'] = name unless name.nil?
683
+ command.query['fields'] = fields unless fields.nil?
684
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
685
+ execute_or_queue_command(command, &block)
686
+ end
687
+
688
+ # Fetches an organization resource identified by the specified resource name.
689
+ # @param [String] name
690
+ # Required. The resource name of the Organization to fetch. This is the
691
+ # organization's relative path in the API, formatted as "organizations/[
692
+ # organizationId]". For example, "organizations/1234".
693
+ # @param [String] fields
694
+ # Selector specifying which fields to include in a partial response.
695
+ # @param [String] quota_user
696
+ # Available to use for quota purposes for server-side applications. Can be any
697
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
698
+ # @param [Google::Apis::RequestOptions] options
699
+ # Request-specific options
700
+ #
701
+ # @yield [result, err] Result & error if block supplied
702
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Organization] parsed result object
703
+ # @yieldparam err [StandardError] error object if request failed
704
+ #
705
+ # @return [Google::Apis::CloudresourcemanagerV3::Organization]
706
+ #
707
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
708
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
709
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
710
+ def get_organization(name, fields: nil, quota_user: nil, options: nil, &block)
711
+ command = make_simple_command(:get, 'v3/{+name}', options)
712
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Organization::Representation
713
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Organization
714
+ command.params['name'] = name unless name.nil?
715
+ command.query['fields'] = fields unless fields.nil?
716
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
717
+ execute_or_queue_command(command, &block)
718
+ end
719
+
720
+ # Gets the access control policy for an organization resource. The policy may be
721
+ # empty if no such policy or resource exists. The `resource` field should be the
722
+ # organization's resource name, for example: "organizations/123". Authorization
723
+ # requires the IAM permission `resourcemanager.organizations.getIamPolicy` on
724
+ # the specified organization.
725
+ # @param [String] resource
726
+ # REQUIRED: The resource for which the policy is being requested. See the
727
+ # operation documentation for the appropriate value for this field.
728
+ # @param [Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest] get_iam_policy_request_object
729
+ # @param [String] fields
730
+ # Selector specifying which fields to include in a partial response.
731
+ # @param [String] quota_user
732
+ # Available to use for quota purposes for server-side applications. Can be any
733
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
734
+ # @param [Google::Apis::RequestOptions] options
735
+ # Request-specific options
736
+ #
737
+ # @yield [result, err] Result & error if block supplied
738
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
739
+ # @yieldparam err [StandardError] error object if request failed
740
+ #
741
+ # @return [Google::Apis::CloudresourcemanagerV3::Policy]
742
+ #
743
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
744
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
745
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
746
+ def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
747
+ command = make_simple_command(:post, 'v3/{+resource}:getIamPolicy', options)
748
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest::Representation
749
+ command.request_object = get_iam_policy_request_object
750
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
751
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
752
+ command.params['resource'] = resource unless resource.nil?
753
+ command.query['fields'] = fields unless fields.nil?
754
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
755
+ execute_or_queue_command(command, &block)
756
+ end
757
+
758
+ # Searches organization resources that are visible to the user and satisfy the
759
+ # specified filter. This method returns organizations in an unspecified order.
760
+ # New organizations do not necessarily appear at the end of the results, and may
761
+ # take a small amount of time to appear. Search will only return organizations
762
+ # on which the user has the permission `resourcemanager.organizations.get`
763
+ # @param [Fixnum] page_size
764
+ # Optional. The maximum number of organizations to return in the response. If
765
+ # unspecified, server picks an appropriate default.
766
+ # @param [String] page_token
767
+ # Optional. A pagination token returned from a previous call to `
768
+ # SearchOrganizations` that indicates from where listing should continue.
769
+ # @param [String] query
770
+ # Optional. An optional query string used to filter the Organizations to return
771
+ # in the response. Query rules are case-insensitive. | Field | Description | |---
772
+ # ---------------|--------------------------------------------| |
773
+ # directoryCustomerId, owner.directoryCustomerId | Filters by directory customer
774
+ # id. | | domain | Filters by domain. | Organizations may be queried by `
775
+ # directoryCustomerId` or by `domain`, where the domain is a G Suite domain, for
776
+ # example: * Query `directorycustomerid:123456789` returns Organization
777
+ # resources with `owner.directory_customer_id` equal to `123456789`. * Query `
778
+ # domain:google.com` returns Organization resources corresponding to the domain `
779
+ # google.com`.
780
+ # @param [String] fields
781
+ # Selector specifying which fields to include in a partial response.
782
+ # @param [String] quota_user
783
+ # Available to use for quota purposes for server-side applications. Can be any
784
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
785
+ # @param [Google::Apis::RequestOptions] options
786
+ # Request-specific options
787
+ #
788
+ # @yield [result, err] Result & error if block supplied
789
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::SearchOrganizationsResponse] parsed result object
790
+ # @yieldparam err [StandardError] error object if request failed
791
+ #
792
+ # @return [Google::Apis::CloudresourcemanagerV3::SearchOrganizationsResponse]
793
+ #
794
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
795
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
796
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
797
+ def search_organizations(page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
798
+ command = make_simple_command(:get, 'v3/organizations:search', options)
799
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::SearchOrganizationsResponse::Representation
800
+ command.response_class = Google::Apis::CloudresourcemanagerV3::SearchOrganizationsResponse
801
+ command.query['pageSize'] = page_size unless page_size.nil?
802
+ command.query['pageToken'] = page_token unless page_token.nil?
803
+ command.query['query'] = query unless query.nil?
804
+ command.query['fields'] = fields unless fields.nil?
805
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
806
+ execute_or_queue_command(command, &block)
807
+ end
808
+
809
+ # Sets the access control policy on an organization resource. Replaces any
810
+ # existing policy. The `resource` field should be the organization's resource
811
+ # name, for example: "organizations/123". Authorization requires the IAM
812
+ # permission `resourcemanager.organizations.setIamPolicy` on the specified
813
+ # organization.
814
+ # @param [String] resource
815
+ # REQUIRED: The resource for which the policy is being specified. See the
816
+ # operation documentation for the appropriate value for this field.
817
+ # @param [Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest] set_iam_policy_request_object
818
+ # @param [String] fields
819
+ # Selector specifying which fields to include in a partial response.
820
+ # @param [String] quota_user
821
+ # Available to use for quota purposes for server-side applications. Can be any
822
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
823
+ # @param [Google::Apis::RequestOptions] options
824
+ # Request-specific options
825
+ #
826
+ # @yield [result, err] Result & error if block supplied
827
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
828
+ # @yieldparam err [StandardError] error object if request failed
829
+ #
830
+ # @return [Google::Apis::CloudresourcemanagerV3::Policy]
831
+ #
832
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
833
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
834
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
835
+ def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
836
+ command = make_simple_command(:post, 'v3/{+resource}:setIamPolicy', options)
837
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest::Representation
838
+ command.request_object = set_iam_policy_request_object
839
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
840
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
841
+ command.params['resource'] = resource unless resource.nil?
842
+ command.query['fields'] = fields unless fields.nil?
843
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
844
+ execute_or_queue_command(command, &block)
845
+ end
846
+
847
+ # Returns the permissions that a caller has on the specified organization. The `
848
+ # resource` field should be the organization's resource name, for example: "
849
+ # organizations/123". There are no permissions required for making this API call.
850
+ # @param [String] resource
851
+ # REQUIRED: The resource for which the policy detail is being requested. See the
852
+ # operation documentation for the appropriate value for this field.
853
+ # @param [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest] test_iam_permissions_request_object
854
+ # @param [String] fields
855
+ # Selector specifying which fields to include in a partial response.
856
+ # @param [String] quota_user
857
+ # Available to use for quota purposes for server-side applications. Can be any
858
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
859
+ # @param [Google::Apis::RequestOptions] options
860
+ # Request-specific options
861
+ #
862
+ # @yield [result, err] Result & error if block supplied
863
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse] parsed result object
864
+ # @yieldparam err [StandardError] error object if request failed
865
+ #
866
+ # @return [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse]
867
+ #
868
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
869
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
870
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
871
+ def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
872
+ command = make_simple_command(:post, 'v3/{+resource}:testIamPermissions', options)
873
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest::Representation
874
+ command.request_object = test_iam_permissions_request_object
875
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse::Representation
876
+ command.response_class = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse
877
+ command.params['resource'] = resource unless resource.nil?
878
+ command.query['fields'] = fields unless fields.nil?
879
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
880
+ execute_or_queue_command(command, &block)
881
+ end
882
+
883
+ # Request that a new project be created. The result is an `Operation` which can
884
+ # be used to track the creation process. This process usually takes a few
885
+ # seconds, but can sometimes take much longer. The tracking `Operation` is
886
+ # automatically deleted after a few hours, so there is no need to call `
887
+ # DeleteOperation`.
888
+ # @param [Google::Apis::CloudresourcemanagerV3::Project] project_object
889
+ # @param [String] fields
890
+ # Selector specifying which fields to include in a partial response.
891
+ # @param [String] quota_user
892
+ # Available to use for quota purposes for server-side applications. Can be any
893
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
894
+ # @param [Google::Apis::RequestOptions] options
895
+ # Request-specific options
896
+ #
897
+ # @yield [result, err] Result & error if block supplied
898
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
69
899
  # @yieldparam err [StandardError] error object if request failed
70
900
  #
71
- # @return [Google::Apis::CloudresourcemanagerV3::Lien]
901
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
72
902
  #
73
903
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
904
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
905
  # @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
906
+ def create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
907
+ command = make_simple_command(:post, 'v3/projects', options)
908
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::Project::Representation
909
+ command.request_object = project_object
910
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
911
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
82
912
  command.query['fields'] = fields unless fields.nil?
83
913
  command.query['quotaUser'] = quota_user unless quota_user.nil?
84
914
  execute_or_queue_command(command, &block)
85
915
  end
86
916
 
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`.
917
+ # Marks the project identified by the specified `name` (for example, `projects/
918
+ # 415104041262`) for deletion. This method will only affect the project if it
919
+ # has a lifecycle state of ACTIVE. This method changes the Project's lifecycle
920
+ # state from ACTIVE to DELETE_REQUESTED. The deletion starts at an unspecified
921
+ # time, at which point the Project is no longer accessible. Until the deletion
922
+ # completes, you can check the lifecycle state checked by retrieving the project
923
+ # with GetProject, and the project remains visible to ListProjects. However, you
924
+ # cannot update the project. After the deletion completes, the project is not
925
+ # retrievable by the GetProject, ListProjects, and SearchProjects methods. This
926
+ # method behaves idempotently, such that deleting a `DELETE_REQUESTED` project
927
+ # will not cause an error, but also won't do anything. The caller must have `
928
+ # resourcemanager.projects.delete` permissions for this project.
90
929
  # @param [String] name
91
- # Required. The name/identifier of the Lien to delete.
930
+ # Required. The name of the Project (for example, `projects/415104041262`).
92
931
  # @param [String] fields
93
932
  # Selector specifying which fields to include in a partial response.
94
933
  # @param [String] quota_user
@@ -98,29 +937,29 @@ module Google
98
937
  # Request-specific options
99
938
  #
100
939
  # @yield [result, err] Result & error if block supplied
101
- # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Empty] parsed result object
940
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
102
941
  # @yieldparam err [StandardError] error object if request failed
103
942
  #
104
- # @return [Google::Apis::CloudresourcemanagerV3::Empty]
943
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
105
944
  #
106
945
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
946
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
947
  # @raise [Google::Apis::AuthorizationError] Authorization is required
109
- def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block)
948
+ def delete_project(name, fields: nil, quota_user: nil, options: nil, &block)
110
949
  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
950
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
951
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
113
952
  command.params['name'] = name unless name.nil?
114
953
  command.query['fields'] = fields unless fields.nil?
115
954
  command.query['quotaUser'] = quota_user unless quota_user.nil?
116
955
  execute_or_queue_command(command, &block)
117
956
  end
118
957
 
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 `resourcemanager.projects.get`
958
+ # Retrieves the project identified by the specified `name` (for example, `
959
+ # projects/415104041262`). The caller must have `resourcemanager.projects.get`
960
+ # permission for this project.
122
961
  # @param [String] name
123
- # Required. The name/identifier of the Lien.
962
+ # Required. The name of the project (for example, `projects/415104041262`).
124
963
  # @param [String] fields
125
964
  # Selector specifying which fields to include in a partial response.
126
965
  # @param [String] quota_user
@@ -130,36 +969,79 @@ module Google
130
969
  # Request-specific options
131
970
  #
132
971
  # @yield [result, err] Result & error if block supplied
133
- # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Lien] parsed result object
972
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Project] parsed result object
134
973
  # @yieldparam err [StandardError] error object if request failed
135
974
  #
136
- # @return [Google::Apis::CloudresourcemanagerV3::Lien]
975
+ # @return [Google::Apis::CloudresourcemanagerV3::Project]
137
976
  #
138
977
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
139
978
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
140
979
  # @raise [Google::Apis::AuthorizationError] Authorization is required
141
- def get_lien(name, fields: nil, quota_user: nil, options: nil, &block)
980
+ def get_project(name, fields: nil, quota_user: nil, options: nil, &block)
142
981
  command = make_simple_command(:get, 'v3/{+name}', options)
143
- command.response_representation = Google::Apis::CloudresourcemanagerV3::Lien::Representation
144
- command.response_class = Google::Apis::CloudresourcemanagerV3::Lien
982
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Project::Representation
983
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Project
145
984
  command.params['name'] = name unless name.nil?
146
985
  command.query['fields'] = fields unless fields.nil?
147
986
  command.query['quotaUser'] = quota_user unless quota_user.nil?
148
987
  execute_or_queue_command(command, &block)
149
988
  end
150
989
 
151
- # List all Liens applied to the `parent` resource. Callers of this method will
152
- # require permission on the `parent` resource. For example, a Lien with a `
153
- # parent` of `projects/1234` requires permission `resourcemanager.projects.get`.
990
+ # Returns the IAM access control policy for the specified project. Permission is
991
+ # denied if the policy or the resource do not exist.
992
+ # @param [String] resource
993
+ # REQUIRED: The resource for which the policy is being requested. See the
994
+ # operation documentation for the appropriate value for this field.
995
+ # @param [Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest] get_iam_policy_request_object
996
+ # @param [String] fields
997
+ # Selector specifying which fields to include in a partial response.
998
+ # @param [String] quota_user
999
+ # Available to use for quota purposes for server-side applications. Can be any
1000
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1001
+ # @param [Google::Apis::RequestOptions] options
1002
+ # Request-specific options
1003
+ #
1004
+ # @yield [result, err] Result & error if block supplied
1005
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
1006
+ # @yieldparam err [StandardError] error object if request failed
1007
+ #
1008
+ # @return [Google::Apis::CloudresourcemanagerV3::Policy]
1009
+ #
1010
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1011
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1012
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1013
+ def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1014
+ command = make_simple_command(:post, 'v3/{+resource}:getIamPolicy', options)
1015
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::GetIamPolicyRequest::Representation
1016
+ command.request_object = get_iam_policy_request_object
1017
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
1018
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
1019
+ command.params['resource'] = resource unless resource.nil?
1020
+ command.query['fields'] = fields unless fields.nil?
1021
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1022
+ execute_or_queue_command(command, &block)
1023
+ end
1024
+
1025
+ # Lists projects that are direct children of the specified folder or
1026
+ # organization resource. `list()` provides a strongly consistent view of the
1027
+ # projects underneath the specified parent resource. `list()` returns projects
1028
+ # sorted based upon the (ascending) lexical ordering of their `display_name`.
1029
+ # The caller must have `resourcemanager.projects.list` permission on the
1030
+ # identified parent.
154
1031
  # @param [Fixnum] page_size
155
- # The maximum number of items to return. This is a suggestion for the server.
1032
+ # Optional. The maximum number of projects to return in the response. The server
1033
+ # can return fewer projects than requested. If unspecified, server picks an
1034
+ # appropriate default.
156
1035
  # @param [String] page_token
157
- # The `next_page_token` value returned from a previous List request, if any.
1036
+ # Optional. A pagination token returned from a previous call to ListProjects
1037
+ # that indicates from where listing should continue.
158
1038
  # @param [String] parent
159
- # Required. The name of the resource to list all attached Liens. For example, `
160
- # projects/1234`. (google.api.field_policy).resource_type annotation is not set
161
- # since the parent depends on the meta api implementation. This field could be a
162
- # project or other sub project resources.
1039
+ # Required. The name of the parent resource to list projects under. For example,
1040
+ # setting this field to 'folders/1234' would list all projects directly under
1041
+ # that folder.
1042
+ # @param [Boolean] show_deleted
1043
+ # Optional. Indicate that projects in the `DELETE_REQUESTED` state should also
1044
+ # be returned. Normally only `ACTIVE` projects are returned.
163
1045
  # @param [String] fields
164
1046
  # Selector specifying which fields to include in a partial response.
165
1047
  # @param [String] quota_user
@@ -169,30 +1051,37 @@ module Google
169
1051
  # Request-specific options
170
1052
  #
171
1053
  # @yield [result, err] Result & error if block supplied
172
- # @yieldparam result [Google::Apis::CloudresourcemanagerV3::ListLiensResponse] parsed result object
1054
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::ListProjectsResponse] parsed result object
173
1055
  # @yieldparam err [StandardError] error object if request failed
174
1056
  #
175
- # @return [Google::Apis::CloudresourcemanagerV3::ListLiensResponse]
1057
+ # @return [Google::Apis::CloudresourcemanagerV3::ListProjectsResponse]
176
1058
  #
177
1059
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
178
1060
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
179
1061
  # @raise [Google::Apis::AuthorizationError] Authorization is required
180
- def list_liens(page_size: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
181
- command = make_simple_command(:get, 'v3/liens', options)
182
- command.response_representation = Google::Apis::CloudresourcemanagerV3::ListLiensResponse::Representation
183
- command.response_class = Google::Apis::CloudresourcemanagerV3::ListLiensResponse
1062
+ def list_projects(page_size: nil, page_token: nil, parent: nil, show_deleted: nil, fields: nil, quota_user: nil, options: nil, &block)
1063
+ command = make_simple_command(:get, 'v3/projects', options)
1064
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::ListProjectsResponse::Representation
1065
+ command.response_class = Google::Apis::CloudresourcemanagerV3::ListProjectsResponse
184
1066
  command.query['pageSize'] = page_size unless page_size.nil?
185
1067
  command.query['pageToken'] = page_token unless page_token.nil?
186
1068
  command.query['parent'] = parent unless parent.nil?
1069
+ command.query['showDeleted'] = show_deleted unless show_deleted.nil?
187
1070
  command.query['fields'] = fields unless fields.nil?
188
1071
  command.query['quotaUser'] = quota_user unless quota_user.nil?
189
1072
  execute_or_queue_command(command, &block)
190
1073
  end
191
1074
 
192
- # Gets the latest state of a long-running operation. Clients can use this method
193
- # to poll the operation result at intervals as recommended by the API service.
1075
+ # Move a project to another place in your resource hierarchy, under a new
1076
+ # resource parent. Returns an operation which can be used to track the process
1077
+ # of the project move workflow. Upon success, the `Operation.response` field
1078
+ # will be populated with the moved project. The caller must have `
1079
+ # resourcemanager.projects.update` permission on the project and have `
1080
+ # resourcemanager.projects.move` permission on the project's current and
1081
+ # proposed new parent.
194
1082
  # @param [String] name
195
- # The name of the operation resource.
1083
+ # Required. The name of the project to move.
1084
+ # @param [Google::Apis::CloudresourcemanagerV3::MoveProjectRequest] move_project_request_object
196
1085
  # @param [String] fields
197
1086
  # Selector specifying which fields to include in a partial response.
198
1087
  # @param [String] quota_user
@@ -210,8 +1099,247 @@ module Google
210
1099
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
211
1100
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
212
1101
  # @raise [Google::Apis::AuthorizationError] Authorization is required
213
- def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
214
- command = make_simple_command(:get, 'v3/{+name}', options)
1102
+ def move_project(name, move_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1103
+ command = make_simple_command(:post, 'v3/{+name}:move', options)
1104
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::MoveProjectRequest::Representation
1105
+ command.request_object = move_project_request_object
1106
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
1107
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
1108
+ command.params['name'] = name unless name.nil?
1109
+ command.query['fields'] = fields unless fields.nil?
1110
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1111
+ execute_or_queue_command(command, &block)
1112
+ end
1113
+
1114
+ # Updates the `display_name` and labels of the project identified by the
1115
+ # specified `name` (for example, `projects/415104041262`). Deleting all labels
1116
+ # requires an update mask for labels field. The caller must have `
1117
+ # resourcemanager.projects.update` permission for this project.
1118
+ # @param [String] name
1119
+ # Output only. The unique resource name of the project. It is an int64 generated
1120
+ # number prefixed by "projects/". Example: `projects/415104041262`
1121
+ # @param [Google::Apis::CloudresourcemanagerV3::Project] project_object
1122
+ # @param [String] update_mask
1123
+ # Optional. An update mask to selectively update fields.
1124
+ # @param [String] fields
1125
+ # Selector specifying which fields to include in a partial response.
1126
+ # @param [String] quota_user
1127
+ # Available to use for quota purposes for server-side applications. Can be any
1128
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1129
+ # @param [Google::Apis::RequestOptions] options
1130
+ # Request-specific options
1131
+ #
1132
+ # @yield [result, err] Result & error if block supplied
1133
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
1134
+ # @yieldparam err [StandardError] error object if request failed
1135
+ #
1136
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
1137
+ #
1138
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1139
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1140
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1141
+ def patch_project(name, project_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1142
+ command = make_simple_command(:patch, 'v3/{+name}', options)
1143
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::Project::Representation
1144
+ command.request_object = project_object
1145
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
1146
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
1147
+ command.params['name'] = name unless name.nil?
1148
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1149
+ command.query['fields'] = fields unless fields.nil?
1150
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1151
+ execute_or_queue_command(command, &block)
1152
+ end
1153
+
1154
+ # Search for projects that the caller has both `resourcemanager.projects.get`
1155
+ # permission on, and also satisfy the specified query. This method returns
1156
+ # projects in an unspecified order. This method is eventually consistent with
1157
+ # project mutations; this means that a newly created project may not appear in
1158
+ # the results or recent updates to an existing project may not be reflected in
1159
+ # the results. To retrieve the latest state of a project, use the GetProject
1160
+ # method.
1161
+ # @param [Fixnum] page_size
1162
+ # Optional. The maximum number of projects to return in the response. The server
1163
+ # can return fewer projects than requested. If unspecified, server picks an
1164
+ # appropriate default.
1165
+ # @param [String] page_token
1166
+ # Optional. A pagination token returned from a previous call to ListProjects
1167
+ # that indicates from where listing should continue.
1168
+ # @param [String] query
1169
+ # Optional. A query string for searching for projects that the caller has `
1170
+ # resourcemanager.projects.get` permission to. If multiple fields are included
1171
+ # in the query, the it will return results that match any of the fields. Some
1172
+ # eligible fields are: | Field | Description | |-------------------------|-------
1173
+ # ---------------------------------------| | displayName, name | Filters by
1174
+ # displayName. | | parent | Project's parent. (for example: folders/123,
1175
+ # organizations/*) Prefer parent field over parent.type and parent.id. | |
1176
+ # parent.type | Parent's type: `folder` or `organization`. | | parent.id |
1177
+ # Parent's id number (for example: 123) | | id, projectId | Filters by projectId.
1178
+ # | | state, lifecycleState | Filters by state. | | labels | Filters by label
1179
+ # name or value. | | labels. (where *key* is the name of a label) | Filters by
1180
+ # label name. | Search expressions are case insensitive. Some examples queries: |
1181
+ # Query | Description | |------------------|------------------------------------
1182
+ # -----------------| | name:how* | The project's name starts with "how". | |
1183
+ # name:Howl | The project's name is `Howl` or `howl`. | | name:HOWL | Equivalent
1184
+ # to above. | | NAME:howl | Equivalent to above. | | labels.color:* | The
1185
+ # project has the label `color`. | | labels.color:red | The project's label `
1186
+ # color` has the value `red`. | | labels.color:red labels.size:big | The project'
1187
+ # s label `color` has the value `red` and its label `size` has the value `big`. |
1188
+ # If no query is specified, the call will return projects for which the user
1189
+ # has the `resourcemanager.projects.get` permission.
1190
+ # @param [String] fields
1191
+ # Selector specifying which fields to include in a partial response.
1192
+ # @param [String] quota_user
1193
+ # Available to use for quota purposes for server-side applications. Can be any
1194
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1195
+ # @param [Google::Apis::RequestOptions] options
1196
+ # Request-specific options
1197
+ #
1198
+ # @yield [result, err] Result & error if block supplied
1199
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::SearchProjectsResponse] parsed result object
1200
+ # @yieldparam err [StandardError] error object if request failed
1201
+ #
1202
+ # @return [Google::Apis::CloudresourcemanagerV3::SearchProjectsResponse]
1203
+ #
1204
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1205
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1206
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1207
+ def search_projects(page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block)
1208
+ command = make_simple_command(:get, 'v3/projects:search', options)
1209
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::SearchProjectsResponse::Representation
1210
+ command.response_class = Google::Apis::CloudresourcemanagerV3::SearchProjectsResponse
1211
+ command.query['pageSize'] = page_size unless page_size.nil?
1212
+ command.query['pageToken'] = page_token unless page_token.nil?
1213
+ command.query['query'] = query unless query.nil?
1214
+ command.query['fields'] = fields unless fields.nil?
1215
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1216
+ execute_or_queue_command(command, &block)
1217
+ end
1218
+
1219
+ # Sets the IAM access control policy for the specified project. CAUTION: This
1220
+ # method will replace the existing policy, and cannot be used to append
1221
+ # additional IAM settings. Note: Removing service accounts from policies or
1222
+ # changing their roles can render services completely inoperable. It is
1223
+ # important to understand how the service account is being used before removing
1224
+ # or updating its roles. The following constraints apply when using `
1225
+ # setIamPolicy()`: + Project does not support `allUsers` and `
1226
+ # allAuthenticatedUsers` as `members` in a `Binding` of a `Policy`. + The owner
1227
+ # role can be granted to a `user`, `serviceAccount`, or a group that is part of
1228
+ # an organization. For example, group@myownpersonaldomain.com could be added as
1229
+ # an owner to a project in the myownpersonaldomain.com organization, but not the
1230
+ # examplepetstore.com organization. + Service accounts can be made owners of a
1231
+ # project directly without any restrictions. However, to be added as an owner, a
1232
+ # user must be invited using the Cloud Platform console and must accept the
1233
+ # invitation. + A user cannot be granted the owner role using `setIamPolicy()`.
1234
+ # The user must be granted the owner role using the Cloud Platform Console and
1235
+ # must explicitly accept the invitation. + Invitations to grant the owner role
1236
+ # cannot be sent using `setIamPolicy()`; they must be sent only using the Cloud
1237
+ # Platform Console. + Membership changes that leave the project without any
1238
+ # owners that have accepted the Terms of Service (ToS) will be rejected. + If
1239
+ # the project is not part of an organization, there must be at least one owner
1240
+ # who has accepted the Terms of Service (ToS) agreement in the policy. Calling `
1241
+ # setIamPolicy()` to remove the last ToS-accepted owner from the policy will
1242
+ # fail. This restriction also applies to legacy projects that no longer have
1243
+ # owners who have accepted the ToS. Edits to IAM policies will be rejected until
1244
+ # the lack of a ToS-accepting owner is rectified. + Calling this method requires
1245
+ # enabling the App Engine Admin API.
1246
+ # @param [String] resource
1247
+ # REQUIRED: The resource for which the policy is being specified. See the
1248
+ # operation documentation for the appropriate value for this field.
1249
+ # @param [Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest] set_iam_policy_request_object
1250
+ # @param [String] fields
1251
+ # Selector specifying which fields to include in a partial response.
1252
+ # @param [String] quota_user
1253
+ # Available to use for quota purposes for server-side applications. Can be any
1254
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1255
+ # @param [Google::Apis::RequestOptions] options
1256
+ # Request-specific options
1257
+ #
1258
+ # @yield [result, err] Result & error if block supplied
1259
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Policy] parsed result object
1260
+ # @yieldparam err [StandardError] error object if request failed
1261
+ #
1262
+ # @return [Google::Apis::CloudresourcemanagerV3::Policy]
1263
+ #
1264
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1265
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1266
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1267
+ def set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1268
+ command = make_simple_command(:post, 'v3/{+resource}:setIamPolicy', options)
1269
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::SetIamPolicyRequest::Representation
1270
+ command.request_object = set_iam_policy_request_object
1271
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::Policy::Representation
1272
+ command.response_class = Google::Apis::CloudresourcemanagerV3::Policy
1273
+ command.params['resource'] = resource unless resource.nil?
1274
+ command.query['fields'] = fields unless fields.nil?
1275
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1276
+ execute_or_queue_command(command, &block)
1277
+ end
1278
+
1279
+ # Returns permissions that a caller has on the specified project.
1280
+ # @param [String] resource
1281
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1282
+ # operation documentation for the appropriate value for this field.
1283
+ # @param [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest] test_iam_permissions_request_object
1284
+ # @param [String] fields
1285
+ # Selector specifying which fields to include in a partial response.
1286
+ # @param [String] quota_user
1287
+ # Available to use for quota purposes for server-side applications. Can be any
1288
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1289
+ # @param [Google::Apis::RequestOptions] options
1290
+ # Request-specific options
1291
+ #
1292
+ # @yield [result, err] Result & error if block supplied
1293
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse] parsed result object
1294
+ # @yieldparam err [StandardError] error object if request failed
1295
+ #
1296
+ # @return [Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse]
1297
+ #
1298
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1299
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1300
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1301
+ def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1302
+ command = make_simple_command(:post, 'v3/{+resource}:testIamPermissions', options)
1303
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsRequest::Representation
1304
+ command.request_object = test_iam_permissions_request_object
1305
+ command.response_representation = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse::Representation
1306
+ command.response_class = Google::Apis::CloudresourcemanagerV3::TestIamPermissionsResponse
1307
+ command.params['resource'] = resource unless resource.nil?
1308
+ command.query['fields'] = fields unless fields.nil?
1309
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1310
+ execute_or_queue_command(command, &block)
1311
+ end
1312
+
1313
+ # Restores the project identified by the specified `name` (for example, `
1314
+ # projects/415104041262`). You can only use this method for a project that has a
1315
+ # lifecycle state of DELETE_REQUESTED. After deletion starts, the project cannot
1316
+ # be restored. The caller must have `resourcemanager.projects.undelete`
1317
+ # permission for this project.
1318
+ # @param [String] name
1319
+ # Required. The name of the project (for example, `projects/415104041262`).
1320
+ # Required.
1321
+ # @param [Google::Apis::CloudresourcemanagerV3::UndeleteProjectRequest] undelete_project_request_object
1322
+ # @param [String] fields
1323
+ # Selector specifying which fields to include in a partial response.
1324
+ # @param [String] quota_user
1325
+ # Available to use for quota purposes for server-side applications. Can be any
1326
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1327
+ # @param [Google::Apis::RequestOptions] options
1328
+ # Request-specific options
1329
+ #
1330
+ # @yield [result, err] Result & error if block supplied
1331
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV3::Operation] parsed result object
1332
+ # @yieldparam err [StandardError] error object if request failed
1333
+ #
1334
+ # @return [Google::Apis::CloudresourcemanagerV3::Operation]
1335
+ #
1336
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1337
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1338
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1339
+ def undelete_project(name, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1340
+ command = make_simple_command(:post, 'v3/{+name}:undelete', options)
1341
+ command.request_representation = Google::Apis::CloudresourcemanagerV3::UndeleteProjectRequest::Representation
1342
+ command.request_object = undelete_project_request_object
215
1343
  command.response_representation = Google::Apis::CloudresourcemanagerV3::Operation::Representation
216
1344
  command.response_class = Google::Apis::CloudresourcemanagerV3::Operation
217
1345
  command.params['name'] = name unless name.nil?
@@ -291,9 +1419,9 @@ module Google
291
1419
  # NOTE: The `parent` field is expected to be a full resource name: https://
292
1420
  # cloud.google.com/apis/design/resource_names#full_resource_name
293
1421
  # @param [Fixnum] page_size
294
- # Optional. The maximum number of TagBindings to return in the response. This is
295
- # currently not used by the server and will return the full page even if a size
296
- # is specified.
1422
+ # Optional. The maximum number of TagBindings to return in the response. The
1423
+ # server allows a maximum of 300 TagBindings to return. If unspecified, the
1424
+ # server will use 100 as the default.
297
1425
  # @param [String] page_token
298
1426
  # Optional. A pagination token returned from a previous call to `ListTagBindings`
299
1427
  # that indicates where this listing should continue from.
@@ -476,13 +1604,12 @@ module Google
476
1604
 
477
1605
  # Lists all TagKeys for a parent resource.
478
1606
  # @param [Fixnum] page_size
479
- # Optional. The maximum number of TagKeys to return in the response. This is
480
- # currently not used by the server and will return the full page even if a size
481
- # is specified currently.
1607
+ # Optional. The maximum number of TagKeys to return in the response. The server
1608
+ # allows a maximum of 300 TagKeys to return. If unspecified, the server will use
1609
+ # 100 as the default.
482
1610
  # @param [String] page_token
483
1611
  # Optional. A pagination token returned from a previous call to `ListTagKey`
484
- # that indicates where this listing should continue from. This is currently not
485
- # used by the server.
1612
+ # that indicates where this listing should continue from.
486
1613
  # @param [String] parent
487
1614
  # Required. The resource name of the new TagKey's parent. Must be of the form `
488
1615
  # folders/`folder_id`` or `organizations/`org_id``.
@@ -778,13 +1905,12 @@ module Google
778
1905
 
779
1906
  # Lists all TagValues for a specific TagKey.
780
1907
  # @param [Fixnum] page_size
781
- # Optional. The maximum number of TagValues to return in the response. This is
782
- # currently not used by the server and will return the full page even if a size
783
- # is specified currently.
1908
+ # Optional. The maximum number of TagValues to return in the response. The
1909
+ # server allows a maximum of 300 TagValues to return. If unspecified, the server
1910
+ # will use 100 as the default.
784
1911
  # @param [String] page_token
785
1912
  # Optional. A pagination token returned from a previous call to `ListTagValues`
786
- # that indicates where this listing should continue from. This is currently not
787
- # used by the server.
1913
+ # that indicates where this listing should continue from.
788
1914
  # @param [String] parent
789
1915
  # Required. Resource name for TagKey, parent of the TagValues to be listed, in
790
1916
  # the format `tagKeys/123`.