google-apis-alloydb_v1beta 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1671 @@
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 AlloydbV1beta
23
+ # AlloyDB API
24
+ #
25
+ # AlloyDB for PostgreSQL is an open source-compatible database service that
26
+ # provides a powerful option for migrating, modernizing, or building commercial-
27
+ # grade applications. It offers full compatibility with standard PostgreSQL, and
28
+ # is more than 4x faster for transactional workloads and up to 100x faster for
29
+ # analytical queries than standard PostgreSQL in our performance tests. AlloyDB
30
+ # for PostgreSQL offers a 99.99 percent availability SLA inclusive of
31
+ # maintenance. AlloyDB is optimized for the most demanding use cases, allowing
32
+ # you to build new applications that require high transaction throughput, large
33
+ # database sizes, or multiple read resources; scale existing PostgreSQL
34
+ # workloads with no application changes; and modernize legacy proprietary
35
+ # databases.
36
+ #
37
+ # @example
38
+ # require 'google/apis/alloydb_v1beta'
39
+ #
40
+ # Alloydb = Google::Apis::AlloydbV1beta # Alias the module
41
+ # service = Alloydb::CloudAlloyDBAdminService.new
42
+ #
43
+ # @see https://cloud.google.com/alloydb/
44
+ class CloudAlloyDBAdminService < Google::Apis::Core::BaseService
45
+ # @return [String]
46
+ # API key. Your API key identifies your project and provides you with API access,
47
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
48
+ attr_accessor :key
49
+
50
+ # @return [String]
51
+ # Available to use for quota purposes for server-side applications. Can be any
52
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
53
+ attr_accessor :quota_user
54
+
55
+ def initialize
56
+ super('https://alloydb.googleapis.com/', '',
57
+ client_name: 'google-apis-alloydb_v1beta',
58
+ client_version: Google::Apis::AlloydbV1beta::GEM_VERSION)
59
+ @batch_path = 'batch'
60
+ end
61
+
62
+ # Gets information about a location.
63
+ # @param [String] name
64
+ # Resource name for the location.
65
+ # @param [String] fields
66
+ # Selector specifying which fields to include in a partial response.
67
+ # @param [String] quota_user
68
+ # Available to use for quota purposes for server-side applications. Can be any
69
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
70
+ # @param [Google::Apis::RequestOptions] options
71
+ # Request-specific options
72
+ #
73
+ # @yield [result, err] Result & error if block supplied
74
+ # @yieldparam result [Google::Apis::AlloydbV1beta::GoogleCloudLocationLocation] parsed result object
75
+ # @yieldparam err [StandardError] error object if request failed
76
+ #
77
+ # @return [Google::Apis::AlloydbV1beta::GoogleCloudLocationLocation]
78
+ #
79
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
80
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
81
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
82
+ def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
83
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
84
+ command.response_representation = Google::Apis::AlloydbV1beta::GoogleCloudLocationLocation::Representation
85
+ command.response_class = Google::Apis::AlloydbV1beta::GoogleCloudLocationLocation
86
+ command.params['name'] = name unless name.nil?
87
+ command.query['fields'] = fields unless fields.nil?
88
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
89
+ execute_or_queue_command(command, &block)
90
+ end
91
+
92
+ # Lists information about the supported locations for this service.
93
+ # @param [String] name
94
+ # The resource that owns the locations collection, if applicable.
95
+ # @param [String] filter
96
+ # A filter to narrow down results to a preferred subset. The filtering language
97
+ # accepts strings like `"displayName=tokyo"`, and is documented in more detail
98
+ # in [AIP-160](https://google.aip.dev/160).
99
+ # @param [Fixnum] page_size
100
+ # The maximum number of results to return. If not set, the service selects a
101
+ # default.
102
+ # @param [String] page_token
103
+ # A page token received from the `next_page_token` field in the response. Send
104
+ # that page token to receive the subsequent page.
105
+ # @param [String] fields
106
+ # Selector specifying which fields to include in a partial response.
107
+ # @param [String] quota_user
108
+ # Available to use for quota purposes for server-side applications. Can be any
109
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
110
+ # @param [Google::Apis::RequestOptions] options
111
+ # Request-specific options
112
+ #
113
+ # @yield [result, err] Result & error if block supplied
114
+ # @yieldparam result [Google::Apis::AlloydbV1beta::GoogleCloudLocationListLocationsResponse] parsed result object
115
+ # @yieldparam err [StandardError] error object if request failed
116
+ #
117
+ # @return [Google::Apis::AlloydbV1beta::GoogleCloudLocationListLocationsResponse]
118
+ #
119
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
120
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
121
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
122
+ def list_project_locations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
123
+ command = make_simple_command(:get, 'v1beta/{+name}/locations', options)
124
+ command.response_representation = Google::Apis::AlloydbV1beta::GoogleCloudLocationListLocationsResponse::Representation
125
+ command.response_class = Google::Apis::AlloydbV1beta::GoogleCloudLocationListLocationsResponse
126
+ command.params['name'] = name unless name.nil?
127
+ command.query['filter'] = filter unless filter.nil?
128
+ command.query['pageSize'] = page_size unless page_size.nil?
129
+ command.query['pageToken'] = page_token unless page_token.nil?
130
+ command.query['fields'] = fields unless fields.nil?
131
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
132
+ execute_or_queue_command(command, &block)
133
+ end
134
+
135
+ # Creates a new Backup in a given project and location.
136
+ # @param [String] parent
137
+ # Required. Value for parent.
138
+ # @param [Google::Apis::AlloydbV1beta::Backup] backup_object
139
+ # @param [String] backup_id
140
+ # Required. ID of the requesting object.
141
+ # @param [String] request_id
142
+ # Optional. An optional request ID to identify requests. Specify a unique
143
+ # request ID so that if you must retry your request, the server will know to
144
+ # ignore the request if it has already been completed. The server will guarantee
145
+ # that for at least 60 minutes since the first request. For example, consider a
146
+ # situation where you make an initial request and the request times out. If you
147
+ # make the request again with the same request ID, the server can check if
148
+ # original operation with the same request ID was received, and if so, will
149
+ # ignore the second request. This prevents clients from accidentally creating
150
+ # duplicate commitments. The request ID must be a valid UUID with the exception
151
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
152
+ # @param [Boolean] validate_only
153
+ # Optional. If set, the backend validates the request, but doesn't actually
154
+ # execute it.
155
+ # @param [String] fields
156
+ # Selector specifying which fields to include in a partial response.
157
+ # @param [String] quota_user
158
+ # Available to use for quota purposes for server-side applications. Can be any
159
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
160
+ # @param [Google::Apis::RequestOptions] options
161
+ # Request-specific options
162
+ #
163
+ # @yield [result, err] Result & error if block supplied
164
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
165
+ # @yieldparam err [StandardError] error object if request failed
166
+ #
167
+ # @return [Google::Apis::AlloydbV1beta::Operation]
168
+ #
169
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
170
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
171
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
172
+ def create_project_location_backup(parent, backup_object = nil, backup_id: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
173
+ command = make_simple_command(:post, 'v1beta/{+parent}/backups', options)
174
+ command.request_representation = Google::Apis::AlloydbV1beta::Backup::Representation
175
+ command.request_object = backup_object
176
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
177
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
178
+ command.params['parent'] = parent unless parent.nil?
179
+ command.query['backupId'] = backup_id unless backup_id.nil?
180
+ command.query['requestId'] = request_id unless request_id.nil?
181
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
182
+ command.query['fields'] = fields unless fields.nil?
183
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
184
+ execute_or_queue_command(command, &block)
185
+ end
186
+
187
+ # Deletes a single Backup.
188
+ # @param [String] name
189
+ # Required. Name of the resource. For the required format, see the comment on
190
+ # the Backup.name field.
191
+ # @param [String] etag
192
+ # Optional. The current etag of the Backup. If an etag is provided and does not
193
+ # match the current etag of the Backup, deletion will be blocked and an ABORTED
194
+ # error will be returned.
195
+ # @param [String] request_id
196
+ # Optional. An optional request ID to identify requests. Specify a unique
197
+ # request ID so that if you must retry your request, the server will know to
198
+ # ignore the request if it has already been completed. The server will guarantee
199
+ # that for at least 60 minutes after the first request. For example, consider a
200
+ # situation where you make an initial request and the request times out. If you
201
+ # make the request again with the same request ID, the server can check if
202
+ # original operation with the same request ID was received, and if so, will
203
+ # ignore the second request. This prevents clients from accidentally creating
204
+ # duplicate commitments. The request ID must be a valid UUID with the exception
205
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
206
+ # @param [Boolean] validate_only
207
+ # Optional. If set, the backend validates the request, but doesn't actually
208
+ # execute it.
209
+ # @param [String] fields
210
+ # Selector specifying which fields to include in a partial response.
211
+ # @param [String] quota_user
212
+ # Available to use for quota purposes for server-side applications. Can be any
213
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
214
+ # @param [Google::Apis::RequestOptions] options
215
+ # Request-specific options
216
+ #
217
+ # @yield [result, err] Result & error if block supplied
218
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
219
+ # @yieldparam err [StandardError] error object if request failed
220
+ #
221
+ # @return [Google::Apis::AlloydbV1beta::Operation]
222
+ #
223
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
224
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
225
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
226
+ def delete_project_location_backup(name, etag: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
227
+ command = make_simple_command(:delete, 'v1beta/{+name}', options)
228
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
229
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
230
+ command.params['name'] = name unless name.nil?
231
+ command.query['etag'] = etag unless etag.nil?
232
+ command.query['requestId'] = request_id unless request_id.nil?
233
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
234
+ command.query['fields'] = fields unless fields.nil?
235
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
236
+ execute_or_queue_command(command, &block)
237
+ end
238
+
239
+ # Gets details of a single Backup.
240
+ # @param [String] name
241
+ # Required. Name of the resource
242
+ # @param [String] fields
243
+ # Selector specifying which fields to include in a partial response.
244
+ # @param [String] quota_user
245
+ # Available to use for quota purposes for server-side applications. Can be any
246
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
247
+ # @param [Google::Apis::RequestOptions] options
248
+ # Request-specific options
249
+ #
250
+ # @yield [result, err] Result & error if block supplied
251
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Backup] parsed result object
252
+ # @yieldparam err [StandardError] error object if request failed
253
+ #
254
+ # @return [Google::Apis::AlloydbV1beta::Backup]
255
+ #
256
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
257
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
258
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
259
+ def get_project_location_backup(name, fields: nil, quota_user: nil, options: nil, &block)
260
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
261
+ command.response_representation = Google::Apis::AlloydbV1beta::Backup::Representation
262
+ command.response_class = Google::Apis::AlloydbV1beta::Backup
263
+ command.params['name'] = name unless name.nil?
264
+ command.query['fields'] = fields unless fields.nil?
265
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
266
+ execute_or_queue_command(command, &block)
267
+ end
268
+
269
+ # Lists Backups in a given project and location.
270
+ # @param [String] parent
271
+ # Required. Parent value for ListBackupsRequest
272
+ # @param [String] filter
273
+ # Filtering results
274
+ # @param [String] order_by
275
+ # Hint for how to order the results
276
+ # @param [Fixnum] page_size
277
+ # Requested page size. Server may return fewer items than requested. If
278
+ # unspecified, server will pick an appropriate default.
279
+ # @param [String] page_token
280
+ # A token identifying a page of results the server should return.
281
+ # @param [String] fields
282
+ # Selector specifying which fields to include in a partial response.
283
+ # @param [String] quota_user
284
+ # Available to use for quota purposes for server-side applications. Can be any
285
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
286
+ # @param [Google::Apis::RequestOptions] options
287
+ # Request-specific options
288
+ #
289
+ # @yield [result, err] Result & error if block supplied
290
+ # @yieldparam result [Google::Apis::AlloydbV1beta::ListBackupsResponse] parsed result object
291
+ # @yieldparam err [StandardError] error object if request failed
292
+ #
293
+ # @return [Google::Apis::AlloydbV1beta::ListBackupsResponse]
294
+ #
295
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
296
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
297
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
298
+ def list_project_location_backups(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
299
+ command = make_simple_command(:get, 'v1beta/{+parent}/backups', options)
300
+ command.response_representation = Google::Apis::AlloydbV1beta::ListBackupsResponse::Representation
301
+ command.response_class = Google::Apis::AlloydbV1beta::ListBackupsResponse
302
+ command.params['parent'] = parent unless parent.nil?
303
+ command.query['filter'] = filter unless filter.nil?
304
+ command.query['orderBy'] = order_by unless order_by.nil?
305
+ command.query['pageSize'] = page_size unless page_size.nil?
306
+ command.query['pageToken'] = page_token unless page_token.nil?
307
+ command.query['fields'] = fields unless fields.nil?
308
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
309
+ execute_or_queue_command(command, &block)
310
+ end
311
+
312
+ # Updates the parameters of a single Backup.
313
+ # @param [String] name
314
+ # Output only. The name of the backup resource with the format: * projects/`
315
+ # project`/locations/`region`/backups/`backup_id` where the cluster and backup
316
+ # ID segments should satisfy the regex expression `[a-z]([a-z0-9-]`0,61`[a-z0-9])
317
+ # ?`, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting
318
+ # with a letter, and ending with a letter or number. For more details see https:/
319
+ # /google.aip.dev/122. The prefix of the backup resource name is the name of the
320
+ # parent resource: * projects/`project`/locations/`region`
321
+ # @param [Google::Apis::AlloydbV1beta::Backup] backup_object
322
+ # @param [Boolean] allow_missing
323
+ # Optional. If set to true, update succeeds even if instance is not found. In
324
+ # that case, a new backup is created and `update_mask` is ignored.
325
+ # @param [String] request_id
326
+ # Optional. An optional request ID to identify requests. Specify a unique
327
+ # request ID so that if you must retry your request, the server will know to
328
+ # ignore the request if it has already been completed. The server will guarantee
329
+ # that for at least 60 minutes since the first request. For example, consider a
330
+ # situation where you make an initial request and the request times out. If you
331
+ # make the request again with the same request ID, the server can check if
332
+ # original operation with the same request ID was received, and if so, will
333
+ # ignore the second request. This prevents clients from accidentally creating
334
+ # duplicate commitments. The request ID must be a valid UUID with the exception
335
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
336
+ # @param [String] update_mask
337
+ # Optional. Field mask is used to specify the fields to be overwritten in the
338
+ # Backup resource by the update. The fields specified in the update_mask are
339
+ # relative to the resource, not the full request. A field will be overwritten if
340
+ # it is in the mask. If the user does not provide a mask then all fields will be
341
+ # overwritten.
342
+ # @param [Boolean] validate_only
343
+ # Optional. If set, the backend validates the request, but doesn't actually
344
+ # execute it.
345
+ # @param [String] fields
346
+ # Selector specifying which fields to include in a partial response.
347
+ # @param [String] quota_user
348
+ # Available to use for quota purposes for server-side applications. Can be any
349
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
350
+ # @param [Google::Apis::RequestOptions] options
351
+ # Request-specific options
352
+ #
353
+ # @yield [result, err] Result & error if block supplied
354
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
355
+ # @yieldparam err [StandardError] error object if request failed
356
+ #
357
+ # @return [Google::Apis::AlloydbV1beta::Operation]
358
+ #
359
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
360
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
361
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
362
+ def patch_project_location_backup(name, backup_object = nil, allow_missing: nil, request_id: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
363
+ command = make_simple_command(:patch, 'v1beta/{+name}', options)
364
+ command.request_representation = Google::Apis::AlloydbV1beta::Backup::Representation
365
+ command.request_object = backup_object
366
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
367
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
368
+ command.params['name'] = name unless name.nil?
369
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
370
+ command.query['requestId'] = request_id unless request_id.nil?
371
+ command.query['updateMask'] = update_mask unless update_mask.nil?
372
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
373
+ command.query['fields'] = fields unless fields.nil?
374
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
375
+ execute_or_queue_command(command, &block)
376
+ end
377
+
378
+ # Creates a new Cluster in a given project and location.
379
+ # @param [String] parent
380
+ # Required. The location of the new cluster. For the required format, see the
381
+ # comment on the Cluster.name field.
382
+ # @param [Google::Apis::AlloydbV1beta::Cluster] cluster_object
383
+ # @param [String] cluster_id
384
+ # Required. ID of the requesting object.
385
+ # @param [String] request_id
386
+ # Optional. An optional request ID to identify requests. Specify a unique
387
+ # request ID so that if you must retry your request, the server will know to
388
+ # ignore the request if it has already been completed. The server will guarantee
389
+ # that for at least 60 minutes since the first request. For example, consider a
390
+ # situation where you make an initial request and the request times out. If you
391
+ # make the request again with the same request ID, the server can check if
392
+ # original operation with the same request ID was received, and if so, will
393
+ # ignore the second request. This prevents clients from accidentally creating
394
+ # duplicate commitments. The request ID must be a valid UUID with the exception
395
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
396
+ # @param [Boolean] validate_only
397
+ # Optional. If set, performs request validation (e.g. permission checks and any
398
+ # other type of validation), but do not actually execute the create request.
399
+ # @param [String] fields
400
+ # Selector specifying which fields to include in a partial response.
401
+ # @param [String] quota_user
402
+ # Available to use for quota purposes for server-side applications. Can be any
403
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
404
+ # @param [Google::Apis::RequestOptions] options
405
+ # Request-specific options
406
+ #
407
+ # @yield [result, err] Result & error if block supplied
408
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
409
+ # @yieldparam err [StandardError] error object if request failed
410
+ #
411
+ # @return [Google::Apis::AlloydbV1beta::Operation]
412
+ #
413
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
414
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
415
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
416
+ def create_project_location_cluster(parent, cluster_object = nil, cluster_id: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
417
+ command = make_simple_command(:post, 'v1beta/{+parent}/clusters', options)
418
+ command.request_representation = Google::Apis::AlloydbV1beta::Cluster::Representation
419
+ command.request_object = cluster_object
420
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
421
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
422
+ command.params['parent'] = parent unless parent.nil?
423
+ command.query['clusterId'] = cluster_id unless cluster_id.nil?
424
+ command.query['requestId'] = request_id unless request_id.nil?
425
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
426
+ command.query['fields'] = fields unless fields.nil?
427
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
428
+ execute_or_queue_command(command, &block)
429
+ end
430
+
431
+ # Creates a cluster of type SECONDARY in the given location using the primary
432
+ # cluster as the source.
433
+ # @param [String] parent
434
+ # Required. The location of the new cluster. For the required format, see the
435
+ # comment on the Cluster.name field.
436
+ # @param [Google::Apis::AlloydbV1beta::Cluster] cluster_object
437
+ # @param [String] cluster_id
438
+ # Required. ID of the requesting object (the secondary cluster).
439
+ # @param [String] request_id
440
+ # Optional. An optional request ID to identify requests. Specify a unique
441
+ # request ID so that if you must retry your request, the server will know to
442
+ # ignore the request if it has already been completed. The server will guarantee
443
+ # that for at least 60 minutes since the first request. For example, consider a
444
+ # situation where you make an initial request and the request times out. If you
445
+ # make the request again with the same request ID, the server can check if
446
+ # original operation with the same request ID was received, and if so, will
447
+ # ignore the second request. This prevents clients from accidentally creating
448
+ # duplicate commitments. The request ID must be a valid UUID with the exception
449
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
450
+ # @param [Boolean] validate_only
451
+ # Optional. If set, performs request validation (e.g. permission checks and any
452
+ # other type of validation), but do not actually execute the create request.
453
+ # @param [String] fields
454
+ # Selector specifying which fields to include in a partial response.
455
+ # @param [String] quota_user
456
+ # Available to use for quota purposes for server-side applications. Can be any
457
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
458
+ # @param [Google::Apis::RequestOptions] options
459
+ # Request-specific options
460
+ #
461
+ # @yield [result, err] Result & error if block supplied
462
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
463
+ # @yieldparam err [StandardError] error object if request failed
464
+ #
465
+ # @return [Google::Apis::AlloydbV1beta::Operation]
466
+ #
467
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
468
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
469
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
470
+ def createsecondary_project_location_cluster(parent, cluster_object = nil, cluster_id: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
471
+ command = make_simple_command(:post, 'v1beta/{+parent}/clusters:createsecondary', options)
472
+ command.request_representation = Google::Apis::AlloydbV1beta::Cluster::Representation
473
+ command.request_object = cluster_object
474
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
475
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
476
+ command.params['parent'] = parent unless parent.nil?
477
+ command.query['clusterId'] = cluster_id unless cluster_id.nil?
478
+ command.query['requestId'] = request_id unless request_id.nil?
479
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
480
+ command.query['fields'] = fields unless fields.nil?
481
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
482
+ execute_or_queue_command(command, &block)
483
+ end
484
+
485
+ # Deletes a single Cluster.
486
+ # @param [String] name
487
+ # Required. The name of the resource. For the required format, see the comment
488
+ # on the Cluster.name field.
489
+ # @param [String] etag
490
+ # Optional. The current etag of the Cluster. If an etag is provided and does not
491
+ # match the current etag of the Cluster, deletion will be blocked and an ABORTED
492
+ # error will be returned.
493
+ # @param [Boolean] force
494
+ # Optional. Whether to cascade delete child instances for given cluster.
495
+ # @param [String] request_id
496
+ # Optional. An optional request ID to identify requests. Specify a unique
497
+ # request ID so that if you must retry your request, the server will know to
498
+ # ignore the request if it has already been completed. The server will guarantee
499
+ # that for at least 60 minutes after the first request. For example, consider a
500
+ # situation where you make an initial request and the request times out. If you
501
+ # make the request again with the same request ID, the server can check if
502
+ # original operation with the same request ID was received, and if so, will
503
+ # ignore the second request. This prevents clients from accidentally creating
504
+ # duplicate commitments. The request ID must be a valid UUID with the exception
505
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
506
+ # @param [Boolean] validate_only
507
+ # Optional. If set, performs request validation (e.g. permission checks and any
508
+ # other type of validation), but do not actually execute the delete.
509
+ # @param [String] fields
510
+ # Selector specifying which fields to include in a partial response.
511
+ # @param [String] quota_user
512
+ # Available to use for quota purposes for server-side applications. Can be any
513
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
514
+ # @param [Google::Apis::RequestOptions] options
515
+ # Request-specific options
516
+ #
517
+ # @yield [result, err] Result & error if block supplied
518
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
519
+ # @yieldparam err [StandardError] error object if request failed
520
+ #
521
+ # @return [Google::Apis::AlloydbV1beta::Operation]
522
+ #
523
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
524
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
525
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
526
+ def delete_project_location_cluster(name, etag: nil, force: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
527
+ command = make_simple_command(:delete, 'v1beta/{+name}', options)
528
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
529
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
530
+ command.params['name'] = name unless name.nil?
531
+ command.query['etag'] = etag unless etag.nil?
532
+ command.query['force'] = force unless force.nil?
533
+ command.query['requestId'] = request_id unless request_id.nil?
534
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
535
+ command.query['fields'] = fields unless fields.nil?
536
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
537
+ execute_or_queue_command(command, &block)
538
+ end
539
+
540
+ # Generate a client certificate signed by a Cluster CA. The sole purpose of this
541
+ # endpoint is to support AlloyDB connectors and the Auth Proxy client. The
542
+ # endpoint's behavior is subject to change without notice, so do not rely on its
543
+ # behavior remaining constant. Future changes will not break AlloyDB connectors
544
+ # or the Auth Proxy client.
545
+ # @param [String] parent
546
+ # Required. The name of the parent resource. The required format is: * projects/`
547
+ # project`/locations/`location`/clusters/`cluster`
548
+ # @param [Google::Apis::AlloydbV1beta::GenerateClientCertificateRequest] generate_client_certificate_request_object
549
+ # @param [String] fields
550
+ # Selector specifying which fields to include in a partial response.
551
+ # @param [String] quota_user
552
+ # Available to use for quota purposes for server-side applications. Can be any
553
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
554
+ # @param [Google::Apis::RequestOptions] options
555
+ # Request-specific options
556
+ #
557
+ # @yield [result, err] Result & error if block supplied
558
+ # @yieldparam result [Google::Apis::AlloydbV1beta::GenerateClientCertificateResponse] parsed result object
559
+ # @yieldparam err [StandardError] error object if request failed
560
+ #
561
+ # @return [Google::Apis::AlloydbV1beta::GenerateClientCertificateResponse]
562
+ #
563
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
564
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
565
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
566
+ def generate_cluster_client_certificate(parent, generate_client_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
567
+ command = make_simple_command(:post, 'v1beta/{+parent}:generateClientCertificate', options)
568
+ command.request_representation = Google::Apis::AlloydbV1beta::GenerateClientCertificateRequest::Representation
569
+ command.request_object = generate_client_certificate_request_object
570
+ command.response_representation = Google::Apis::AlloydbV1beta::GenerateClientCertificateResponse::Representation
571
+ command.response_class = Google::Apis::AlloydbV1beta::GenerateClientCertificateResponse
572
+ command.params['parent'] = parent unless parent.nil?
573
+ command.query['fields'] = fields unless fields.nil?
574
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
575
+ execute_or_queue_command(command, &block)
576
+ end
577
+
578
+ # Gets details of a single Cluster.
579
+ # @param [String] name
580
+ # Required. The name of the resource. For the required format, see the comment
581
+ # on the Cluster.name field.
582
+ # @param [String] view
583
+ # Optional. The view of the cluster to return. Returns all default fields if not
584
+ # set.
585
+ # @param [String] fields
586
+ # Selector specifying which fields to include in a partial response.
587
+ # @param [String] quota_user
588
+ # Available to use for quota purposes for server-side applications. Can be any
589
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
590
+ # @param [Google::Apis::RequestOptions] options
591
+ # Request-specific options
592
+ #
593
+ # @yield [result, err] Result & error if block supplied
594
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Cluster] parsed result object
595
+ # @yieldparam err [StandardError] error object if request failed
596
+ #
597
+ # @return [Google::Apis::AlloydbV1beta::Cluster]
598
+ #
599
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
600
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
601
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
602
+ def get_project_location_cluster(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
603
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
604
+ command.response_representation = Google::Apis::AlloydbV1beta::Cluster::Representation
605
+ command.response_class = Google::Apis::AlloydbV1beta::Cluster
606
+ command.params['name'] = name unless name.nil?
607
+ command.query['view'] = view unless view.nil?
608
+ command.query['fields'] = fields unless fields.nil?
609
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
610
+ execute_or_queue_command(command, &block)
611
+ end
612
+
613
+ # Lists Clusters in a given project and location.
614
+ # @param [String] parent
615
+ # Required. The name of the parent resource. For the required format, see the
616
+ # comment on the Cluster.name field. Additionally, you can perform an aggregated
617
+ # list operation by specifying a value with the following format: * projects/`
618
+ # project`/locations/-
619
+ # @param [String] filter
620
+ # Optional. Filtering results
621
+ # @param [String] order_by
622
+ # Optional. Hint for how to order the results
623
+ # @param [Fixnum] page_size
624
+ # Optional. Requested page size. Server may return fewer items than requested.
625
+ # If unspecified, server will pick an appropriate default.
626
+ # @param [String] page_token
627
+ # A token identifying a page of results the server should return.
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::AlloydbV1beta::ListClustersResponse] parsed result object
638
+ # @yieldparam err [StandardError] error object if request failed
639
+ #
640
+ # @return [Google::Apis::AlloydbV1beta::ListClustersResponse]
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_project_location_clusters(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
646
+ command = make_simple_command(:get, 'v1beta/{+parent}/clusters', options)
647
+ command.response_representation = Google::Apis::AlloydbV1beta::ListClustersResponse::Representation
648
+ command.response_class = Google::Apis::AlloydbV1beta::ListClustersResponse
649
+ command.params['parent'] = parent unless parent.nil?
650
+ command.query['filter'] = filter unless filter.nil?
651
+ command.query['orderBy'] = order_by unless order_by.nil?
652
+ command.query['pageSize'] = page_size unless page_size.nil?
653
+ command.query['pageToken'] = page_token unless page_token.nil?
654
+ command.query['fields'] = fields unless fields.nil?
655
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
656
+ execute_or_queue_command(command, &block)
657
+ end
658
+
659
+ # Updates the parameters of a single Cluster.
660
+ # @param [String] name
661
+ # Output only. The name of the cluster resource with the format: * projects/`
662
+ # project`/locations/`region`/clusters/`cluster_id` where the cluster ID segment
663
+ # should satisfy the regex expression `[a-z0-9-]+`. For more details see https://
664
+ # google.aip.dev/122. The prefix of the cluster resource name is the name of the
665
+ # parent resource: * projects/`project`/locations/`region`
666
+ # @param [Google::Apis::AlloydbV1beta::Cluster] cluster_object
667
+ # @param [Boolean] allow_missing
668
+ # Optional. If set to true, update succeeds even if cluster is not found. In
669
+ # that case, a new cluster is created and `update_mask` is ignored.
670
+ # @param [String] request_id
671
+ # Optional. An optional request ID to identify requests. Specify a unique
672
+ # request ID so that if you must retry your request, the server will know to
673
+ # ignore the request if it has already been completed. The server will guarantee
674
+ # that for at least 60 minutes since the first request. For example, consider a
675
+ # situation where you make an initial request and the request times out. If you
676
+ # make the request again with the same request ID, the server can check if
677
+ # original operation with the same request ID was received, and if so, will
678
+ # ignore the second request. This prevents clients from accidentally creating
679
+ # duplicate commitments. The request ID must be a valid UUID with the exception
680
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
681
+ # @param [String] update_mask
682
+ # Optional. Field mask is used to specify the fields to be overwritten in the
683
+ # Cluster resource by the update. The fields specified in the update_mask are
684
+ # relative to the resource, not the full request. A field will be overwritten if
685
+ # it is in the mask. If the user does not provide a mask then all fields will be
686
+ # overwritten.
687
+ # @param [Boolean] validate_only
688
+ # Optional. If set, performs request validation (e.g. permission checks and any
689
+ # other type of validation), but do not actually execute the update request.
690
+ # @param [String] fields
691
+ # Selector specifying which fields to include in a partial response.
692
+ # @param [String] quota_user
693
+ # Available to use for quota purposes for server-side applications. Can be any
694
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
695
+ # @param [Google::Apis::RequestOptions] options
696
+ # Request-specific options
697
+ #
698
+ # @yield [result, err] Result & error if block supplied
699
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
700
+ # @yieldparam err [StandardError] error object if request failed
701
+ #
702
+ # @return [Google::Apis::AlloydbV1beta::Operation]
703
+ #
704
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
705
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
706
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
707
+ def patch_project_location_cluster(name, cluster_object = nil, allow_missing: nil, request_id: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
708
+ command = make_simple_command(:patch, 'v1beta/{+name}', options)
709
+ command.request_representation = Google::Apis::AlloydbV1beta::Cluster::Representation
710
+ command.request_object = cluster_object
711
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
712
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
713
+ command.params['name'] = name unless name.nil?
714
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
715
+ command.query['requestId'] = request_id unless request_id.nil?
716
+ command.query['updateMask'] = update_mask unless update_mask.nil?
717
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
718
+ command.query['fields'] = fields unless fields.nil?
719
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
720
+ execute_or_queue_command(command, &block)
721
+ end
722
+
723
+ # Promotes a SECONDARY cluster. This turns down replication from the PRIMARY
724
+ # cluster and promotes a secondary cluster into its own standalone cluster.
725
+ # Imperative only.
726
+ # @param [String] name
727
+ # Required. The name of the resource. For the required format, see the comment
728
+ # on the Cluster.name field
729
+ # @param [Google::Apis::AlloydbV1beta::PromoteClusterRequest] promote_cluster_request_object
730
+ # @param [String] fields
731
+ # Selector specifying which fields to include in a partial response.
732
+ # @param [String] quota_user
733
+ # Available to use for quota purposes for server-side applications. Can be any
734
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
735
+ # @param [Google::Apis::RequestOptions] options
736
+ # Request-specific options
737
+ #
738
+ # @yield [result, err] Result & error if block supplied
739
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
740
+ # @yieldparam err [StandardError] error object if request failed
741
+ #
742
+ # @return [Google::Apis::AlloydbV1beta::Operation]
743
+ #
744
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
745
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
746
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
747
+ def promote_cluster(name, promote_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
748
+ command = make_simple_command(:post, 'v1beta/{+name}:promote', options)
749
+ command.request_representation = Google::Apis::AlloydbV1beta::PromoteClusterRequest::Representation
750
+ command.request_object = promote_cluster_request_object
751
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
752
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
753
+ command.params['name'] = name unless name.nil?
754
+ command.query['fields'] = fields unless fields.nil?
755
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
756
+ execute_or_queue_command(command, &block)
757
+ end
758
+
759
+ # Creates a new Cluster in a given project and location, with a volume restored
760
+ # from the provided source, either a backup ID or a point-in-time and a source
761
+ # cluster.
762
+ # @param [String] parent
763
+ # Required. The name of the parent resource. For the required format, see the
764
+ # comment on the Cluster.name field.
765
+ # @param [Google::Apis::AlloydbV1beta::RestoreClusterRequest] restore_cluster_request_object
766
+ # @param [String] fields
767
+ # Selector specifying which fields to include in a partial response.
768
+ # @param [String] quota_user
769
+ # Available to use for quota purposes for server-side applications. Can be any
770
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
771
+ # @param [Google::Apis::RequestOptions] options
772
+ # Request-specific options
773
+ #
774
+ # @yield [result, err] Result & error if block supplied
775
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
776
+ # @yieldparam err [StandardError] error object if request failed
777
+ #
778
+ # @return [Google::Apis::AlloydbV1beta::Operation]
779
+ #
780
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
781
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
782
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
783
+ def restore_cluster(parent, restore_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
784
+ command = make_simple_command(:post, 'v1beta/{+parent}/clusters:restore', options)
785
+ command.request_representation = Google::Apis::AlloydbV1beta::RestoreClusterRequest::Representation
786
+ command.request_object = restore_cluster_request_object
787
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
788
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
789
+ command.params['parent'] = parent unless parent.nil?
790
+ command.query['fields'] = fields unless fields.nil?
791
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
792
+ execute_or_queue_command(command, &block)
793
+ end
794
+
795
+ # Creates a new Instance in a given project and location.
796
+ # @param [String] parent
797
+ # Required. The name of the parent resource. For the required format, see the
798
+ # comment on the Instance.name field.
799
+ # @param [Google::Apis::AlloydbV1beta::Instance] instance_object
800
+ # @param [String] instance_id
801
+ # Required. ID of the requesting object.
802
+ # @param [String] request_id
803
+ # Optional. An optional request ID to identify requests. Specify a unique
804
+ # request ID so that if you must retry your request, the server will know to
805
+ # ignore the request if it has already been completed. The server will guarantee
806
+ # that for at least 60 minutes since the first request. For example, consider a
807
+ # situation where you make an initial request and the request times out. If you
808
+ # make the request again with the same request ID, the server can check if
809
+ # original operation with the same request ID was received, and if so, will
810
+ # ignore the second request. This prevents clients from accidentally creating
811
+ # duplicate commitments. The request ID must be a valid UUID with the exception
812
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
813
+ # @param [Boolean] validate_only
814
+ # Optional. If set, performs request validation (e.g. permission checks and any
815
+ # other type of validation), but do not actually execute the create request.
816
+ # @param [String] fields
817
+ # Selector specifying which fields to include in a partial response.
818
+ # @param [String] quota_user
819
+ # Available to use for quota purposes for server-side applications. Can be any
820
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
821
+ # @param [Google::Apis::RequestOptions] options
822
+ # Request-specific options
823
+ #
824
+ # @yield [result, err] Result & error if block supplied
825
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
826
+ # @yieldparam err [StandardError] error object if request failed
827
+ #
828
+ # @return [Google::Apis::AlloydbV1beta::Operation]
829
+ #
830
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
831
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
832
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
833
+ def create_project_location_cluster_instance(parent, instance_object = nil, instance_id: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
834
+ command = make_simple_command(:post, 'v1beta/{+parent}/instances', options)
835
+ command.request_representation = Google::Apis::AlloydbV1beta::Instance::Representation
836
+ command.request_object = instance_object
837
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
838
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
839
+ command.params['parent'] = parent unless parent.nil?
840
+ command.query['instanceId'] = instance_id unless instance_id.nil?
841
+ command.query['requestId'] = request_id unless request_id.nil?
842
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
843
+ command.query['fields'] = fields unless fields.nil?
844
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
845
+ execute_or_queue_command(command, &block)
846
+ end
847
+
848
+ # Creates a new SECONDARY Instance in a given project and location.
849
+ # @param [String] parent
850
+ # Required. The name of the parent resource. For the required format, see the
851
+ # comment on the Instance.name field.
852
+ # @param [Google::Apis::AlloydbV1beta::Instance] instance_object
853
+ # @param [String] instance_id
854
+ # Required. ID of the requesting object.
855
+ # @param [String] request_id
856
+ # Optional. An optional request ID to identify requests. Specify a unique
857
+ # request ID so that if you must retry your request, the server will know to
858
+ # ignore the request if it has already been completed. The server will guarantee
859
+ # that for at least 60 minutes since the first request. For example, consider a
860
+ # situation where you make an initial request and the request times out. If you
861
+ # make the request again with the same request ID, the server can check if
862
+ # original operation with the same request ID was received, and if so, will
863
+ # ignore the second request. This prevents clients from accidentally creating
864
+ # duplicate commitments. The request ID must be a valid UUID with the exception
865
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
866
+ # @param [Boolean] validate_only
867
+ # Optional. If set, performs request validation (e.g. permission checks and any
868
+ # other type of validation), but do not actually execute the create request.
869
+ # @param [String] fields
870
+ # Selector specifying which fields to include in a partial response.
871
+ # @param [String] quota_user
872
+ # Available to use for quota purposes for server-side applications. Can be any
873
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
874
+ # @param [Google::Apis::RequestOptions] options
875
+ # Request-specific options
876
+ #
877
+ # @yield [result, err] Result & error if block supplied
878
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
879
+ # @yieldparam err [StandardError] error object if request failed
880
+ #
881
+ # @return [Google::Apis::AlloydbV1beta::Operation]
882
+ #
883
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
884
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
885
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
886
+ def createsecondary_project_location_cluster_instance(parent, instance_object = nil, instance_id: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
887
+ command = make_simple_command(:post, 'v1beta/{+parent}/instances:createsecondary', options)
888
+ command.request_representation = Google::Apis::AlloydbV1beta::Instance::Representation
889
+ command.request_object = instance_object
890
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
891
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
892
+ command.params['parent'] = parent unless parent.nil?
893
+ command.query['instanceId'] = instance_id unless instance_id.nil?
894
+ command.query['requestId'] = request_id unless request_id.nil?
895
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
896
+ command.query['fields'] = fields unless fields.nil?
897
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
898
+ execute_or_queue_command(command, &block)
899
+ end
900
+
901
+ # Deletes a single Instance.
902
+ # @param [String] name
903
+ # Required. The name of the resource. For the required format, see the comment
904
+ # on the Instance.name field.
905
+ # @param [String] etag
906
+ # Optional. The current etag of the Instance. If an etag is provided and does
907
+ # not match the current etag of the Instance, deletion will be blocked and an
908
+ # ABORTED error will be returned.
909
+ # @param [String] request_id
910
+ # Optional. An optional request ID to identify requests. Specify a unique
911
+ # request ID so that if you must retry your request, the server will know to
912
+ # ignore the request if it has already been completed. The server will guarantee
913
+ # that for at least 60 minutes after the first request. For example, consider a
914
+ # situation where you make an initial request and the request times out. If you
915
+ # make the request again with the same request ID, the server can check if
916
+ # original operation with the same request ID was received, and if so, will
917
+ # ignore the second request. This prevents clients from accidentally creating
918
+ # duplicate commitments. The request ID must be a valid UUID with the exception
919
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
920
+ # @param [Boolean] validate_only
921
+ # Optional. If set, performs request validation (e.g. permission checks and any
922
+ # other type of validation), but do not actually execute the delete.
923
+ # @param [String] fields
924
+ # Selector specifying which fields to include in a partial response.
925
+ # @param [String] quota_user
926
+ # Available to use for quota purposes for server-side applications. Can be any
927
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
928
+ # @param [Google::Apis::RequestOptions] options
929
+ # Request-specific options
930
+ #
931
+ # @yield [result, err] Result & error if block supplied
932
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
933
+ # @yieldparam err [StandardError] error object if request failed
934
+ #
935
+ # @return [Google::Apis::AlloydbV1beta::Operation]
936
+ #
937
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
938
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
939
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
940
+ def delete_project_location_cluster_instance(name, etag: nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
941
+ command = make_simple_command(:delete, 'v1beta/{+name}', options)
942
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
943
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
944
+ command.params['name'] = name unless name.nil?
945
+ command.query['etag'] = etag unless etag.nil?
946
+ command.query['requestId'] = request_id unless request_id.nil?
947
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
948
+ command.query['fields'] = fields unless fields.nil?
949
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
950
+ execute_or_queue_command(command, &block)
951
+ end
952
+
953
+ # Forces a Failover for a highly available instance. Failover promotes the HA
954
+ # standby instance as the new primary. Imperative only.
955
+ # @param [String] name
956
+ # Required. The name of the resource. For the required format, see the comment
957
+ # on the Instance.name field.
958
+ # @param [Google::Apis::AlloydbV1beta::FailoverInstanceRequest] failover_instance_request_object
959
+ # @param [String] fields
960
+ # Selector specifying which fields to include in a partial response.
961
+ # @param [String] quota_user
962
+ # Available to use for quota purposes for server-side applications. Can be any
963
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
964
+ # @param [Google::Apis::RequestOptions] options
965
+ # Request-specific options
966
+ #
967
+ # @yield [result, err] Result & error if block supplied
968
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
969
+ # @yieldparam err [StandardError] error object if request failed
970
+ #
971
+ # @return [Google::Apis::AlloydbV1beta::Operation]
972
+ #
973
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
974
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
975
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
976
+ def failover_instance(name, failover_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
977
+ command = make_simple_command(:post, 'v1beta/{+name}:failover', options)
978
+ command.request_representation = Google::Apis::AlloydbV1beta::FailoverInstanceRequest::Representation
979
+ command.request_object = failover_instance_request_object
980
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
981
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
982
+ command.params['name'] = name unless name.nil?
983
+ command.query['fields'] = fields unless fields.nil?
984
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
985
+ execute_or_queue_command(command, &block)
986
+ end
987
+
988
+ # Gets details of a single Instance.
989
+ # @param [String] name
990
+ # Required. The name of the resource. For the required format, see the comment
991
+ # on the Instance.name field.
992
+ # @param [String] view
993
+ # The view of the instance to return.
994
+ # @param [String] fields
995
+ # Selector specifying which fields to include in a partial response.
996
+ # @param [String] quota_user
997
+ # Available to use for quota purposes for server-side applications. Can be any
998
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
999
+ # @param [Google::Apis::RequestOptions] options
1000
+ # Request-specific options
1001
+ #
1002
+ # @yield [result, err] Result & error if block supplied
1003
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Instance] parsed result object
1004
+ # @yieldparam err [StandardError] error object if request failed
1005
+ #
1006
+ # @return [Google::Apis::AlloydbV1beta::Instance]
1007
+ #
1008
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1009
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1010
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1011
+ def get_project_location_cluster_instance(name, view: nil, fields: nil, quota_user: nil, options: nil, &block)
1012
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
1013
+ command.response_representation = Google::Apis::AlloydbV1beta::Instance::Representation
1014
+ command.response_class = Google::Apis::AlloydbV1beta::Instance
1015
+ command.params['name'] = name unless name.nil?
1016
+ command.query['view'] = view unless view.nil?
1017
+ command.query['fields'] = fields unless fields.nil?
1018
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1019
+ execute_or_queue_command(command, &block)
1020
+ end
1021
+
1022
+ # Get instance metadata used for a connection.
1023
+ # @param [String] parent
1024
+ # Required. The name of the parent resource. The required format is: projects/`
1025
+ # project`/locations/`location`/clusters/`cluster`/instances/`instance`
1026
+ # @param [String] request_id
1027
+ # Optional. An optional request ID to identify requests. Specify a unique
1028
+ # request ID so that if you must retry your request, the server will know to
1029
+ # ignore the request if it has already been completed. The server will guarantee
1030
+ # that for at least 60 minutes after the first request. For example, consider a
1031
+ # situation where you make an initial request and the request times out. If you
1032
+ # make the request again with the same request ID, the server can check if
1033
+ # original operation with the same request ID was received, and if so, will
1034
+ # ignore the second request. This prevents clients from accidentally creating
1035
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1036
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1037
+ # @param [String] fields
1038
+ # Selector specifying which fields to include in a partial response.
1039
+ # @param [String] quota_user
1040
+ # Available to use for quota purposes for server-side applications. Can be any
1041
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1042
+ # @param [Google::Apis::RequestOptions] options
1043
+ # Request-specific options
1044
+ #
1045
+ # @yield [result, err] Result & error if block supplied
1046
+ # @yieldparam result [Google::Apis::AlloydbV1beta::ConnectionInfo] parsed result object
1047
+ # @yieldparam err [StandardError] error object if request failed
1048
+ #
1049
+ # @return [Google::Apis::AlloydbV1beta::ConnectionInfo]
1050
+ #
1051
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1052
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1053
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1054
+ def get_project_location_cluster_instance_connection_info(parent, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1055
+ command = make_simple_command(:get, 'v1beta/{+parent}/connectionInfo', options)
1056
+ command.response_representation = Google::Apis::AlloydbV1beta::ConnectionInfo::Representation
1057
+ command.response_class = Google::Apis::AlloydbV1beta::ConnectionInfo
1058
+ command.params['parent'] = parent unless parent.nil?
1059
+ command.query['requestId'] = request_id unless request_id.nil?
1060
+ command.query['fields'] = fields unless fields.nil?
1061
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1062
+ execute_or_queue_command(command, &block)
1063
+ end
1064
+
1065
+ # Injects fault in an instance. Imperative only.
1066
+ # @param [String] name
1067
+ # Required. The name of the resource. For the required format, see the comment
1068
+ # on the Instance.name field.
1069
+ # @param [Google::Apis::AlloydbV1beta::InjectFaultRequest] inject_fault_request_object
1070
+ # @param [String] fields
1071
+ # Selector specifying which fields to include in a partial response.
1072
+ # @param [String] quota_user
1073
+ # Available to use for quota purposes for server-side applications. Can be any
1074
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1075
+ # @param [Google::Apis::RequestOptions] options
1076
+ # Request-specific options
1077
+ #
1078
+ # @yield [result, err] Result & error if block supplied
1079
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
1080
+ # @yieldparam err [StandardError] error object if request failed
1081
+ #
1082
+ # @return [Google::Apis::AlloydbV1beta::Operation]
1083
+ #
1084
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1085
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1086
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1087
+ def inject_instance_fault(name, inject_fault_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1088
+ command = make_simple_command(:post, 'v1beta/{+name}:injectFault', options)
1089
+ command.request_representation = Google::Apis::AlloydbV1beta::InjectFaultRequest::Representation
1090
+ command.request_object = inject_fault_request_object
1091
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
1092
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
1093
+ command.params['name'] = name unless name.nil?
1094
+ command.query['fields'] = fields unless fields.nil?
1095
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1096
+ execute_or_queue_command(command, &block)
1097
+ end
1098
+
1099
+ # Lists Instances in a given project and location.
1100
+ # @param [String] parent
1101
+ # Required. The name of the parent resource. For the required format, see the
1102
+ # comment on the Instance.name field. Additionally, you can perform an
1103
+ # aggregated list operation by specifying a value with one of the following
1104
+ # formats: * projects/`project`/locations/-/clusters/- * projects/`project`/
1105
+ # locations/`region`/clusters/-
1106
+ # @param [String] filter
1107
+ # Optional. Filtering results
1108
+ # @param [String] order_by
1109
+ # Optional. Hint for how to order the results
1110
+ # @param [Fixnum] page_size
1111
+ # Optional. Requested page size. Server may return fewer items than requested.
1112
+ # If unspecified, server will pick an appropriate default.
1113
+ # @param [String] page_token
1114
+ # A token identifying a page of results the server should return.
1115
+ # @param [String] fields
1116
+ # Selector specifying which fields to include in a partial response.
1117
+ # @param [String] quota_user
1118
+ # Available to use for quota purposes for server-side applications. Can be any
1119
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1120
+ # @param [Google::Apis::RequestOptions] options
1121
+ # Request-specific options
1122
+ #
1123
+ # @yield [result, err] Result & error if block supplied
1124
+ # @yieldparam result [Google::Apis::AlloydbV1beta::ListInstancesResponse] parsed result object
1125
+ # @yieldparam err [StandardError] error object if request failed
1126
+ #
1127
+ # @return [Google::Apis::AlloydbV1beta::ListInstancesResponse]
1128
+ #
1129
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1130
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1131
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1132
+ def list_project_location_cluster_instances(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1133
+ command = make_simple_command(:get, 'v1beta/{+parent}/instances', options)
1134
+ command.response_representation = Google::Apis::AlloydbV1beta::ListInstancesResponse::Representation
1135
+ command.response_class = Google::Apis::AlloydbV1beta::ListInstancesResponse
1136
+ command.params['parent'] = parent unless parent.nil?
1137
+ command.query['filter'] = filter unless filter.nil?
1138
+ command.query['orderBy'] = order_by unless order_by.nil?
1139
+ command.query['pageSize'] = page_size unless page_size.nil?
1140
+ command.query['pageToken'] = page_token unless page_token.nil?
1141
+ command.query['fields'] = fields unless fields.nil?
1142
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1143
+ execute_or_queue_command(command, &block)
1144
+ end
1145
+
1146
+ # Updates the parameters of a single Instance.
1147
+ # @param [String] name
1148
+ # Output only. The name of the instance resource with the format: * projects/`
1149
+ # project`/locations/`region`/clusters/`cluster_id`/instances/`instance_id`
1150
+ # where the cluster and instance ID segments should satisfy the regex expression
1151
+ # `[a-z]([a-z0-9-]`0,61`[a-z0-9])?`, e.g. 1-63 characters of lowercase letters,
1152
+ # numbers, and dashes, starting with a letter, and ending with a letter or
1153
+ # number. For more details see https://google.aip.dev/122. The prefix of the
1154
+ # instance resource name is the name of the parent resource: * projects/`project`
1155
+ # /locations/`region`/clusters/`cluster_id`
1156
+ # @param [Google::Apis::AlloydbV1beta::Instance] instance_object
1157
+ # @param [Boolean] allow_missing
1158
+ # Optional. If set to true, update succeeds even if instance is not found. In
1159
+ # that case, a new instance is created and `update_mask` is ignored.
1160
+ # @param [String] request_id
1161
+ # Optional. An optional request ID to identify requests. Specify a unique
1162
+ # request ID so that if you must retry your request, the server will know to
1163
+ # ignore the request if it has already been completed. The server will guarantee
1164
+ # that for at least 60 minutes since the first request. For example, consider a
1165
+ # situation where you make an initial request and the request times out. If you
1166
+ # make the request again with the same request ID, the server can check if
1167
+ # original operation with the same request ID was received, and if so, will
1168
+ # ignore the second request. This prevents clients from accidentally creating
1169
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1170
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1171
+ # @param [String] update_mask
1172
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1173
+ # Instance resource by the update. The fields specified in the update_mask are
1174
+ # relative to the resource, not the full request. A field will be overwritten if
1175
+ # it is in the mask. If the user does not provide a mask then all fields will be
1176
+ # overwritten.
1177
+ # @param [Boolean] validate_only
1178
+ # Optional. If set, performs request validation (e.g. permission checks and any
1179
+ # other type of validation), but do not actually execute the update request.
1180
+ # @param [String] fields
1181
+ # Selector specifying which fields to include in a partial response.
1182
+ # @param [String] quota_user
1183
+ # Available to use for quota purposes for server-side applications. Can be any
1184
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1185
+ # @param [Google::Apis::RequestOptions] options
1186
+ # Request-specific options
1187
+ #
1188
+ # @yield [result, err] Result & error if block supplied
1189
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
1190
+ # @yieldparam err [StandardError] error object if request failed
1191
+ #
1192
+ # @return [Google::Apis::AlloydbV1beta::Operation]
1193
+ #
1194
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1195
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1196
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1197
+ def patch_project_location_cluster_instance(name, instance_object = nil, allow_missing: nil, request_id: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
1198
+ command = make_simple_command(:patch, 'v1beta/{+name}', options)
1199
+ command.request_representation = Google::Apis::AlloydbV1beta::Instance::Representation
1200
+ command.request_object = instance_object
1201
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
1202
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
1203
+ command.params['name'] = name unless name.nil?
1204
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
1205
+ command.query['requestId'] = request_id unless request_id.nil?
1206
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1207
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
1208
+ command.query['fields'] = fields unless fields.nil?
1209
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1210
+ execute_or_queue_command(command, &block)
1211
+ end
1212
+
1213
+ # Restart an Instance in a cluster. Imperative only.
1214
+ # @param [String] name
1215
+ # Required. The name of the resource. For the required format, see the comment
1216
+ # on the Instance.name field.
1217
+ # @param [Google::Apis::AlloydbV1beta::RestartInstanceRequest] restart_instance_request_object
1218
+ # @param [String] fields
1219
+ # Selector specifying which fields to include in a partial response.
1220
+ # @param [String] quota_user
1221
+ # Available to use for quota purposes for server-side applications. Can be any
1222
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1223
+ # @param [Google::Apis::RequestOptions] options
1224
+ # Request-specific options
1225
+ #
1226
+ # @yield [result, err] Result & error if block supplied
1227
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
1228
+ # @yieldparam err [StandardError] error object if request failed
1229
+ #
1230
+ # @return [Google::Apis::AlloydbV1beta::Operation]
1231
+ #
1232
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1233
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1234
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1235
+ def restart_instance(name, restart_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1236
+ command = make_simple_command(:post, 'v1beta/{+name}:restart', options)
1237
+ command.request_representation = Google::Apis::AlloydbV1beta::RestartInstanceRequest::Representation
1238
+ command.request_object = restart_instance_request_object
1239
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
1240
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
1241
+ command.params['name'] = name unless name.nil?
1242
+ command.query['fields'] = fields unless fields.nil?
1243
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1244
+ execute_or_queue_command(command, &block)
1245
+ end
1246
+
1247
+ # Creates a new User in a given project, location, and cluster.
1248
+ # @param [String] parent
1249
+ # Required. Value for parent.
1250
+ # @param [Google::Apis::AlloydbV1beta::User] user_object
1251
+ # @param [String] request_id
1252
+ # Optional. An optional request ID to identify requests. Specify a unique
1253
+ # request ID so that if you must retry your request, the server will know to
1254
+ # ignore the request if it has already been completed. The server will guarantee
1255
+ # that for at least 60 minutes since the first request. For example, consider a
1256
+ # situation where you make an initial request and the request times out. If you
1257
+ # make the request again with the same request ID, the server can check if
1258
+ # original operation with the same request ID was received, and if so, will
1259
+ # ignore the second request. This prevents clients from accidentally creating
1260
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1261
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1262
+ # @param [String] user_id
1263
+ # Required. ID of the requesting object.
1264
+ # @param [Boolean] validate_only
1265
+ # Optional. If set, the backend validates the request, but doesn't actually
1266
+ # execute it.
1267
+ # @param [String] fields
1268
+ # Selector specifying which fields to include in a partial response.
1269
+ # @param [String] quota_user
1270
+ # Available to use for quota purposes for server-side applications. Can be any
1271
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1272
+ # @param [Google::Apis::RequestOptions] options
1273
+ # Request-specific options
1274
+ #
1275
+ # @yield [result, err] Result & error if block supplied
1276
+ # @yieldparam result [Google::Apis::AlloydbV1beta::User] parsed result object
1277
+ # @yieldparam err [StandardError] error object if request failed
1278
+ #
1279
+ # @return [Google::Apis::AlloydbV1beta::User]
1280
+ #
1281
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1282
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1283
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1284
+ def create_project_location_cluster_user(parent, user_object = nil, request_id: nil, user_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
1285
+ command = make_simple_command(:post, 'v1beta/{+parent}/users', options)
1286
+ command.request_representation = Google::Apis::AlloydbV1beta::User::Representation
1287
+ command.request_object = user_object
1288
+ command.response_representation = Google::Apis::AlloydbV1beta::User::Representation
1289
+ command.response_class = Google::Apis::AlloydbV1beta::User
1290
+ command.params['parent'] = parent unless parent.nil?
1291
+ command.query['requestId'] = request_id unless request_id.nil?
1292
+ command.query['userId'] = user_id unless user_id.nil?
1293
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
1294
+ command.query['fields'] = fields unless fields.nil?
1295
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1296
+ execute_or_queue_command(command, &block)
1297
+ end
1298
+
1299
+ # Deletes a single User.
1300
+ # @param [String] name
1301
+ # Required. The name of the resource. For the required format, see the comment
1302
+ # on the User.name field.
1303
+ # @param [String] request_id
1304
+ # Optional. An optional request ID to identify requests. Specify a unique
1305
+ # request ID so that if you must retry your request, the server will know to
1306
+ # ignore the request if it has already been completed. The server will guarantee
1307
+ # that for at least 60 minutes after the first request. For example, consider a
1308
+ # situation where you make an initial request and the request times out. If you
1309
+ # make the request again with the same request ID, the server can check if
1310
+ # original operation with the same request ID was received, and if so, will
1311
+ # ignore the second request. This prevents clients from accidentally creating
1312
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1313
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1314
+ # @param [Boolean] validate_only
1315
+ # Optional. If set, the backend validates the request, but doesn't actually
1316
+ # execute it.
1317
+ # @param [String] fields
1318
+ # Selector specifying which fields to include in a partial response.
1319
+ # @param [String] quota_user
1320
+ # Available to use for quota purposes for server-side applications. Can be any
1321
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1322
+ # @param [Google::Apis::RequestOptions] options
1323
+ # Request-specific options
1324
+ #
1325
+ # @yield [result, err] Result & error if block supplied
1326
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Empty] parsed result object
1327
+ # @yieldparam err [StandardError] error object if request failed
1328
+ #
1329
+ # @return [Google::Apis::AlloydbV1beta::Empty]
1330
+ #
1331
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1332
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1333
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1334
+ def delete_project_location_cluster_user(name, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
1335
+ command = make_simple_command(:delete, 'v1beta/{+name}', options)
1336
+ command.response_representation = Google::Apis::AlloydbV1beta::Empty::Representation
1337
+ command.response_class = Google::Apis::AlloydbV1beta::Empty
1338
+ command.params['name'] = name unless name.nil?
1339
+ command.query['requestId'] = request_id unless request_id.nil?
1340
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
1341
+ command.query['fields'] = fields unless fields.nil?
1342
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1343
+ execute_or_queue_command(command, &block)
1344
+ end
1345
+
1346
+ # Gets details of a single User.
1347
+ # @param [String] name
1348
+ # Required. The name of the resource. For the required format, see the comment
1349
+ # on the User.name field.
1350
+ # @param [String] fields
1351
+ # Selector specifying which fields to include in a partial response.
1352
+ # @param [String] quota_user
1353
+ # Available to use for quota purposes for server-side applications. Can be any
1354
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1355
+ # @param [Google::Apis::RequestOptions] options
1356
+ # Request-specific options
1357
+ #
1358
+ # @yield [result, err] Result & error if block supplied
1359
+ # @yieldparam result [Google::Apis::AlloydbV1beta::User] parsed result object
1360
+ # @yieldparam err [StandardError] error object if request failed
1361
+ #
1362
+ # @return [Google::Apis::AlloydbV1beta::User]
1363
+ #
1364
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1365
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1366
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1367
+ def get_project_location_cluster_user(name, fields: nil, quota_user: nil, options: nil, &block)
1368
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
1369
+ command.response_representation = Google::Apis::AlloydbV1beta::User::Representation
1370
+ command.response_class = Google::Apis::AlloydbV1beta::User
1371
+ command.params['name'] = name unless name.nil?
1372
+ command.query['fields'] = fields unless fields.nil?
1373
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1374
+ execute_or_queue_command(command, &block)
1375
+ end
1376
+
1377
+ # Lists Users in a given project and location.
1378
+ # @param [String] parent
1379
+ # Required. Parent value for ListUsersRequest
1380
+ # @param [String] filter
1381
+ # Optional. Filtering results
1382
+ # @param [String] order_by
1383
+ # Optional. Hint for how to order the results
1384
+ # @param [Fixnum] page_size
1385
+ # Optional. Requested page size. Server may return fewer items than requested.
1386
+ # If unspecified, server will pick an appropriate default.
1387
+ # @param [String] page_token
1388
+ # Optional. A token identifying a page of results the server should return.
1389
+ # @param [String] fields
1390
+ # Selector specifying which fields to include in a partial response.
1391
+ # @param [String] quota_user
1392
+ # Available to use for quota purposes for server-side applications. Can be any
1393
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1394
+ # @param [Google::Apis::RequestOptions] options
1395
+ # Request-specific options
1396
+ #
1397
+ # @yield [result, err] Result & error if block supplied
1398
+ # @yieldparam result [Google::Apis::AlloydbV1beta::ListUsersResponse] parsed result object
1399
+ # @yieldparam err [StandardError] error object if request failed
1400
+ #
1401
+ # @return [Google::Apis::AlloydbV1beta::ListUsersResponse]
1402
+ #
1403
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1404
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1405
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1406
+ def list_project_location_cluster_users(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1407
+ command = make_simple_command(:get, 'v1beta/{+parent}/users', options)
1408
+ command.response_representation = Google::Apis::AlloydbV1beta::ListUsersResponse::Representation
1409
+ command.response_class = Google::Apis::AlloydbV1beta::ListUsersResponse
1410
+ command.params['parent'] = parent unless parent.nil?
1411
+ command.query['filter'] = filter unless filter.nil?
1412
+ command.query['orderBy'] = order_by unless order_by.nil?
1413
+ command.query['pageSize'] = page_size unless page_size.nil?
1414
+ command.query['pageToken'] = page_token unless page_token.nil?
1415
+ command.query['fields'] = fields unless fields.nil?
1416
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1417
+ execute_or_queue_command(command, &block)
1418
+ end
1419
+
1420
+ # Updates the parameters of a single User.
1421
+ # @param [String] name
1422
+ # Output only. Name of the resource in the form of projects/`project`/locations/`
1423
+ # location`/cluster/`cluster`/users/`user`.
1424
+ # @param [Google::Apis::AlloydbV1beta::User] user_object
1425
+ # @param [Boolean] allow_missing
1426
+ # Optional. Allow missing fields in the update mask.
1427
+ # @param [String] request_id
1428
+ # Optional. An optional request ID to identify requests. Specify a unique
1429
+ # request ID so that if you must retry your request, the server will know to
1430
+ # ignore the request if it has already been completed. The server will guarantee
1431
+ # that for at least 60 minutes since the first request. For example, consider a
1432
+ # situation where you make an initial request and the request times out. If you
1433
+ # make the request again with the same request ID, the server can check if
1434
+ # original operation with the same request ID was received, and if so, will
1435
+ # ignore the second request. This prevents clients from accidentally creating
1436
+ # duplicate commitments. The request ID must be a valid UUID with the exception
1437
+ # that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1438
+ # @param [String] update_mask
1439
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1440
+ # User resource by the update. The fields specified in the update_mask are
1441
+ # relative to the resource, not the full request. A field will be overwritten if
1442
+ # it is in the mask. If the user does not provide a mask then all fields will be
1443
+ # overwritten.
1444
+ # @param [Boolean] validate_only
1445
+ # Optional. If set, the backend validates the request, but doesn't actually
1446
+ # execute it.
1447
+ # @param [String] fields
1448
+ # Selector specifying which fields to include in a partial response.
1449
+ # @param [String] quota_user
1450
+ # Available to use for quota purposes for server-side applications. Can be any
1451
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1452
+ # @param [Google::Apis::RequestOptions] options
1453
+ # Request-specific options
1454
+ #
1455
+ # @yield [result, err] Result & error if block supplied
1456
+ # @yieldparam result [Google::Apis::AlloydbV1beta::User] parsed result object
1457
+ # @yieldparam err [StandardError] error object if request failed
1458
+ #
1459
+ # @return [Google::Apis::AlloydbV1beta::User]
1460
+ #
1461
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1462
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1463
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1464
+ def patch_project_location_cluster_user(name, user_object = nil, allow_missing: nil, request_id: nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
1465
+ command = make_simple_command(:patch, 'v1beta/{+name}', options)
1466
+ command.request_representation = Google::Apis::AlloydbV1beta::User::Representation
1467
+ command.request_object = user_object
1468
+ command.response_representation = Google::Apis::AlloydbV1beta::User::Representation
1469
+ command.response_class = Google::Apis::AlloydbV1beta::User
1470
+ command.params['name'] = name unless name.nil?
1471
+ command.query['allowMissing'] = allow_missing unless allow_missing.nil?
1472
+ command.query['requestId'] = request_id unless request_id.nil?
1473
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1474
+ command.query['validateOnly'] = validate_only unless validate_only.nil?
1475
+ command.query['fields'] = fields unless fields.nil?
1476
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1477
+ execute_or_queue_command(command, &block)
1478
+ end
1479
+
1480
+ # Starts asynchronous cancellation on a long-running operation. The server makes
1481
+ # a best effort to cancel the operation, but success is not guaranteed. If the
1482
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1483
+ # Clients can use Operations.GetOperation or other methods to check whether the
1484
+ # cancellation succeeded or whether the operation completed despite cancellation.
1485
+ # On successful cancellation, the operation is not deleted; instead, it becomes
1486
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
1487
+ # corresponding to `Code.CANCELLED`.
1488
+ # @param [String] name
1489
+ # The name of the operation resource to be cancelled.
1490
+ # @param [String] fields
1491
+ # Selector specifying which fields to include in a partial response.
1492
+ # @param [String] quota_user
1493
+ # Available to use for quota purposes for server-side applications. Can be any
1494
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1495
+ # @param [Google::Apis::RequestOptions] options
1496
+ # Request-specific options
1497
+ #
1498
+ # @yield [result, err] Result & error if block supplied
1499
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Empty] parsed result object
1500
+ # @yieldparam err [StandardError] error object if request failed
1501
+ #
1502
+ # @return [Google::Apis::AlloydbV1beta::Empty]
1503
+ #
1504
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1505
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1506
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1507
+ def cancel_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1508
+ command = make_simple_command(:post, 'v1beta/{+name}:cancel', options)
1509
+ command.response_representation = Google::Apis::AlloydbV1beta::Empty::Representation
1510
+ command.response_class = Google::Apis::AlloydbV1beta::Empty
1511
+ command.params['name'] = name unless name.nil?
1512
+ command.query['fields'] = fields unless fields.nil?
1513
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1514
+ execute_or_queue_command(command, &block)
1515
+ end
1516
+
1517
+ # Deletes a long-running operation. This method indicates that the client is no
1518
+ # longer interested in the operation result. It does not cancel the operation.
1519
+ # If the server doesn't support this method, it returns `google.rpc.Code.
1520
+ # UNIMPLEMENTED`.
1521
+ # @param [String] name
1522
+ # The name of the operation resource to be deleted.
1523
+ # @param [String] fields
1524
+ # Selector specifying which fields to include in a partial response.
1525
+ # @param [String] quota_user
1526
+ # Available to use for quota purposes for server-side applications. Can be any
1527
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1528
+ # @param [Google::Apis::RequestOptions] options
1529
+ # Request-specific options
1530
+ #
1531
+ # @yield [result, err] Result & error if block supplied
1532
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Empty] parsed result object
1533
+ # @yieldparam err [StandardError] error object if request failed
1534
+ #
1535
+ # @return [Google::Apis::AlloydbV1beta::Empty]
1536
+ #
1537
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1538
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1539
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1540
+ def delete_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1541
+ command = make_simple_command(:delete, 'v1beta/{+name}', options)
1542
+ command.response_representation = Google::Apis::AlloydbV1beta::Empty::Representation
1543
+ command.response_class = Google::Apis::AlloydbV1beta::Empty
1544
+ command.params['name'] = name unless name.nil?
1545
+ command.query['fields'] = fields unless fields.nil?
1546
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1547
+ execute_or_queue_command(command, &block)
1548
+ end
1549
+
1550
+ # Gets the latest state of a long-running operation. Clients can use this method
1551
+ # to poll the operation result at intervals as recommended by the API service.
1552
+ # @param [String] name
1553
+ # The name of the operation resource.
1554
+ # @param [String] fields
1555
+ # Selector specifying which fields to include in a partial response.
1556
+ # @param [String] quota_user
1557
+ # Available to use for quota purposes for server-side applications. Can be any
1558
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1559
+ # @param [Google::Apis::RequestOptions] options
1560
+ # Request-specific options
1561
+ #
1562
+ # @yield [result, err] Result & error if block supplied
1563
+ # @yieldparam result [Google::Apis::AlloydbV1beta::Operation] parsed result object
1564
+ # @yieldparam err [StandardError] error object if request failed
1565
+ #
1566
+ # @return [Google::Apis::AlloydbV1beta::Operation]
1567
+ #
1568
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1569
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1570
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1571
+ def get_project_location_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1572
+ command = make_simple_command(:get, 'v1beta/{+name}', options)
1573
+ command.response_representation = Google::Apis::AlloydbV1beta::Operation::Representation
1574
+ command.response_class = Google::Apis::AlloydbV1beta::Operation
1575
+ command.params['name'] = name unless name.nil?
1576
+ command.query['fields'] = fields unless fields.nil?
1577
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1578
+ execute_or_queue_command(command, &block)
1579
+ end
1580
+
1581
+ # Lists operations that match the specified filter in the request. If the server
1582
+ # doesn't support this method, it returns `UNIMPLEMENTED`.
1583
+ # @param [String] name
1584
+ # The name of the operation's parent resource.
1585
+ # @param [String] filter
1586
+ # The standard list filter.
1587
+ # @param [Fixnum] page_size
1588
+ # The standard list page size.
1589
+ # @param [String] page_token
1590
+ # The standard list page token.
1591
+ # @param [String] fields
1592
+ # Selector specifying which fields to include in a partial response.
1593
+ # @param [String] quota_user
1594
+ # Available to use for quota purposes for server-side applications. Can be any
1595
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1596
+ # @param [Google::Apis::RequestOptions] options
1597
+ # Request-specific options
1598
+ #
1599
+ # @yield [result, err] Result & error if block supplied
1600
+ # @yieldparam result [Google::Apis::AlloydbV1beta::ListOperationsResponse] parsed result object
1601
+ # @yieldparam err [StandardError] error object if request failed
1602
+ #
1603
+ # @return [Google::Apis::AlloydbV1beta::ListOperationsResponse]
1604
+ #
1605
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1606
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1607
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1608
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1609
+ command = make_simple_command(:get, 'v1beta/{+name}/operations', options)
1610
+ command.response_representation = Google::Apis::AlloydbV1beta::ListOperationsResponse::Representation
1611
+ command.response_class = Google::Apis::AlloydbV1beta::ListOperationsResponse
1612
+ command.params['name'] = name unless name.nil?
1613
+ command.query['filter'] = filter unless filter.nil?
1614
+ command.query['pageSize'] = page_size unless page_size.nil?
1615
+ command.query['pageToken'] = page_token unless page_token.nil?
1616
+ command.query['fields'] = fields unless fields.nil?
1617
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1618
+ execute_or_queue_command(command, &block)
1619
+ end
1620
+
1621
+ # Lists SupportedDatabaseFlags for a given project and location.
1622
+ # @param [String] parent
1623
+ # Required. The name of the parent resource. The required format is: * projects/`
1624
+ # project`/locations/`location` Regardless of the parent specified here, as long
1625
+ # it is contains a valid project and location, the service will return a static
1626
+ # list of supported flags resources. Note that we do not yet support region-
1627
+ # specific flags.
1628
+ # @param [Fixnum] page_size
1629
+ # Requested page size. Server may return fewer items than requested. If
1630
+ # unspecified, server will pick an appropriate default.
1631
+ # @param [String] page_token
1632
+ # A token identifying a page of results the server should return.
1633
+ # @param [String] fields
1634
+ # Selector specifying which fields to include in a partial response.
1635
+ # @param [String] quota_user
1636
+ # Available to use for quota purposes for server-side applications. Can be any
1637
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1638
+ # @param [Google::Apis::RequestOptions] options
1639
+ # Request-specific options
1640
+ #
1641
+ # @yield [result, err] Result & error if block supplied
1642
+ # @yieldparam result [Google::Apis::AlloydbV1beta::ListSupportedDatabaseFlagsResponse] parsed result object
1643
+ # @yieldparam err [StandardError] error object if request failed
1644
+ #
1645
+ # @return [Google::Apis::AlloydbV1beta::ListSupportedDatabaseFlagsResponse]
1646
+ #
1647
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1648
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1649
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1650
+ def list_project_location_supported_database_flags(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1651
+ command = make_simple_command(:get, 'v1beta/{+parent}/supportedDatabaseFlags', options)
1652
+ command.response_representation = Google::Apis::AlloydbV1beta::ListSupportedDatabaseFlagsResponse::Representation
1653
+ command.response_class = Google::Apis::AlloydbV1beta::ListSupportedDatabaseFlagsResponse
1654
+ command.params['parent'] = parent unless parent.nil?
1655
+ command.query['pageSize'] = page_size unless page_size.nil?
1656
+ command.query['pageToken'] = page_token unless page_token.nil?
1657
+ command.query['fields'] = fields unless fields.nil?
1658
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1659
+ execute_or_queue_command(command, &block)
1660
+ end
1661
+
1662
+ protected
1663
+
1664
+ def apply_command_defaults(command)
1665
+ command.query['key'] = key unless key.nil?
1666
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1667
+ end
1668
+ end
1669
+ end
1670
+ end
1671
+ end