google-apis-managedidentities_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,760 @@
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 ManagedidentitiesV1
23
+ # Managed Service for Microsoft Active Directory API
24
+ #
25
+ # The Managed Service for Microsoft Active Directory API is used for managing a
26
+ # highly available, hardened service running Microsoft Active Directory (AD).
27
+ #
28
+ # @example
29
+ # require 'google/apis/managedidentities_v1'
30
+ #
31
+ # Managedidentities = Google::Apis::ManagedidentitiesV1 # Alias the module
32
+ # service = Managedidentities::ManagedServiceforMicrosoftActiveDirectoryConsumerAPIService.new
33
+ #
34
+ # @see https://cloud.google.com/managed-microsoft-ad/
35
+ class ManagedServiceforMicrosoftActiveDirectoryConsumerAPIService < 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://managedidentities.googleapis.com/', '',
48
+ client_name: 'google-apis-managedidentities_v1',
49
+ client_version: Google::Apis::ManagedidentitiesV1::GEM_VERSION)
50
+ @batch_path = 'batch'
51
+ end
52
+
53
+ # Gets information about a location.
54
+ # @param [String] name
55
+ # Resource name for the location.
56
+ # @param [String] fields
57
+ # Selector specifying which fields to include in a partial response.
58
+ # @param [String] quota_user
59
+ # Available to use for quota purposes for server-side applications. Can be any
60
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
61
+ # @param [Google::Apis::RequestOptions] options
62
+ # Request-specific options
63
+ #
64
+ # @yield [result, err] Result & error if block supplied
65
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Location] parsed result object
66
+ # @yieldparam err [StandardError] error object if request failed
67
+ #
68
+ # @return [Google::Apis::ManagedidentitiesV1::Location]
69
+ #
70
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
71
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
72
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
73
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
74
+ command = make_simple_command(:get, 'v1/{+name}', options)
75
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Location::Representation
76
+ command.response_class = Google::Apis::ManagedidentitiesV1::Location
77
+ command.params['name'] = name unless name.nil?
78
+ command.query['fields'] = fields unless fields.nil?
79
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
80
+ execute_or_queue_command(command, &block)
81
+ end
82
+
83
+ # Lists information about the supported locations for this service.
84
+ # @param [String] name
85
+ # The resource that owns the locations collection, if applicable.
86
+ # @param [String] filter
87
+ # The standard list filter.
88
+ # @param [Fixnum] page_size
89
+ # The standard list page size.
90
+ # @param [String] page_token
91
+ # The standard list page token.
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::ManagedidentitiesV1::ListLocationsResponse] parsed result object
102
+ # @yieldparam err [StandardError] error object if request failed
103
+ #
104
+ # @return [Google::Apis::ManagedidentitiesV1::ListLocationsResponse]
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 list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
110
+ command = make_simple_command(:get, 'v1/{+name}/locations', options)
111
+ command.response_representation = Google::Apis::ManagedidentitiesV1::ListLocationsResponse::Representation
112
+ command.response_class = Google::Apis::ManagedidentitiesV1::ListLocationsResponse
113
+ command.params['name'] = name unless name.nil?
114
+ command.query['filter'] = filter unless filter.nil?
115
+ command.query['pageSize'] = page_size unless page_size.nil?
116
+ command.query['pageToken'] = page_token unless page_token.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Adds an AD trust to a domain.
123
+ # @param [String] name
124
+ # Required. The resource domain name, project name and location using the form: `
125
+ # projects/`project_id`/locations/global/domains/`domain_name``
126
+ # @param [Google::Apis::ManagedidentitiesV1::AttachTrustRequest] attach_trust_request_object
127
+ # @param [String] fields
128
+ # Selector specifying which fields to include in a partial response.
129
+ # @param [String] quota_user
130
+ # Available to use for quota purposes for server-side applications. Can be any
131
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
132
+ # @param [Google::Apis::RequestOptions] options
133
+ # Request-specific options
134
+ #
135
+ # @yield [result, err] Result & error if block supplied
136
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Operation] parsed result object
137
+ # @yieldparam err [StandardError] error object if request failed
138
+ #
139
+ # @return [Google::Apis::ManagedidentitiesV1::Operation]
140
+ #
141
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
142
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
143
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
144
+ def attach_domain_trust(name, attach_trust_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
145
+ command = make_simple_command(:post, 'v1/{+name}:attachTrust', options)
146
+ command.request_representation = Google::Apis::ManagedidentitiesV1::AttachTrustRequest::Representation
147
+ command.request_object = attach_trust_request_object
148
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Operation::Representation
149
+ command.response_class = Google::Apis::ManagedidentitiesV1::Operation
150
+ command.params['name'] = name unless name.nil?
151
+ command.query['fields'] = fields unless fields.nil?
152
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
153
+ execute_or_queue_command(command, &block)
154
+ end
155
+
156
+ # Creates a Microsoft AD domain.
157
+ # @param [String] parent
158
+ # Required. The resource project name and location using the form: `projects/`
159
+ # project_id`/locations/global`
160
+ # @param [Google::Apis::ManagedidentitiesV1::Domain] domain_object
161
+ # @param [String] domain_name
162
+ # Required. The fully qualified domain name. e.g. mydomain.myorganization.com,
163
+ # with the following restrictions: * Must contain only lowercase letters,
164
+ # numbers, periods and hyphens. * Must start with a letter. * Must contain
165
+ # between 2-64 characters. * Must end with a number or a letter. * Must not
166
+ # start with period. * First segement length (mydomain form example above)
167
+ # shouldn't exceed 15 chars. * The last segment cannot be fully numeric. * Must
168
+ # be unique within the customer project.
169
+ # @param [String] fields
170
+ # Selector specifying which fields to include in a partial response.
171
+ # @param [String] quota_user
172
+ # Available to use for quota purposes for server-side applications. Can be any
173
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
174
+ # @param [Google::Apis::RequestOptions] options
175
+ # Request-specific options
176
+ #
177
+ # @yield [result, err] Result & error if block supplied
178
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Operation] parsed result object
179
+ # @yieldparam err [StandardError] error object if request failed
180
+ #
181
+ # @return [Google::Apis::ManagedidentitiesV1::Operation]
182
+ #
183
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
184
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
185
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
186
+ def create_project_location_global_domain(parent, domain_object = nil, domain_name: nil, fields: nil, quota_user: nil, options: nil, &block)
187
+ command = make_simple_command(:post, 'v1/{+parent}/domains', options)
188
+ command.request_representation = Google::Apis::ManagedidentitiesV1::Domain::Representation
189
+ command.request_object = domain_object
190
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Operation::Representation
191
+ command.response_class = Google::Apis::ManagedidentitiesV1::Operation
192
+ command.params['parent'] = parent unless parent.nil?
193
+ command.query['domainName'] = domain_name unless domain_name.nil?
194
+ command.query['fields'] = fields unless fields.nil?
195
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
196
+ execute_or_queue_command(command, &block)
197
+ end
198
+
199
+ # Deletes a domain.
200
+ # @param [String] name
201
+ # Required. The domain resource name using the form: `projects/`project_id`/
202
+ # locations/global/domains/`domain_name``
203
+ # @param [String] fields
204
+ # Selector specifying which fields to include in a partial response.
205
+ # @param [String] quota_user
206
+ # Available to use for quota purposes for server-side applications. Can be any
207
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
208
+ # @param [Google::Apis::RequestOptions] options
209
+ # Request-specific options
210
+ #
211
+ # @yield [result, err] Result & error if block supplied
212
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Operation] parsed result object
213
+ # @yieldparam err [StandardError] error object if request failed
214
+ #
215
+ # @return [Google::Apis::ManagedidentitiesV1::Operation]
216
+ #
217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
220
+ def delete_project_location_global_domain(name, fields: nil, quota_user: nil, options: nil, &block)
221
+ command = make_simple_command(:delete, 'v1/{+name}', options)
222
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Operation::Representation
223
+ command.response_class = Google::Apis::ManagedidentitiesV1::Operation
224
+ command.params['name'] = name unless name.nil?
225
+ command.query['fields'] = fields unless fields.nil?
226
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
227
+ execute_or_queue_command(command, &block)
228
+ end
229
+
230
+ # Removes an AD trust.
231
+ # @param [String] name
232
+ # Required. The resource domain name, project name, and location using the form:
233
+ # `projects/`project_id`/locations/global/domains/`domain_name``
234
+ # @param [Google::Apis::ManagedidentitiesV1::DetachTrustRequest] detach_trust_request_object
235
+ # @param [String] fields
236
+ # Selector specifying which fields to include in a partial response.
237
+ # @param [String] quota_user
238
+ # Available to use for quota purposes for server-side applications. Can be any
239
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
240
+ # @param [Google::Apis::RequestOptions] options
241
+ # Request-specific options
242
+ #
243
+ # @yield [result, err] Result & error if block supplied
244
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Operation] parsed result object
245
+ # @yieldparam err [StandardError] error object if request failed
246
+ #
247
+ # @return [Google::Apis::ManagedidentitiesV1::Operation]
248
+ #
249
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
250
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
251
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
252
+ def detach_domain_trust(name, detach_trust_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
253
+ command = make_simple_command(:post, 'v1/{+name}:detachTrust', options)
254
+ command.request_representation = Google::Apis::ManagedidentitiesV1::DetachTrustRequest::Representation
255
+ command.request_object = detach_trust_request_object
256
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Operation::Representation
257
+ command.response_class = Google::Apis::ManagedidentitiesV1::Operation
258
+ command.params['name'] = name unless name.nil?
259
+ command.query['fields'] = fields unless fields.nil?
260
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
261
+ execute_or_queue_command(command, &block)
262
+ end
263
+
264
+ # Gets information about a domain.
265
+ # @param [String] name
266
+ # Required. The domain resource name using the form: `projects/`project_id`/
267
+ # locations/global/domains/`domain_name``
268
+ # @param [String] fields
269
+ # Selector specifying which fields to include in a partial response.
270
+ # @param [String] quota_user
271
+ # Available to use for quota purposes for server-side applications. Can be any
272
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
273
+ # @param [Google::Apis::RequestOptions] options
274
+ # Request-specific options
275
+ #
276
+ # @yield [result, err] Result & error if block supplied
277
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Domain] parsed result object
278
+ # @yieldparam err [StandardError] error object if request failed
279
+ #
280
+ # @return [Google::Apis::ManagedidentitiesV1::Domain]
281
+ #
282
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
283
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
284
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
285
+ def get_project_location_global_domain(name, fields: nil, quota_user: nil, options: nil, &block)
286
+ command = make_simple_command(:get, 'v1/{+name}', options)
287
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Domain::Representation
288
+ command.response_class = Google::Apis::ManagedidentitiesV1::Domain
289
+ command.params['name'] = name unless name.nil?
290
+ command.query['fields'] = fields unless fields.nil?
291
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
292
+ execute_or_queue_command(command, &block)
293
+ end
294
+
295
+ # Gets the access control policy for a resource. Returns an empty policy if the
296
+ # resource exists and does not have a policy set.
297
+ # @param [String] resource
298
+ # REQUIRED: The resource for which the policy is being requested. See the
299
+ # operation documentation for the appropriate value for this field.
300
+ # @param [Fixnum] options_requested_policy_version
301
+ # Optional. The policy format version to be returned. Valid values are 0, 1, and
302
+ # 3. Requests specifying an invalid value will be rejected. Requests for
303
+ # policies with any conditional bindings must specify version 3. Policies
304
+ # without any conditional bindings may specify any valid value or leave the
305
+ # field unset. To learn which resources support conditions in their IAM policies,
306
+ # see the [IAM documentation](https://cloud.google.com/iam/help/conditions/
307
+ # resource-policies).
308
+ # @param [String] fields
309
+ # Selector specifying which fields to include in a partial response.
310
+ # @param [String] quota_user
311
+ # Available to use for quota purposes for server-side applications. Can be any
312
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
313
+ # @param [Google::Apis::RequestOptions] options
314
+ # Request-specific options
315
+ #
316
+ # @yield [result, err] Result & error if block supplied
317
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Policy] parsed result object
318
+ # @yieldparam err [StandardError] error object if request failed
319
+ #
320
+ # @return [Google::Apis::ManagedidentitiesV1::Policy]
321
+ #
322
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
323
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
324
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
325
+ def get_project_location_global_domain_iam_policy(resource, options_requested_policy_version: nil, fields: nil, quota_user: nil, options: nil, &block)
326
+ command = make_simple_command(:get, 'v1/{+resource}:getIamPolicy', options)
327
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Policy::Representation
328
+ command.response_class = Google::Apis::ManagedidentitiesV1::Policy
329
+ command.params['resource'] = resource unless resource.nil?
330
+ command.query['options.requestedPolicyVersion'] = options_requested_policy_version unless options_requested_policy_version.nil?
331
+ command.query['fields'] = fields unless fields.nil?
332
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
333
+ execute_or_queue_command(command, &block)
334
+ end
335
+
336
+ # Lists domains in a project.
337
+ # @param [String] parent
338
+ # Required. The resource name of the domain location using the form: `projects/`
339
+ # project_id`/locations/global`
340
+ # @param [String] filter
341
+ # Optional. A filter specifying constraints of a list operation. For example, `
342
+ # Domain.fqdn="mydomain.myorginization"`.
343
+ # @param [String] order_by
344
+ # Optional. Specifies the ordering of results. See [Sorting order](https://cloud.
345
+ # google.com/apis/design/design_patterns#sorting_order) for more information.
346
+ # @param [Fixnum] page_size
347
+ # Optional. The maximum number of items to return. If not specified, a default
348
+ # value of 1000 will be used. Regardless of the page_size value, the response
349
+ # may include a partial list. Callers should rely on a response's
350
+ # next_page_token to determine if there are additional results to list.
351
+ # @param [String] page_token
352
+ # Optional. The `next_page_token` value returned from a previous
353
+ # ListDomainsRequest request, if any.
354
+ # @param [String] fields
355
+ # Selector specifying which fields to include in a partial response.
356
+ # @param [String] quota_user
357
+ # Available to use for quota purposes for server-side applications. Can be any
358
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
359
+ # @param [Google::Apis::RequestOptions] options
360
+ # Request-specific options
361
+ #
362
+ # @yield [result, err] Result & error if block supplied
363
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::ListDomainsResponse] parsed result object
364
+ # @yieldparam err [StandardError] error object if request failed
365
+ #
366
+ # @return [Google::Apis::ManagedidentitiesV1::ListDomainsResponse]
367
+ #
368
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
369
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
370
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
371
+ def list_project_location_global_domains(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
372
+ command = make_simple_command(:get, 'v1/{+parent}/domains', options)
373
+ command.response_representation = Google::Apis::ManagedidentitiesV1::ListDomainsResponse::Representation
374
+ command.response_class = Google::Apis::ManagedidentitiesV1::ListDomainsResponse
375
+ command.params['parent'] = parent unless parent.nil?
376
+ command.query['filter'] = filter unless filter.nil?
377
+ command.query['orderBy'] = order_by unless order_by.nil?
378
+ command.query['pageSize'] = page_size unless page_size.nil?
379
+ command.query['pageToken'] = page_token unless page_token.nil?
380
+ command.query['fields'] = fields unless fields.nil?
381
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
382
+ execute_or_queue_command(command, &block)
383
+ end
384
+
385
+ # Updates the metadata and configuration of a domain.
386
+ # @param [String] name
387
+ # Required. The unique name of the domain using the form: `projects/`project_id`/
388
+ # locations/global/domains/`domain_name``.
389
+ # @param [Google::Apis::ManagedidentitiesV1::Domain] domain_object
390
+ # @param [String] update_mask
391
+ # Required. Mask of fields to update. At least one path must be supplied in this
392
+ # field. The elements of the repeated paths field may only include fields from
393
+ # Domain: * `labels` * `locations` * `authorized_networks`
394
+ # @param [String] fields
395
+ # Selector specifying which fields to include in a partial response.
396
+ # @param [String] quota_user
397
+ # Available to use for quota purposes for server-side applications. Can be any
398
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
399
+ # @param [Google::Apis::RequestOptions] options
400
+ # Request-specific options
401
+ #
402
+ # @yield [result, err] Result & error if block supplied
403
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Operation] parsed result object
404
+ # @yieldparam err [StandardError] error object if request failed
405
+ #
406
+ # @return [Google::Apis::ManagedidentitiesV1::Operation]
407
+ #
408
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
409
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
410
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
411
+ def patch_project_location_global_domain(name, domain_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
412
+ command = make_simple_command(:patch, 'v1/{+name}', options)
413
+ command.request_representation = Google::Apis::ManagedidentitiesV1::Domain::Representation
414
+ command.request_object = domain_object
415
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Operation::Representation
416
+ command.response_class = Google::Apis::ManagedidentitiesV1::Operation
417
+ command.params['name'] = name unless name.nil?
418
+ command.query['updateMask'] = update_mask unless update_mask.nil?
419
+ command.query['fields'] = fields unless fields.nil?
420
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
421
+ execute_or_queue_command(command, &block)
422
+ end
423
+
424
+ # Updates the DNS conditional forwarder.
425
+ # @param [String] name
426
+ # Required. The resource domain name, project name and location using the form: `
427
+ # projects/`project_id`/locations/global/domains/`domain_name``
428
+ # @param [Google::Apis::ManagedidentitiesV1::ReconfigureTrustRequest] reconfigure_trust_request_object
429
+ # @param [String] fields
430
+ # Selector specifying which fields to include in a partial response.
431
+ # @param [String] quota_user
432
+ # Available to use for quota purposes for server-side applications. Can be any
433
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
434
+ # @param [Google::Apis::RequestOptions] options
435
+ # Request-specific options
436
+ #
437
+ # @yield [result, err] Result & error if block supplied
438
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Operation] parsed result object
439
+ # @yieldparam err [StandardError] error object if request failed
440
+ #
441
+ # @return [Google::Apis::ManagedidentitiesV1::Operation]
442
+ #
443
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
444
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
445
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
446
+ def reconfigure_domain_trust(name, reconfigure_trust_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
447
+ command = make_simple_command(:post, 'v1/{+name}:reconfigureTrust', options)
448
+ command.request_representation = Google::Apis::ManagedidentitiesV1::ReconfigureTrustRequest::Representation
449
+ command.request_object = reconfigure_trust_request_object
450
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Operation::Representation
451
+ command.response_class = Google::Apis::ManagedidentitiesV1::Operation
452
+ command.params['name'] = name unless name.nil?
453
+ command.query['fields'] = fields unless fields.nil?
454
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
455
+ execute_or_queue_command(command, &block)
456
+ end
457
+
458
+ # Resets a domain's administrator password.
459
+ # @param [String] name
460
+ # Required. The domain resource name using the form: `projects/`project_id`/
461
+ # locations/global/domains/`domain_name``
462
+ # @param [Google::Apis::ManagedidentitiesV1::ResetAdminPasswordRequest] reset_admin_password_request_object
463
+ # @param [String] fields
464
+ # Selector specifying which fields to include in a partial response.
465
+ # @param [String] quota_user
466
+ # Available to use for quota purposes for server-side applications. Can be any
467
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
468
+ # @param [Google::Apis::RequestOptions] options
469
+ # Request-specific options
470
+ #
471
+ # @yield [result, err] Result & error if block supplied
472
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::ResetAdminPasswordResponse] parsed result object
473
+ # @yieldparam err [StandardError] error object if request failed
474
+ #
475
+ # @return [Google::Apis::ManagedidentitiesV1::ResetAdminPasswordResponse]
476
+ #
477
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
478
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
479
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
480
+ def reset_domain_admin_password(name, reset_admin_password_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
481
+ command = make_simple_command(:post, 'v1/{+name}:resetAdminPassword', options)
482
+ command.request_representation = Google::Apis::ManagedidentitiesV1::ResetAdminPasswordRequest::Representation
483
+ command.request_object = reset_admin_password_request_object
484
+ command.response_representation = Google::Apis::ManagedidentitiesV1::ResetAdminPasswordResponse::Representation
485
+ command.response_class = Google::Apis::ManagedidentitiesV1::ResetAdminPasswordResponse
486
+ command.params['name'] = name unless name.nil?
487
+ command.query['fields'] = fields unless fields.nil?
488
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
489
+ execute_or_queue_command(command, &block)
490
+ end
491
+
492
+ # Sets the access control policy on the specified resource. Replaces any
493
+ # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `
494
+ # PERMISSION_DENIED` errors.
495
+ # @param [String] resource
496
+ # REQUIRED: The resource for which the policy is being specified. See the
497
+ # operation documentation for the appropriate value for this field.
498
+ # @param [Google::Apis::ManagedidentitiesV1::SetIamPolicyRequest] set_iam_policy_request_object
499
+ # @param [String] fields
500
+ # Selector specifying which fields to include in a partial response.
501
+ # @param [String] quota_user
502
+ # Available to use for quota purposes for server-side applications. Can be any
503
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
504
+ # @param [Google::Apis::RequestOptions] options
505
+ # Request-specific options
506
+ #
507
+ # @yield [result, err] Result & error if block supplied
508
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Policy] parsed result object
509
+ # @yieldparam err [StandardError] error object if request failed
510
+ #
511
+ # @return [Google::Apis::ManagedidentitiesV1::Policy]
512
+ #
513
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
514
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
515
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
516
+ def set_domain_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
517
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
518
+ command.request_representation = Google::Apis::ManagedidentitiesV1::SetIamPolicyRequest::Representation
519
+ command.request_object = set_iam_policy_request_object
520
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Policy::Representation
521
+ command.response_class = Google::Apis::ManagedidentitiesV1::Policy
522
+ command.params['resource'] = resource unless resource.nil?
523
+ command.query['fields'] = fields unless fields.nil?
524
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
525
+ execute_or_queue_command(command, &block)
526
+ end
527
+
528
+ # Returns permissions that a caller has on the specified resource. If the
529
+ # resource does not exist, this will return an empty set of permissions, not a `
530
+ # NOT_FOUND` error. Note: This operation is designed to be used for building
531
+ # permission-aware UIs and command-line tools, not for authorization checking.
532
+ # This operation may "fail open" without warning.
533
+ # @param [String] resource
534
+ # REQUIRED: The resource for which the policy detail is being requested. See the
535
+ # operation documentation for the appropriate value for this field.
536
+ # @param [Google::Apis::ManagedidentitiesV1::TestIamPermissionsRequest] test_iam_permissions_request_object
537
+ # @param [String] fields
538
+ # Selector specifying which fields to include in a partial response.
539
+ # @param [String] quota_user
540
+ # Available to use for quota purposes for server-side applications. Can be any
541
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
542
+ # @param [Google::Apis::RequestOptions] options
543
+ # Request-specific options
544
+ #
545
+ # @yield [result, err] Result & error if block supplied
546
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::TestIamPermissionsResponse] parsed result object
547
+ # @yieldparam err [StandardError] error object if request failed
548
+ #
549
+ # @return [Google::Apis::ManagedidentitiesV1::TestIamPermissionsResponse]
550
+ #
551
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
552
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
553
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
554
+ def test_domain_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
555
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
556
+ command.request_representation = Google::Apis::ManagedidentitiesV1::TestIamPermissionsRequest::Representation
557
+ command.request_object = test_iam_permissions_request_object
558
+ command.response_representation = Google::Apis::ManagedidentitiesV1::TestIamPermissionsResponse::Representation
559
+ command.response_class = Google::Apis::ManagedidentitiesV1::TestIamPermissionsResponse
560
+ command.params['resource'] = resource unless resource.nil?
561
+ command.query['fields'] = fields unless fields.nil?
562
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
563
+ execute_or_queue_command(command, &block)
564
+ end
565
+
566
+ # Validates a trust state, that the target domain is reachable, and that the
567
+ # target domain is able to accept incoming trust requests.
568
+ # @param [String] name
569
+ # Required. The resource domain name, project name, and location using the form:
570
+ # `projects/`project_id`/locations/global/domains/`domain_name``
571
+ # @param [Google::Apis::ManagedidentitiesV1::ValidateTrustRequest] validate_trust_request_object
572
+ # @param [String] fields
573
+ # Selector specifying which fields to include in a partial response.
574
+ # @param [String] quota_user
575
+ # Available to use for quota purposes for server-side applications. Can be any
576
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
577
+ # @param [Google::Apis::RequestOptions] options
578
+ # Request-specific options
579
+ #
580
+ # @yield [result, err] Result & error if block supplied
581
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Operation] parsed result object
582
+ # @yieldparam err [StandardError] error object if request failed
583
+ #
584
+ # @return [Google::Apis::ManagedidentitiesV1::Operation]
585
+ #
586
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
587
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
588
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
589
+ def validate_domain_trust(name, validate_trust_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
590
+ command = make_simple_command(:post, 'v1/{+name}:validateTrust', options)
591
+ command.request_representation = Google::Apis::ManagedidentitiesV1::ValidateTrustRequest::Representation
592
+ command.request_object = validate_trust_request_object
593
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Operation::Representation
594
+ command.response_class = Google::Apis::ManagedidentitiesV1::Operation
595
+ command.params['name'] = name unless name.nil?
596
+ command.query['fields'] = fields unless fields.nil?
597
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
598
+ execute_or_queue_command(command, &block)
599
+ end
600
+
601
+ # Starts asynchronous cancellation on a long-running operation. The server makes
602
+ # a best effort to cancel the operation, but success is not guaranteed. If the
603
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
604
+ # Clients can use Operations.GetOperation or other methods to check whether the
605
+ # cancellation succeeded or whether the operation completed despite cancellation.
606
+ # On successful cancellation, the operation is not deleted; instead, it becomes
607
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
608
+ # corresponding to `Code.CANCELLED`.
609
+ # @param [String] name
610
+ # The name of the operation resource to be cancelled.
611
+ # @param [Google::Apis::ManagedidentitiesV1::CancelOperationRequest] cancel_operation_request_object
612
+ # @param [String] fields
613
+ # Selector specifying which fields to include in a partial response.
614
+ # @param [String] quota_user
615
+ # Available to use for quota purposes for server-side applications. Can be any
616
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
617
+ # @param [Google::Apis::RequestOptions] options
618
+ # Request-specific options
619
+ #
620
+ # @yield [result, err] Result & error if block supplied
621
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Empty] parsed result object
622
+ # @yieldparam err [StandardError] error object if request failed
623
+ #
624
+ # @return [Google::Apis::ManagedidentitiesV1::Empty]
625
+ #
626
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
627
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
628
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
629
+ def cancel_operation(name, cancel_operation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
630
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
631
+ command.request_representation = Google::Apis::ManagedidentitiesV1::CancelOperationRequest::Representation
632
+ command.request_object = cancel_operation_request_object
633
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Empty::Representation
634
+ command.response_class = Google::Apis::ManagedidentitiesV1::Empty
635
+ command.params['name'] = name unless name.nil?
636
+ command.query['fields'] = fields unless fields.nil?
637
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
638
+ execute_or_queue_command(command, &block)
639
+ end
640
+
641
+ # Deletes a long-running operation. This method indicates that the client is no
642
+ # longer interested in the operation result. It does not cancel the operation.
643
+ # If the server doesn't support this method, it returns `google.rpc.Code.
644
+ # UNIMPLEMENTED`.
645
+ # @param [String] name
646
+ # The name of the operation resource to be deleted.
647
+ # @param [String] fields
648
+ # Selector specifying which fields to include in a partial response.
649
+ # @param [String] quota_user
650
+ # Available to use for quota purposes for server-side applications. Can be any
651
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
652
+ # @param [Google::Apis::RequestOptions] options
653
+ # Request-specific options
654
+ #
655
+ # @yield [result, err] Result & error if block supplied
656
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Empty] parsed result object
657
+ # @yieldparam err [StandardError] error object if request failed
658
+ #
659
+ # @return [Google::Apis::ManagedidentitiesV1::Empty]
660
+ #
661
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
662
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
663
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
664
+ def delete_project_location_global_operation(name, fields: nil, quota_user: nil, options: nil, &block)
665
+ command = make_simple_command(:delete, 'v1/{+name}', options)
666
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Empty::Representation
667
+ command.response_class = Google::Apis::ManagedidentitiesV1::Empty
668
+ command.params['name'] = name unless name.nil?
669
+ command.query['fields'] = fields unless fields.nil?
670
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
671
+ execute_or_queue_command(command, &block)
672
+ end
673
+
674
+ # Gets the latest state of a long-running operation. Clients can use this method
675
+ # to poll the operation result at intervals as recommended by the API service.
676
+ # @param [String] name
677
+ # The name of the operation resource.
678
+ # @param [String] fields
679
+ # Selector specifying which fields to include in a partial response.
680
+ # @param [String] quota_user
681
+ # Available to use for quota purposes for server-side applications. Can be any
682
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
683
+ # @param [Google::Apis::RequestOptions] options
684
+ # Request-specific options
685
+ #
686
+ # @yield [result, err] Result & error if block supplied
687
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::Operation] parsed result object
688
+ # @yieldparam err [StandardError] error object if request failed
689
+ #
690
+ # @return [Google::Apis::ManagedidentitiesV1::Operation]
691
+ #
692
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
693
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
694
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
695
+ def get_project_location_global_operation(name, fields: nil, quota_user: nil, options: nil, &block)
696
+ command = make_simple_command(:get, 'v1/{+name}', options)
697
+ command.response_representation = Google::Apis::ManagedidentitiesV1::Operation::Representation
698
+ command.response_class = Google::Apis::ManagedidentitiesV1::Operation
699
+ command.params['name'] = name unless name.nil?
700
+ command.query['fields'] = fields unless fields.nil?
701
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
702
+ execute_or_queue_command(command, &block)
703
+ end
704
+
705
+ # Lists operations that match the specified filter in the request. If the server
706
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
707
+ # binding allows API services to override the binding to use different resource
708
+ # name schemes, such as `users/*/operations`. To override the binding, API
709
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
710
+ # service configuration. For backwards compatibility, the default name includes
711
+ # the operations collection id, however overriding users must ensure the name
712
+ # binding is the parent resource, without the operations collection id.
713
+ # @param [String] name
714
+ # The name of the operation's parent resource.
715
+ # @param [String] filter
716
+ # The standard list filter.
717
+ # @param [Fixnum] page_size
718
+ # The standard list page size.
719
+ # @param [String] page_token
720
+ # The standard list page token.
721
+ # @param [String] fields
722
+ # Selector specifying which fields to include in a partial response.
723
+ # @param [String] quota_user
724
+ # Available to use for quota purposes for server-side applications. Can be any
725
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
726
+ # @param [Google::Apis::RequestOptions] options
727
+ # Request-specific options
728
+ #
729
+ # @yield [result, err] Result & error if block supplied
730
+ # @yieldparam result [Google::Apis::ManagedidentitiesV1::ListOperationsResponse] parsed result object
731
+ # @yieldparam err [StandardError] error object if request failed
732
+ #
733
+ # @return [Google::Apis::ManagedidentitiesV1::ListOperationsResponse]
734
+ #
735
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
736
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
737
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
738
+ def list_project_location_global_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
739
+ command = make_simple_command(:get, 'v1/{+name}', options)
740
+ command.response_representation = Google::Apis::ManagedidentitiesV1::ListOperationsResponse::Representation
741
+ command.response_class = Google::Apis::ManagedidentitiesV1::ListOperationsResponse
742
+ command.params['name'] = name unless name.nil?
743
+ command.query['filter'] = filter unless filter.nil?
744
+ command.query['pageSize'] = page_size unless page_size.nil?
745
+ command.query['pageToken'] = page_token unless page_token.nil?
746
+ command.query['fields'] = fields unless fields.nil?
747
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
748
+ execute_or_queue_command(command, &block)
749
+ end
750
+
751
+ protected
752
+
753
+ def apply_command_defaults(command)
754
+ command.query['key'] = key unless key.nil?
755
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
756
+ end
757
+ end
758
+ end
759
+ end
760
+ end