google-apis-sqladmin_v1beta4 0.41.0 → 0.93.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +217 -0
- data/OVERVIEW.md +3 -3
- data/lib/google/apis/sqladmin_v1beta4/classes.rb +2670 -66
- data/lib/google/apis/sqladmin_v1beta4/gem_version.rb +3 -3
- data/lib/google/apis/sqladmin_v1beta4/representations.rb +991 -0
- data/lib/google/apis/sqladmin_v1beta4/service.rb +903 -105
- data/lib/google/apis/sqladmin_v1beta4.rb +1 -1
- metadata +7 -10
|
@@ -30,8 +30,10 @@ module Google
|
|
|
30
30
|
# Sqladmin = Google::Apis::SqladminV1beta4 # Alias the module
|
|
31
31
|
# service = Sqladmin::SQLAdminService.new
|
|
32
32
|
#
|
|
33
|
-
# @see https://
|
|
33
|
+
# @see https://cloud.google.com/sql/docs
|
|
34
34
|
class SQLAdminService < Google::Apis::Core::BaseService
|
|
35
|
+
DEFAULT_ENDPOINT_TEMPLATE = "https://sqladmin.$UNIVERSE_DOMAIN$/"
|
|
36
|
+
|
|
35
37
|
# @return [String]
|
|
36
38
|
# API key. Your API key identifies your project and provides you with API access,
|
|
37
39
|
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
|
@@ -43,7 +45,7 @@ module Google
|
|
|
43
45
|
attr_accessor :quota_user
|
|
44
46
|
|
|
45
47
|
def initialize
|
|
46
|
-
super(
|
|
48
|
+
super(DEFAULT_ENDPOINT_TEMPLATE, '',
|
|
47
49
|
client_name: 'google-apis-sqladmin_v1beta4',
|
|
48
50
|
client_version: Google::Apis::SqladminV1beta4::GEM_VERSION)
|
|
49
51
|
@batch_path = 'batch'
|
|
@@ -201,6 +203,190 @@ module Google
|
|
|
201
203
|
execute_or_queue_command(command, &block)
|
|
202
204
|
end
|
|
203
205
|
|
|
206
|
+
# Creates a backup for a Cloud SQL instance. This API can be used only to create
|
|
207
|
+
# on-demand backups.
|
|
208
|
+
# @param [String] parent
|
|
209
|
+
# Required. The parent resource where this backup is created. Format: projects/`
|
|
210
|
+
# project`
|
|
211
|
+
# @param [Google::Apis::SqladminV1beta4::Backup] backup_object
|
|
212
|
+
# @param [String] fields
|
|
213
|
+
# Selector specifying which fields to include in a partial response.
|
|
214
|
+
# @param [String] quota_user
|
|
215
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
216
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
217
|
+
# @param [Google::Apis::RequestOptions] options
|
|
218
|
+
# Request-specific options
|
|
219
|
+
#
|
|
220
|
+
# @yield [result, err] Result & error if block supplied
|
|
221
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
222
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
223
|
+
#
|
|
224
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
225
|
+
#
|
|
226
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
227
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
228
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
229
|
+
def create_backup_backup(parent, backup_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
230
|
+
command = make_simple_command(:post, 'sql/v1beta4/{+parent}/backups', options)
|
|
231
|
+
command.request_representation = Google::Apis::SqladminV1beta4::Backup::Representation
|
|
232
|
+
command.request_object = backup_object
|
|
233
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
234
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
235
|
+
command.params['parent'] = parent unless parent.nil?
|
|
236
|
+
command.query['fields'] = fields unless fields.nil?
|
|
237
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
238
|
+
execute_or_queue_command(command, &block)
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Deletes the backup.
|
|
242
|
+
# @param [String] name
|
|
243
|
+
# Required. The name of the backup to delete. Format: projects/`project`/backups/
|
|
244
|
+
# `backup`
|
|
245
|
+
# @param [String] fields
|
|
246
|
+
# Selector specifying which fields to include in a partial response.
|
|
247
|
+
# @param [String] quota_user
|
|
248
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
249
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
250
|
+
# @param [Google::Apis::RequestOptions] options
|
|
251
|
+
# Request-specific options
|
|
252
|
+
#
|
|
253
|
+
# @yield [result, err] Result & error if block supplied
|
|
254
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
255
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
256
|
+
#
|
|
257
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
258
|
+
#
|
|
259
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
260
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
261
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
262
|
+
def delete_backup_backup(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
263
|
+
command = make_simple_command(:delete, 'sql/v1beta4/{+name}', options)
|
|
264
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
265
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
266
|
+
command.params['name'] = name unless name.nil?
|
|
267
|
+
command.query['fields'] = fields unless fields.nil?
|
|
268
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
269
|
+
execute_or_queue_command(command, &block)
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Retrieves a resource containing information about a backup.
|
|
273
|
+
# @param [String] name
|
|
274
|
+
# Required. The name of the backup to retrieve. Format: projects/`project`/
|
|
275
|
+
# backups/`backup`
|
|
276
|
+
# @param [String] fields
|
|
277
|
+
# Selector specifying which fields to include in a partial response.
|
|
278
|
+
# @param [String] quota_user
|
|
279
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
280
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
281
|
+
# @param [Google::Apis::RequestOptions] options
|
|
282
|
+
# Request-specific options
|
|
283
|
+
#
|
|
284
|
+
# @yield [result, err] Result & error if block supplied
|
|
285
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Backup] parsed result object
|
|
286
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
287
|
+
#
|
|
288
|
+
# @return [Google::Apis::SqladminV1beta4::Backup]
|
|
289
|
+
#
|
|
290
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
291
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
292
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
293
|
+
def get_backup_backup(name, fields: nil, quota_user: nil, options: nil, &block)
|
|
294
|
+
command = make_simple_command(:get, 'sql/v1beta4/{+name}', options)
|
|
295
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Backup::Representation
|
|
296
|
+
command.response_class = Google::Apis::SqladminV1beta4::Backup
|
|
297
|
+
command.params['name'] = name unless name.nil?
|
|
298
|
+
command.query['fields'] = fields unless fields.nil?
|
|
299
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
300
|
+
execute_or_queue_command(command, &block)
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Lists all backups associated with the project.
|
|
304
|
+
# @param [String] parent
|
|
305
|
+
# Required. The parent that owns this collection of backups. Format: projects/`
|
|
306
|
+
# project`
|
|
307
|
+
# @param [String] filter
|
|
308
|
+
# Multiple filter queries are separated by spaces. For example, 'instance:abc
|
|
309
|
+
# AND type:FINAL, 'location:us', 'backupInterval.startTime>=1950-01-01T01:01:25.
|
|
310
|
+
# 771Z'. You can filter by type, instance, backupInterval.startTime (creation
|
|
311
|
+
# time), or location.
|
|
312
|
+
# @param [Fixnum] page_size
|
|
313
|
+
# The maximum number of backups to return per response. The service might return
|
|
314
|
+
# fewer backups than this value. If a value for this parameter isn't specified,
|
|
315
|
+
# then, at most, 500 backups are returned. The maximum value is 2,000. Any
|
|
316
|
+
# values that you set, which are greater than 2,000, are changed to 2,000.
|
|
317
|
+
# @param [String] page_token
|
|
318
|
+
# A page token, received from a previous `ListBackups` call. Provide this to
|
|
319
|
+
# retrieve the subsequent page. When paginating, all other parameters provided
|
|
320
|
+
# to `ListBackups` must match the call that provided the page token.
|
|
321
|
+
# @param [String] fields
|
|
322
|
+
# Selector specifying which fields to include in a partial response.
|
|
323
|
+
# @param [String] quota_user
|
|
324
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
325
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
326
|
+
# @param [Google::Apis::RequestOptions] options
|
|
327
|
+
# Request-specific options
|
|
328
|
+
#
|
|
329
|
+
# @yield [result, err] Result & error if block supplied
|
|
330
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::ListBackupsResponse] parsed result object
|
|
331
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
332
|
+
#
|
|
333
|
+
# @return [Google::Apis::SqladminV1beta4::ListBackupsResponse]
|
|
334
|
+
#
|
|
335
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
336
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
337
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
338
|
+
def list_backup_backups(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
339
|
+
command = make_simple_command(:get, 'sql/v1beta4/{+parent}/backups', options)
|
|
340
|
+
command.response_representation = Google::Apis::SqladminV1beta4::ListBackupsResponse::Representation
|
|
341
|
+
command.response_class = Google::Apis::SqladminV1beta4::ListBackupsResponse
|
|
342
|
+
command.params['parent'] = parent unless parent.nil?
|
|
343
|
+
command.query['filter'] = filter unless filter.nil?
|
|
344
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
345
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
346
|
+
command.query['fields'] = fields unless fields.nil?
|
|
347
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
348
|
+
execute_or_queue_command(command, &block)
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Updates the retention period and the description of the backup. You can use
|
|
352
|
+
# this API to update final backups only.
|
|
353
|
+
# @param [String] name
|
|
354
|
+
# Output only. The resource name of the backup. Format: projects/`project`/
|
|
355
|
+
# backups/`backup`.
|
|
356
|
+
# @param [Google::Apis::SqladminV1beta4::Backup] backup_object
|
|
357
|
+
# @param [String] update_mask
|
|
358
|
+
# The list of fields that you can update. You can update only the description
|
|
359
|
+
# and retention period of the final backup.
|
|
360
|
+
# @param [String] fields
|
|
361
|
+
# Selector specifying which fields to include in a partial response.
|
|
362
|
+
# @param [String] quota_user
|
|
363
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
364
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
365
|
+
# @param [Google::Apis::RequestOptions] options
|
|
366
|
+
# Request-specific options
|
|
367
|
+
#
|
|
368
|
+
# @yield [result, err] Result & error if block supplied
|
|
369
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
370
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
371
|
+
#
|
|
372
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
373
|
+
#
|
|
374
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
375
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
376
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
377
|
+
def update_backup_backup(name, backup_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
378
|
+
command = make_simple_command(:patch, 'sql/v1beta4/{+name}', options)
|
|
379
|
+
command.request_representation = Google::Apis::SqladminV1beta4::Backup::Representation
|
|
380
|
+
command.request_object = backup_object
|
|
381
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
382
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
383
|
+
command.params['name'] = name unless name.nil?
|
|
384
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
|
385
|
+
command.query['fields'] = fields unless fields.nil?
|
|
386
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
387
|
+
execute_or_queue_command(command, &block)
|
|
388
|
+
end
|
|
389
|
+
|
|
204
390
|
# Generates a short-lived X509 certificate containing the provided public key
|
|
205
391
|
# and signed by a private key specific to the target instance. Users may use the
|
|
206
392
|
# certificate to authenticate as themselves when connecting to the database.
|
|
@@ -349,7 +535,7 @@ module Google
|
|
|
349
535
|
end
|
|
350
536
|
|
|
351
537
|
# Inserts a resource containing information about a database inside a Cloud SQL
|
|
352
|
-
# instance.
|
|
538
|
+
# instance. **Note:** You can't modify the default character set and collation.
|
|
353
539
|
# @param [String] project
|
|
354
540
|
# Project ID of the project that contains the instance.
|
|
355
541
|
# @param [String] instance
|
|
@@ -502,6 +688,9 @@ module Google
|
|
|
502
688
|
# @param [String] database_version
|
|
503
689
|
# Database type and version you want to retrieve flags for. By default, this
|
|
504
690
|
# method returns flags for all database types and versions.
|
|
691
|
+
# @param [String] flag_scope
|
|
692
|
+
# Optional. Specify the scope of flags to be returned by SqlFlagsListService.
|
|
693
|
+
# Return list of database flags if unspecified.
|
|
505
694
|
# @param [String] fields
|
|
506
695
|
# Selector specifying which fields to include in a partial response.
|
|
507
696
|
# @param [String] quota_user
|
|
@@ -519,25 +708,27 @@ module Google
|
|
|
519
708
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
520
709
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
521
710
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
522
|
-
def list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
711
|
+
def list_flags(database_version: nil, flag_scope: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
523
712
|
command = make_simple_command(:get, 'sql/v1beta4/flags', options)
|
|
524
713
|
command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation
|
|
525
714
|
command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse
|
|
526
715
|
command.query['databaseVersion'] = database_version unless database_version.nil?
|
|
716
|
+
command.query['flagScope'] = flag_scope unless flag_scope.nil?
|
|
527
717
|
command.query['fields'] = fields unless fields.nil?
|
|
528
718
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
529
719
|
execute_or_queue_command(command, &block)
|
|
530
720
|
end
|
|
531
721
|
|
|
532
|
-
#
|
|
533
|
-
# instance.
|
|
534
|
-
#
|
|
535
|
-
#
|
|
536
|
-
#
|
|
722
|
+
# Lists all versions of server certificates and certificate authorities (CAs)
|
|
723
|
+
# for the specified instance. There can be up to three sets of certs listed: the
|
|
724
|
+
# certificate that is currently in use, a future that has been added but not yet
|
|
725
|
+
# used to sign a certificate, and a certificate that has been rotated out. For
|
|
726
|
+
# instances not using Certificate Authority Service (CAS) server CA, use
|
|
727
|
+
# ListServerCas instead.
|
|
537
728
|
# @param [String] project
|
|
538
|
-
# Project ID of the project that contains the instance.
|
|
729
|
+
# Required. Project ID of the project that contains the instance.
|
|
539
730
|
# @param [String] instance
|
|
540
|
-
# Cloud SQL instance ID. This does not include the project ID.
|
|
731
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
541
732
|
# @param [String] fields
|
|
542
733
|
# Selector specifying which fields to include in a partial response.
|
|
543
734
|
# @param [String] quota_user
|
|
@@ -547,18 +738,18 @@ module Google
|
|
|
547
738
|
# Request-specific options
|
|
548
739
|
#
|
|
549
740
|
# @yield [result, err] Result & error if block supplied
|
|
550
|
-
# @yieldparam result [Google::Apis::SqladminV1beta4::
|
|
741
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse] parsed result object
|
|
551
742
|
# @yieldparam err [StandardError] error object if request failed
|
|
552
743
|
#
|
|
553
|
-
# @return [Google::Apis::SqladminV1beta4::
|
|
744
|
+
# @return [Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse]
|
|
554
745
|
#
|
|
555
746
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
556
747
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
557
748
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
558
|
-
def
|
|
559
|
-
command = make_simple_command(:
|
|
560
|
-
command.response_representation = Google::Apis::SqladminV1beta4::
|
|
561
|
-
command.response_class = Google::Apis::SqladminV1beta4::
|
|
749
|
+
def list_instance_server_certificates(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
|
750
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/listServerCertificates', options)
|
|
751
|
+
command.response_representation = Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse::Representation
|
|
752
|
+
command.response_class = Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse
|
|
562
753
|
command.params['project'] = project unless project.nil?
|
|
563
754
|
command.params['instance'] = instance unless instance.nil?
|
|
564
755
|
command.query['fields'] = fields unless fields.nil?
|
|
@@ -566,14 +757,14 @@ module Google
|
|
|
566
757
|
execute_or_queue_command(command, &block)
|
|
567
758
|
end
|
|
568
759
|
|
|
569
|
-
#
|
|
570
|
-
#
|
|
760
|
+
# Rotates the server certificate version to one previously added with the
|
|
761
|
+
# addServerCertificate method. For instances not using Certificate Authority
|
|
762
|
+
# Service (CAS) server CA, use RotateServerCa instead.
|
|
571
763
|
# @param [String] project
|
|
572
|
-
# Project ID of the
|
|
764
|
+
# Required. Project ID of the project that contains the instance.
|
|
573
765
|
# @param [String] instance
|
|
574
|
-
#
|
|
575
|
-
#
|
|
576
|
-
# @param [Google::Apis::SqladminV1beta4::CloneInstancesRequest] clone_instances_request_object
|
|
766
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
767
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesRotateServerCertificateRequest] instances_rotate_server_certificate_request_object
|
|
577
768
|
# @param [String] fields
|
|
578
769
|
# Selector specifying which fields to include in a partial response.
|
|
579
770
|
# @param [String] quota_user
|
|
@@ -591,10 +782,10 @@ module Google
|
|
|
591
782
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
592
783
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
593
784
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
594
|
-
def
|
|
595
|
-
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/
|
|
596
|
-
command.request_representation = Google::Apis::SqladminV1beta4::
|
|
597
|
-
command.request_object =
|
|
785
|
+
def rotate_instance_server_certificate(project, instance, instances_rotate_server_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
786
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCertificate', options)
|
|
787
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesRotateServerCertificateRequest::Representation
|
|
788
|
+
command.request_object = instances_rotate_server_certificate_request_object
|
|
598
789
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
599
790
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
600
791
|
command.params['project'] = project unless project.nil?
|
|
@@ -604,11 +795,14 @@ module Google
|
|
|
604
795
|
execute_or_queue_command(command, &block)
|
|
605
796
|
end
|
|
606
797
|
|
|
607
|
-
#
|
|
798
|
+
# Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
|
|
608
799
|
# @param [String] project
|
|
609
|
-
#
|
|
800
|
+
# Required. ID of the project that contains the instance (Example: project-id).
|
|
610
801
|
# @param [String] instance
|
|
611
|
-
# Cloud SQL instance ID. This
|
|
802
|
+
# Required. Cloud SQL instance ID. This doesn't include the project ID. It's
|
|
803
|
+
# composed of lowercase letters, numbers, and hyphens, and it must start with a
|
|
804
|
+
# letter. The total length must be 98 characters or less (Example: instance-id).
|
|
805
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesAcquireSsrsLeaseRequest] instances_acquire_ssrs_lease_request_object
|
|
612
806
|
# @param [String] fields
|
|
613
807
|
# Selector specifying which fields to include in a partial response.
|
|
614
808
|
# @param [String] quota_user
|
|
@@ -618,18 +812,20 @@ module Google
|
|
|
618
812
|
# Request-specific options
|
|
619
813
|
#
|
|
620
814
|
# @yield [result, err] Result & error if block supplied
|
|
621
|
-
# @yieldparam result [Google::Apis::SqladminV1beta4::
|
|
815
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse] parsed result object
|
|
622
816
|
# @yieldparam err [StandardError] error object if request failed
|
|
623
817
|
#
|
|
624
|
-
# @return [Google::Apis::SqladminV1beta4::
|
|
818
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse]
|
|
625
819
|
#
|
|
626
820
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
627
821
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
628
822
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
629
|
-
def
|
|
630
|
-
command = make_simple_command(:
|
|
631
|
-
command.
|
|
632
|
-
command.
|
|
823
|
+
def acquire_instance_ssrs_lease(project, instance, instances_acquire_ssrs_lease_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
824
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease', options)
|
|
825
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesAcquireSsrsLeaseRequest::Representation
|
|
826
|
+
command.request_object = instances_acquire_ssrs_lease_request_object
|
|
827
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse::Representation
|
|
828
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse
|
|
633
829
|
command.params['project'] = project unless project.nil?
|
|
634
830
|
command.params['instance'] = instance unless instance.nil?
|
|
635
831
|
command.query['fields'] = fields unless fields.nil?
|
|
@@ -637,13 +833,16 @@ module Google
|
|
|
637
833
|
execute_or_queue_command(command, &block)
|
|
638
834
|
end
|
|
639
835
|
|
|
640
|
-
#
|
|
641
|
-
#
|
|
836
|
+
# Add a new trusted Certificate Authority (CA) version for the specified
|
|
837
|
+
# instance. Required to prepare for a certificate rotation. If a CA version was
|
|
838
|
+
# previously added but never used in a certificate rotation, this operation
|
|
839
|
+
# replaces that version. There cannot be more than one CA version waiting to be
|
|
840
|
+
# rotated in. For instances that have enabled Certificate Authority Service (CAS)
|
|
841
|
+
# based server CA, use AddServerCertificate to add a new server certificate.
|
|
642
842
|
# @param [String] project
|
|
643
|
-
# ID of the project that contains the instance.
|
|
843
|
+
# Project ID of the project that contains the instance.
|
|
644
844
|
# @param [String] instance
|
|
645
|
-
# Cloud SQL instance
|
|
646
|
-
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest] instances_demote_master_request_object
|
|
845
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
|
647
846
|
# @param [String] fields
|
|
648
847
|
# Selector specifying which fields to include in a partial response.
|
|
649
848
|
# @param [String] quota_user
|
|
@@ -661,10 +860,8 @@ module Google
|
|
|
661
860
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
662
861
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
663
862
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
664
|
-
def
|
|
665
|
-
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/
|
|
666
|
-
command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest::Representation
|
|
667
|
-
command.request_object = instances_demote_master_request_object
|
|
863
|
+
def add_instance_server_ca(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
|
864
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/addServerCa', options)
|
|
668
865
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
669
866
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
670
867
|
command.params['project'] = project unless project.nil?
|
|
@@ -674,13 +871,16 @@ module Google
|
|
|
674
871
|
execute_or_queue_command(command, &block)
|
|
675
872
|
end
|
|
676
873
|
|
|
677
|
-
#
|
|
678
|
-
#
|
|
874
|
+
# Add a new trusted server certificate version for the specified instance using
|
|
875
|
+
# Certificate Authority Service (CAS) server CA. Required to prepare for a
|
|
876
|
+
# certificate rotation. If a server certificate version was previously added but
|
|
877
|
+
# never used in a certificate rotation, this operation replaces that version.
|
|
878
|
+
# There cannot be more than one certificate version waiting to be rotated in.
|
|
879
|
+
# For instances not using CAS server CA, use AddServerCa instead.
|
|
679
880
|
# @param [String] project
|
|
680
|
-
# Project ID of the project that contains the instance
|
|
881
|
+
# Required. Project ID of the project that contains the instance.
|
|
681
882
|
# @param [String] instance
|
|
682
|
-
# Cloud SQL instance ID. This does not include the project ID.
|
|
683
|
-
# @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object
|
|
883
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
684
884
|
# @param [String] fields
|
|
685
885
|
# Selector specifying which fields to include in a partial response.
|
|
686
886
|
# @param [String] quota_user
|
|
@@ -698,10 +898,8 @@ module Google
|
|
|
698
898
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
699
899
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
700
900
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
701
|
-
def
|
|
702
|
-
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/
|
|
703
|
-
command.request_representation = Google::Apis::SqladminV1beta4::ExportInstancesRequest::Representation
|
|
704
|
-
command.request_object = export_instances_request_object
|
|
901
|
+
def add_instance_server_certificate(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
|
902
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/addServerCertificate', options)
|
|
705
903
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
706
904
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
707
905
|
command.params['project'] = project unless project.nil?
|
|
@@ -711,17 +909,14 @@ module Google
|
|
|
711
909
|
execute_or_queue_command(command, &block)
|
|
712
910
|
end
|
|
713
911
|
|
|
714
|
-
#
|
|
715
|
-
#
|
|
716
|
-
# to the new primary. For more information, see the [Overview of high
|
|
717
|
-
# availability](https://cloud.google.com/sql/docs/mysql/high-availability) page
|
|
718
|
-
# in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes
|
|
719
|
-
# the instance to failover to its failover replica instance.
|
|
912
|
+
# Creates a Cloud SQL instance as a clone of the source instance. Using this
|
|
913
|
+
# operation might cause your instance to restart.
|
|
720
914
|
# @param [String] project
|
|
721
|
-
# ID of the
|
|
915
|
+
# Project ID of the source as well as the clone Cloud SQL instance.
|
|
722
916
|
# @param [String] instance
|
|
723
|
-
# Cloud SQL instance
|
|
724
|
-
#
|
|
917
|
+
# The ID of the Cloud SQL instance to be cloned (source). This does not include
|
|
918
|
+
# the project ID.
|
|
919
|
+
# @param [Google::Apis::SqladminV1beta4::CloneInstancesRequest] clone_instances_request_object
|
|
725
920
|
# @param [String] fields
|
|
726
921
|
# Selector specifying which fields to include in a partial response.
|
|
727
922
|
# @param [String] quota_user
|
|
@@ -739,10 +934,10 @@ module Google
|
|
|
739
934
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
740
935
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
741
936
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
742
|
-
def
|
|
743
|
-
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/
|
|
744
|
-
command.request_representation = Google::Apis::SqladminV1beta4::
|
|
745
|
-
command.request_object =
|
|
937
|
+
def clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
938
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/clone', options)
|
|
939
|
+
command.request_representation = Google::Apis::SqladminV1beta4::CloneInstancesRequest::Representation
|
|
940
|
+
command.request_object = clone_instances_request_object
|
|
746
941
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
747
942
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
748
943
|
command.params['project'] = project unless project.nil?
|
|
@@ -752,11 +947,20 @@ module Google
|
|
|
752
947
|
execute_or_queue_command(command, &block)
|
|
753
948
|
end
|
|
754
949
|
|
|
755
|
-
#
|
|
950
|
+
# Deletes a Cloud SQL instance.
|
|
756
951
|
# @param [String] project
|
|
757
|
-
# Project ID of the project that contains the instance.
|
|
952
|
+
# Project ID of the project that contains the instance to be deleted.
|
|
758
953
|
# @param [String] instance
|
|
759
|
-
#
|
|
954
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
|
955
|
+
# @param [Boolean] enable_final_backup
|
|
956
|
+
# Flag to opt-in for final backup. By default, it is turned off.
|
|
957
|
+
# @param [String] final_backup_description
|
|
958
|
+
# Optional. The description of the final backup.
|
|
959
|
+
# @param [String] final_backup_expiry_time
|
|
960
|
+
# Optional. Final Backup expiration time. Timestamp in UTC of when this resource
|
|
961
|
+
# is considered expired.
|
|
962
|
+
# @param [Fixnum] final_backup_ttl_days
|
|
963
|
+
# Optional. Retention period of the final backup.
|
|
760
964
|
# @param [String] fields
|
|
761
965
|
# Selector specifying which fields to include in a partial response.
|
|
762
966
|
# @param [String] quota_user
|
|
@@ -766,32 +970,36 @@ module Google
|
|
|
766
970
|
# Request-specific options
|
|
767
971
|
#
|
|
768
972
|
# @yield [result, err] Result & error if block supplied
|
|
769
|
-
# @yieldparam result [Google::Apis::SqladminV1beta4::
|
|
973
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
770
974
|
# @yieldparam err [StandardError] error object if request failed
|
|
771
975
|
#
|
|
772
|
-
# @return [Google::Apis::SqladminV1beta4::
|
|
976
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
773
977
|
#
|
|
774
978
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
775
979
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
776
980
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
777
|
-
def
|
|
778
|
-
command = make_simple_command(:
|
|
779
|
-
command.response_representation = Google::Apis::SqladminV1beta4::
|
|
780
|
-
command.response_class = Google::Apis::SqladminV1beta4::
|
|
981
|
+
def delete_instance(project, instance, enable_final_backup: nil, final_backup_description: nil, final_backup_expiry_time: nil, final_backup_ttl_days: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
982
|
+
command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
|
|
983
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
984
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
781
985
|
command.params['project'] = project unless project.nil?
|
|
782
986
|
command.params['instance'] = instance unless instance.nil?
|
|
987
|
+
command.query['enableFinalBackup'] = enable_final_backup unless enable_final_backup.nil?
|
|
988
|
+
command.query['finalBackupDescription'] = final_backup_description unless final_backup_description.nil?
|
|
989
|
+
command.query['finalBackupExpiryTime'] = final_backup_expiry_time unless final_backup_expiry_time.nil?
|
|
990
|
+
command.query['finalBackupTtlDays'] = final_backup_ttl_days unless final_backup_ttl_days.nil?
|
|
783
991
|
command.query['fields'] = fields unless fields.nil?
|
|
784
992
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
785
993
|
execute_or_queue_command(command, &block)
|
|
786
994
|
end
|
|
787
995
|
|
|
788
|
-
#
|
|
789
|
-
#
|
|
996
|
+
# Demotes an existing standalone instance to be a Cloud SQL read replica for an
|
|
997
|
+
# external database server.
|
|
790
998
|
# @param [String] project
|
|
791
|
-
#
|
|
999
|
+
# Required. The project ID of the project that contains the instance.
|
|
792
1000
|
# @param [String] instance
|
|
793
|
-
#
|
|
794
|
-
# @param [Google::Apis::SqladminV1beta4::
|
|
1001
|
+
# Required. The name of the Cloud SQL instance.
|
|
1002
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteRequest] instances_demote_request_object
|
|
795
1003
|
# @param [String] fields
|
|
796
1004
|
# Selector specifying which fields to include in a partial response.
|
|
797
1005
|
# @param [String] quota_user
|
|
@@ -809,10 +1017,10 @@ module Google
|
|
|
809
1017
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
810
1018
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
811
1019
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
812
|
-
def
|
|
813
|
-
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/
|
|
814
|
-
command.request_representation = Google::Apis::SqladminV1beta4::
|
|
815
|
-
command.request_object =
|
|
1020
|
+
def demote_instance(project, instance, instances_demote_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1021
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/demote', options)
|
|
1022
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteRequest::Representation
|
|
1023
|
+
command.request_object = instances_demote_request_object
|
|
816
1024
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
817
1025
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
818
1026
|
command.params['project'] = project unless project.nil?
|
|
@@ -822,11 +1030,13 @@ module Google
|
|
|
822
1030
|
execute_or_queue_command(command, &block)
|
|
823
1031
|
end
|
|
824
1032
|
|
|
825
|
-
#
|
|
1033
|
+
# Demotes the stand-alone instance to be a Cloud SQL read replica for an
|
|
1034
|
+
# external database server.
|
|
826
1035
|
# @param [String] project
|
|
827
|
-
#
|
|
828
|
-
#
|
|
829
|
-
#
|
|
1036
|
+
# ID of the project that contains the instance.
|
|
1037
|
+
# @param [String] instance
|
|
1038
|
+
# Cloud SQL instance name.
|
|
1039
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest] instances_demote_master_request_object
|
|
830
1040
|
# @param [String] fields
|
|
831
1041
|
# Selector specifying which fields to include in a partial response.
|
|
832
1042
|
# @param [String] quota_user
|
|
@@ -844,26 +1054,245 @@ module Google
|
|
|
844
1054
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
845
1055
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
846
1056
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
847
|
-
def
|
|
848
|
-
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances', options)
|
|
849
|
-
command.request_representation = Google::Apis::SqladminV1beta4::
|
|
850
|
-
command.request_object =
|
|
1057
|
+
def demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1058
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster', options)
|
|
1059
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest::Representation
|
|
1060
|
+
command.request_object = instances_demote_master_request_object
|
|
851
1061
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
852
1062
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
853
1063
|
command.params['project'] = project unless project.nil?
|
|
1064
|
+
command.params['instance'] = instance unless instance.nil?
|
|
854
1065
|
command.query['fields'] = fields unless fields.nil?
|
|
855
1066
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
856
1067
|
execute_or_queue_command(command, &block)
|
|
857
1068
|
end
|
|
858
1069
|
|
|
859
|
-
#
|
|
1070
|
+
# Execute SQL statements.
|
|
860
1071
|
# @param [String] project
|
|
861
|
-
# Project ID of the project
|
|
862
|
-
# @param [String]
|
|
863
|
-
#
|
|
864
|
-
#
|
|
865
|
-
#
|
|
866
|
-
#
|
|
1072
|
+
# Required. Project ID of the project that contains the instance.
|
|
1073
|
+
# @param [String] instance
|
|
1074
|
+
# Required. Database instance ID. This does not include the project ID.
|
|
1075
|
+
# @param [Google::Apis::SqladminV1beta4::ExecuteSqlPayload] execute_sql_payload_object
|
|
1076
|
+
# @param [String] fields
|
|
1077
|
+
# Selector specifying which fields to include in a partial response.
|
|
1078
|
+
# @param [String] quota_user
|
|
1079
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1080
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1081
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1082
|
+
# Request-specific options
|
|
1083
|
+
#
|
|
1084
|
+
# @yield [result, err] Result & error if block supplied
|
|
1085
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesExecuteSqlResponse] parsed result object
|
|
1086
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1087
|
+
#
|
|
1088
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesExecuteSqlResponse]
|
|
1089
|
+
#
|
|
1090
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1091
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1092
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1093
|
+
def execute_instance_sql(project, instance, execute_sql_payload_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1094
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/executeSql', options)
|
|
1095
|
+
command.request_representation = Google::Apis::SqladminV1beta4::ExecuteSqlPayload::Representation
|
|
1096
|
+
command.request_object = execute_sql_payload_object
|
|
1097
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesExecuteSqlResponse::Representation
|
|
1098
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesExecuteSqlResponse
|
|
1099
|
+
command.params['project'] = project unless project.nil?
|
|
1100
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1101
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1102
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1103
|
+
execute_or_queue_command(command, &block)
|
|
1104
|
+
end
|
|
1105
|
+
|
|
1106
|
+
# Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump
|
|
1107
|
+
# or CSV file.
|
|
1108
|
+
# @param [String] project
|
|
1109
|
+
# Project ID of the project that contains the instance to be exported.
|
|
1110
|
+
# @param [String] instance
|
|
1111
|
+
# The Cloud SQL instance ID. This doesn't include the project ID.
|
|
1112
|
+
# @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object
|
|
1113
|
+
# @param [String] fields
|
|
1114
|
+
# Selector specifying which fields to include in a partial response.
|
|
1115
|
+
# @param [String] quota_user
|
|
1116
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1117
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1118
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1119
|
+
# Request-specific options
|
|
1120
|
+
#
|
|
1121
|
+
# @yield [result, err] Result & error if block supplied
|
|
1122
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
1123
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1124
|
+
#
|
|
1125
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
1126
|
+
#
|
|
1127
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1128
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1129
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1130
|
+
def export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1131
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/export', options)
|
|
1132
|
+
command.request_representation = Google::Apis::SqladminV1beta4::ExportInstancesRequest::Representation
|
|
1133
|
+
command.request_object = export_instances_request_object
|
|
1134
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1135
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1136
|
+
command.params['project'] = project unless project.nil?
|
|
1137
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1138
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1139
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1140
|
+
execute_or_queue_command(command, &block)
|
|
1141
|
+
end
|
|
1142
|
+
|
|
1143
|
+
# Initiates a manual failover of a high availability (HA) primary instance to a
|
|
1144
|
+
# standby instance, which becomes the primary instance. Users are then rerouted
|
|
1145
|
+
# to the new primary. For more information, see the [Overview of high
|
|
1146
|
+
# availability](https://cloud.google.com/sql/docs/mysql/high-availability) page
|
|
1147
|
+
# in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes
|
|
1148
|
+
# the instance to failover to its failover replica instance.
|
|
1149
|
+
# @param [String] project
|
|
1150
|
+
# ID of the project that contains the read replica.
|
|
1151
|
+
# @param [String] instance
|
|
1152
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
|
1153
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesFailoverRequest] instances_failover_request_object
|
|
1154
|
+
# @param [String] fields
|
|
1155
|
+
# Selector specifying which fields to include in a partial response.
|
|
1156
|
+
# @param [String] quota_user
|
|
1157
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1158
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1159
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1160
|
+
# Request-specific options
|
|
1161
|
+
#
|
|
1162
|
+
# @yield [result, err] Result & error if block supplied
|
|
1163
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
1164
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1165
|
+
#
|
|
1166
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
1167
|
+
#
|
|
1168
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1169
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1170
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1171
|
+
def failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1172
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/failover', options)
|
|
1173
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesFailoverRequest::Representation
|
|
1174
|
+
command.request_object = instances_failover_request_object
|
|
1175
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1176
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1177
|
+
command.params['project'] = project unless project.nil?
|
|
1178
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1179
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1180
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1181
|
+
execute_or_queue_command(command, &block)
|
|
1182
|
+
end
|
|
1183
|
+
|
|
1184
|
+
# Retrieves a resource containing information about a Cloud SQL instance.
|
|
1185
|
+
# @param [String] project
|
|
1186
|
+
# Project ID of the project that contains the instance.
|
|
1187
|
+
# @param [String] instance
|
|
1188
|
+
# Database instance ID. This does not include the project ID.
|
|
1189
|
+
# @param [String] fields
|
|
1190
|
+
# Selector specifying which fields to include in a partial response.
|
|
1191
|
+
# @param [String] quota_user
|
|
1192
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1193
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1194
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1195
|
+
# Request-specific options
|
|
1196
|
+
#
|
|
1197
|
+
# @yield [result, err] Result & error if block supplied
|
|
1198
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::DatabaseInstance] parsed result object
|
|
1199
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1200
|
+
#
|
|
1201
|
+
# @return [Google::Apis::SqladminV1beta4::DatabaseInstance]
|
|
1202
|
+
#
|
|
1203
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1204
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1205
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1206
|
+
def get_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
|
1207
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
|
|
1208
|
+
command.response_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
|
|
1209
|
+
command.response_class = Google::Apis::SqladminV1beta4::DatabaseInstance
|
|
1210
|
+
command.params['project'] = project unless project.nil?
|
|
1211
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1212
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1213
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1214
|
+
execute_or_queue_command(command, &block)
|
|
1215
|
+
end
|
|
1216
|
+
|
|
1217
|
+
# Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud
|
|
1218
|
+
# Storage.
|
|
1219
|
+
# @param [String] project
|
|
1220
|
+
# Project ID of the project that contains the instance.
|
|
1221
|
+
# @param [String] instance
|
|
1222
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
|
1223
|
+
# @param [Google::Apis::SqladminV1beta4::ImportInstancesRequest] import_instances_request_object
|
|
1224
|
+
# @param [String] fields
|
|
1225
|
+
# Selector specifying which fields to include in a partial response.
|
|
1226
|
+
# @param [String] quota_user
|
|
1227
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1228
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1229
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1230
|
+
# Request-specific options
|
|
1231
|
+
#
|
|
1232
|
+
# @yield [result, err] Result & error if block supplied
|
|
1233
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
1234
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1235
|
+
#
|
|
1236
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
1237
|
+
#
|
|
1238
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1239
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1240
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1241
|
+
def import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1242
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/import', options)
|
|
1243
|
+
command.request_representation = Google::Apis::SqladminV1beta4::ImportInstancesRequest::Representation
|
|
1244
|
+
command.request_object = import_instances_request_object
|
|
1245
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1246
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1247
|
+
command.params['project'] = project unless project.nil?
|
|
1248
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1249
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1250
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1251
|
+
execute_or_queue_command(command, &block)
|
|
1252
|
+
end
|
|
1253
|
+
|
|
1254
|
+
# Creates a new Cloud SQL instance.
|
|
1255
|
+
# @param [String] project
|
|
1256
|
+
# Project ID of the project to which the newly created Cloud SQL instances
|
|
1257
|
+
# should belong.
|
|
1258
|
+
# @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
|
|
1259
|
+
# @param [String] fields
|
|
1260
|
+
# Selector specifying which fields to include in a partial response.
|
|
1261
|
+
# @param [String] quota_user
|
|
1262
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1263
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1264
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1265
|
+
# Request-specific options
|
|
1266
|
+
#
|
|
1267
|
+
# @yield [result, err] Result & error if block supplied
|
|
1268
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
1269
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1270
|
+
#
|
|
1271
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
1272
|
+
#
|
|
1273
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1274
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1275
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1276
|
+
def insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1277
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances', options)
|
|
1278
|
+
command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
|
|
1279
|
+
command.request_object = database_instance_object
|
|
1280
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1281
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1282
|
+
command.params['project'] = project unless project.nil?
|
|
1283
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1284
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1285
|
+
execute_or_queue_command(command, &block)
|
|
1286
|
+
end
|
|
1287
|
+
|
|
1288
|
+
# Lists instances under a given project.
|
|
1289
|
+
# @param [String] project
|
|
1290
|
+
# Project ID of the project for which to list Cloud SQL instances.
|
|
1291
|
+
# @param [String] filter
|
|
1292
|
+
# A filter expression that filters resources listed in the response. The
|
|
1293
|
+
# expression is in the form of field:value. For example, 'instanceType:
|
|
1294
|
+
# CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON
|
|
1295
|
+
# representation, such as 'settings.userLabels.auto_start:true'. Multiple filter
|
|
867
1296
|
# queries are space-separated. For example. 'state:RUNNABLE instanceType:
|
|
868
1297
|
# CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However,
|
|
869
1298
|
# you can include AND and OR expressions explicitly.
|
|
@@ -978,12 +1407,89 @@ module Google
|
|
|
978
1407
|
execute_or_queue_command(command, &block)
|
|
979
1408
|
end
|
|
980
1409
|
|
|
981
|
-
#
|
|
982
|
-
#
|
|
1410
|
+
# Point in time restore for an instance managed by Google Cloud Backup and
|
|
1411
|
+
# Disaster Recovery.
|
|
1412
|
+
# @param [String] parent
|
|
1413
|
+
# Required. The parent resource where you created this instance. Format:
|
|
1414
|
+
# projects/`project`
|
|
1415
|
+
# @param [Google::Apis::SqladminV1beta4::PointInTimeRestoreContext] point_in_time_restore_context_object
|
|
1416
|
+
# @param [String] fields
|
|
1417
|
+
# Selector specifying which fields to include in a partial response.
|
|
1418
|
+
# @param [String] quota_user
|
|
1419
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1420
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1421
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1422
|
+
# Request-specific options
|
|
1423
|
+
#
|
|
1424
|
+
# @yield [result, err] Result & error if block supplied
|
|
1425
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
1426
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1427
|
+
#
|
|
1428
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
1429
|
+
#
|
|
1430
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1431
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1432
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1433
|
+
def point_instance_in_time_restore(parent, point_in_time_restore_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1434
|
+
command = make_simple_command(:post, 'sql/v1beta4/{+parent}:pointInTimeRestore', options)
|
|
1435
|
+
command.request_representation = Google::Apis::SqladminV1beta4::PointInTimeRestoreContext::Representation
|
|
1436
|
+
command.request_object = point_in_time_restore_context_object
|
|
1437
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1438
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1439
|
+
command.params['parent'] = parent unless parent.nil?
|
|
1440
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1441
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1442
|
+
execute_or_queue_command(command, &block)
|
|
1443
|
+
end
|
|
1444
|
+
|
|
1445
|
+
# Execute MVU Pre-checks
|
|
1446
|
+
# @param [String] project
|
|
1447
|
+
# Required. Project ID of the project that contains the instance.
|
|
1448
|
+
# @param [String] instance
|
|
1449
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
|
1450
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesPreCheckMajorVersionUpgradeRequest] instances_pre_check_major_version_upgrade_request_object
|
|
1451
|
+
# @param [String] fields
|
|
1452
|
+
# Selector specifying which fields to include in a partial response.
|
|
1453
|
+
# @param [String] quota_user
|
|
1454
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1455
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1456
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1457
|
+
# Request-specific options
|
|
1458
|
+
#
|
|
1459
|
+
# @yield [result, err] Result & error if block supplied
|
|
1460
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
1461
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1462
|
+
#
|
|
1463
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
1464
|
+
#
|
|
1465
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1466
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1467
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1468
|
+
def pre_instance_check_major_version_upgrade(project, instance, instances_pre_check_major_version_upgrade_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1469
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/preCheckMajorVersionUpgrade', options)
|
|
1470
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesPreCheckMajorVersionUpgradeRequest::Representation
|
|
1471
|
+
command.request_object = instances_pre_check_major_version_upgrade_request_object
|
|
1472
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1473
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1474
|
+
command.params['project'] = project unless project.nil?
|
|
1475
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1476
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1477
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1478
|
+
execute_or_queue_command(command, &block)
|
|
1479
|
+
end
|
|
1480
|
+
|
|
1481
|
+
# Promotes the read replica instance to be an independent Cloud SQL primary
|
|
1482
|
+
# instance. Using this operation might cause your instance to restart.
|
|
983
1483
|
# @param [String] project
|
|
984
1484
|
# ID of the project that contains the read replica.
|
|
985
1485
|
# @param [String] instance
|
|
986
1486
|
# Cloud SQL read replica instance name.
|
|
1487
|
+
# @param [Boolean] failover
|
|
1488
|
+
# Set to true to invoke a replica failover to the DR replica. As part of replica
|
|
1489
|
+
# failover, the promote operation attempts to add the original primary instance
|
|
1490
|
+
# as a replica of the promoted DR replica when the original primary instance
|
|
1491
|
+
# comes back online. If set to false or not specified, then the original primary
|
|
1492
|
+
# instance becomes an independent Cloud SQL primary instance.
|
|
987
1493
|
# @param [String] fields
|
|
988
1494
|
# Selector specifying which fields to include in a partial response.
|
|
989
1495
|
# @param [String] quota_user
|
|
@@ -1001,12 +1507,85 @@ module Google
|
|
|
1001
1507
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1002
1508
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1003
1509
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1004
|
-
def promote_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
|
1510
|
+
def promote_instance_replica(project, instance, failover: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1005
1511
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', options)
|
|
1006
1512
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1007
1513
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1008
1514
|
command.params['project'] = project unless project.nil?
|
|
1009
1515
|
command.params['instance'] = instance unless instance.nil?
|
|
1516
|
+
command.query['failover'] = failover unless failover.nil?
|
|
1517
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1518
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1519
|
+
execute_or_queue_command(command, &block)
|
|
1520
|
+
end
|
|
1521
|
+
|
|
1522
|
+
# Reencrypt CMEK instance with latest key version.
|
|
1523
|
+
# @param [String] project
|
|
1524
|
+
# ID of the project that contains the instance.
|
|
1525
|
+
# @param [String] instance
|
|
1526
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
|
1527
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesReencryptRequest] instances_reencrypt_request_object
|
|
1528
|
+
# @param [String] fields
|
|
1529
|
+
# Selector specifying which fields to include in a partial response.
|
|
1530
|
+
# @param [String] quota_user
|
|
1531
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1532
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1533
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1534
|
+
# Request-specific options
|
|
1535
|
+
#
|
|
1536
|
+
# @yield [result, err] Result & error if block supplied
|
|
1537
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
1538
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1539
|
+
#
|
|
1540
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
1541
|
+
#
|
|
1542
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1543
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1544
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1545
|
+
def reencrypt_instance(project, instance, instances_reencrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1546
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/reencrypt', options)
|
|
1547
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesReencryptRequest::Representation
|
|
1548
|
+
command.request_object = instances_reencrypt_request_object
|
|
1549
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1550
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1551
|
+
command.params['project'] = project unless project.nil?
|
|
1552
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1553
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1554
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1555
|
+
execute_or_queue_command(command, &block)
|
|
1556
|
+
end
|
|
1557
|
+
|
|
1558
|
+
# Release a lease for the setup of SQL Server Reporting Services (SSRS).
|
|
1559
|
+
# @param [String] project
|
|
1560
|
+
# Required. The ID of the project that contains the instance (Example: project-
|
|
1561
|
+
# id).
|
|
1562
|
+
# @param [String] instance
|
|
1563
|
+
# Required. The Cloud SQL instance ID. This doesn't include the project ID. It's
|
|
1564
|
+
# composed of lowercase letters, numbers, and hyphens, and it must start with a
|
|
1565
|
+
# letter. The total length must be 98 characters or less (Example: instance-id).
|
|
1566
|
+
# @param [String] fields
|
|
1567
|
+
# Selector specifying which fields to include in a partial response.
|
|
1568
|
+
# @param [String] quota_user
|
|
1569
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1570
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1571
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1572
|
+
# Request-specific options
|
|
1573
|
+
#
|
|
1574
|
+
# @yield [result, err] Result & error if block supplied
|
|
1575
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse] parsed result object
|
|
1576
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1577
|
+
#
|
|
1578
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse]
|
|
1579
|
+
#
|
|
1580
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1581
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1582
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1583
|
+
def release_instance_ssrs_lease(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
|
1584
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease', options)
|
|
1585
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse::Representation
|
|
1586
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse
|
|
1587
|
+
command.params['project'] = project unless project.nil?
|
|
1588
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1010
1589
|
command.query['fields'] = fields unless fields.nil?
|
|
1011
1590
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1012
1591
|
execute_or_queue_command(command, &block)
|
|
@@ -1018,6 +1597,8 @@ module Google
|
|
|
1018
1597
|
# Project ID of the project that contains the instance.
|
|
1019
1598
|
# @param [String] instance
|
|
1020
1599
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
1600
|
+
# @param [String] mode
|
|
1601
|
+
# Optional. Reset SSL mode to use.
|
|
1021
1602
|
# @param [String] fields
|
|
1022
1603
|
# Selector specifying which fields to include in a partial response.
|
|
1023
1604
|
# @param [String] quota_user
|
|
@@ -1035,12 +1616,13 @@ module Google
|
|
|
1035
1616
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1036
1617
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1037
1618
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1038
|
-
def reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
|
1619
|
+
def reset_instance_ssl_config(project, instance, mode: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1039
1620
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig', options)
|
|
1040
1621
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1041
1622
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1042
1623
|
command.params['project'] = project unless project.nil?
|
|
1043
1624
|
command.params['instance'] = instance unless instance.nil?
|
|
1625
|
+
command.query['mode'] = mode unless mode.nil?
|
|
1044
1626
|
command.query['fields'] = fields unless fields.nil?
|
|
1045
1627
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1046
1628
|
execute_or_queue_command(command, &block)
|
|
@@ -1117,7 +1699,9 @@ module Google
|
|
|
1117
1699
|
end
|
|
1118
1700
|
|
|
1119
1701
|
# Rotates the server certificate to one signed by the Certificate Authority (CA)
|
|
1120
|
-
# version previously added with the addServerCA method.
|
|
1702
|
+
# version previously added with the addServerCA method. For instances that have
|
|
1703
|
+
# enabled Certificate Authority Service (CAS) based server CA, use
|
|
1704
|
+
# RotateServerCertificate to rotate the server certificate.
|
|
1121
1705
|
# @param [String] project
|
|
1122
1706
|
# Project ID of the project that contains the instance.
|
|
1123
1707
|
# @param [String] instance
|
|
@@ -1219,6 +1803,44 @@ module Google
|
|
|
1219
1803
|
execute_or_queue_command(command, &block)
|
|
1220
1804
|
end
|
|
1221
1805
|
|
|
1806
|
+
# Switches over from the primary instance to the DR replica instance.
|
|
1807
|
+
# @param [String] project
|
|
1808
|
+
# ID of the project that contains the replica.
|
|
1809
|
+
# @param [String] instance
|
|
1810
|
+
# Cloud SQL read replica instance name.
|
|
1811
|
+
# @param [String] db_timeout
|
|
1812
|
+
# Optional. (MySQL and PostgreSQL only) Cloud SQL instance operations timeout,
|
|
1813
|
+
# which is a sum of all database operations. Default value is 10 minutes and can
|
|
1814
|
+
# be modified to a maximum value of 24 hours.
|
|
1815
|
+
# @param [String] fields
|
|
1816
|
+
# Selector specifying which fields to include in a partial response.
|
|
1817
|
+
# @param [String] quota_user
|
|
1818
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1819
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1820
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1821
|
+
# Request-specific options
|
|
1822
|
+
#
|
|
1823
|
+
# @yield [result, err] Result & error if block supplied
|
|
1824
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
1825
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1826
|
+
#
|
|
1827
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
1828
|
+
#
|
|
1829
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1830
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1831
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1832
|
+
def switchover_instance(project, instance, db_timeout: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
1833
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/switchover', options)
|
|
1834
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
1835
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
1836
|
+
command.params['project'] = project unless project.nil?
|
|
1837
|
+
command.params['instance'] = instance unless instance.nil?
|
|
1838
|
+
command.query['dbTimeout'] = db_timeout unless db_timeout.nil?
|
|
1839
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1840
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1841
|
+
execute_or_queue_command(command, &block)
|
|
1842
|
+
end
|
|
1843
|
+
|
|
1222
1844
|
# Truncate MySQL general and slow query log tables MySQL only.
|
|
1223
1845
|
# @param [String] project
|
|
1224
1846
|
# Project ID of the Cloud SQL project.
|
|
@@ -1292,6 +1914,40 @@ module Google
|
|
|
1292
1914
|
execute_or_queue_command(command, &block)
|
|
1293
1915
|
end
|
|
1294
1916
|
|
|
1917
|
+
# Cancels an instance operation that has been performed on an instance.
|
|
1918
|
+
# Ordinarily, this method name should be `CancelSqlOperation`.
|
|
1919
|
+
# @param [String] project
|
|
1920
|
+
# Project ID of the project that contains the instance.
|
|
1921
|
+
# @param [String] operation
|
|
1922
|
+
# Instance operation ID.
|
|
1923
|
+
# @param [String] fields
|
|
1924
|
+
# Selector specifying which fields to include in a partial response.
|
|
1925
|
+
# @param [String] quota_user
|
|
1926
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1927
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1928
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1929
|
+
# Request-specific options
|
|
1930
|
+
#
|
|
1931
|
+
# @yield [result, err] Result & error if block supplied
|
|
1932
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Empty] parsed result object
|
|
1933
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1934
|
+
#
|
|
1935
|
+
# @return [Google::Apis::SqladminV1beta4::Empty]
|
|
1936
|
+
#
|
|
1937
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1938
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1939
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1940
|
+
def cancel_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
|
|
1941
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/operations/{operation}/cancel', options)
|
|
1942
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Empty::Representation
|
|
1943
|
+
command.response_class = Google::Apis::SqladminV1beta4::Empty
|
|
1944
|
+
command.params['project'] = project unless project.nil?
|
|
1945
|
+
command.params['operation'] = operation unless operation.nil?
|
|
1946
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1947
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1948
|
+
execute_or_queue_command(command, &block)
|
|
1949
|
+
end
|
|
1950
|
+
|
|
1295
1951
|
# Retrieves an instance operation that has been performed on an instance.
|
|
1296
1952
|
# @param [String] project
|
|
1297
1953
|
# Project ID of the project that contains the instance.
|
|
@@ -1366,6 +2022,112 @@ module Google
|
|
|
1366
2022
|
execute_or_queue_command(command, &block)
|
|
1367
2023
|
end
|
|
1368
2024
|
|
|
2025
|
+
# Get Disk Shrink Config for a given instance.
|
|
2026
|
+
# @param [String] project
|
|
2027
|
+
# Project ID of the project that contains the instance.
|
|
2028
|
+
# @param [String] instance
|
|
2029
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
|
2030
|
+
# @param [String] fields
|
|
2031
|
+
# Selector specifying which fields to include in a partial response.
|
|
2032
|
+
# @param [String] quota_user
|
|
2033
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2034
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2035
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2036
|
+
# Request-specific options
|
|
2037
|
+
#
|
|
2038
|
+
# @yield [result, err] Result & error if block supplied
|
|
2039
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse] parsed result object
|
|
2040
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2041
|
+
#
|
|
2042
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse]
|
|
2043
|
+
#
|
|
2044
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2045
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2046
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2047
|
+
def get_project_instance_disk_shrink_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
|
2048
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig', options)
|
|
2049
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse::Representation
|
|
2050
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse
|
|
2051
|
+
command.params['project'] = project unless project.nil?
|
|
2052
|
+
command.params['instance'] = instance unless instance.nil?
|
|
2053
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2054
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2055
|
+
execute_or_queue_command(command, &block)
|
|
2056
|
+
end
|
|
2057
|
+
|
|
2058
|
+
# Get Latest Recovery Time for a given instance.
|
|
2059
|
+
# @param [String] project
|
|
2060
|
+
# Project ID of the project that contains the instance.
|
|
2061
|
+
# @param [String] instance
|
|
2062
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
|
2063
|
+
# @param [String] source_instance_deletion_time
|
|
2064
|
+
# The timestamp used to identify the time when the source instance is deleted.
|
|
2065
|
+
# If this instance is deleted, then you must set the timestamp.
|
|
2066
|
+
# @param [String] fields
|
|
2067
|
+
# Selector specifying which fields to include in a partial response.
|
|
2068
|
+
# @param [String] quota_user
|
|
2069
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2070
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2071
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2072
|
+
# Request-specific options
|
|
2073
|
+
#
|
|
2074
|
+
# @yield [result, err] Result & error if block supplied
|
|
2075
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse] parsed result object
|
|
2076
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2077
|
+
#
|
|
2078
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse]
|
|
2079
|
+
#
|
|
2080
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2081
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2082
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2083
|
+
def get_project_instance_latest_recovery_time(project, instance, source_instance_deletion_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
2084
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime', options)
|
|
2085
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse::Representation
|
|
2086
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse
|
|
2087
|
+
command.params['project'] = project unless project.nil?
|
|
2088
|
+
command.params['instance'] = instance unless instance.nil?
|
|
2089
|
+
command.query['sourceInstanceDeletionTime'] = source_instance_deletion_time unless source_instance_deletion_time.nil?
|
|
2090
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2091
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2092
|
+
execute_or_queue_command(command, &block)
|
|
2093
|
+
end
|
|
2094
|
+
|
|
2095
|
+
# Perform Disk Shrink on primary instance.
|
|
2096
|
+
# @param [String] project
|
|
2097
|
+
# Project ID of the project that contains the instance.
|
|
2098
|
+
# @param [String] instance
|
|
2099
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
|
2100
|
+
# @param [Google::Apis::SqladminV1beta4::PerformDiskShrinkContext] perform_disk_shrink_context_object
|
|
2101
|
+
# @param [String] fields
|
|
2102
|
+
# Selector specifying which fields to include in a partial response.
|
|
2103
|
+
# @param [String] quota_user
|
|
2104
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2105
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2106
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2107
|
+
# Request-specific options
|
|
2108
|
+
#
|
|
2109
|
+
# @yield [result, err] Result & error if block supplied
|
|
2110
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
2111
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2112
|
+
#
|
|
2113
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
2114
|
+
#
|
|
2115
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2116
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2117
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2118
|
+
def perform_project_instance_disk_shrink(project, instance, perform_disk_shrink_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
2119
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink', options)
|
|
2120
|
+
command.request_representation = Google::Apis::SqladminV1beta4::PerformDiskShrinkContext::Representation
|
|
2121
|
+
command.request_object = perform_disk_shrink_context_object
|
|
2122
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
2123
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
2124
|
+
command.params['project'] = project unless project.nil?
|
|
2125
|
+
command.params['instance'] = instance unless instance.nil?
|
|
2126
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2127
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2128
|
+
execute_or_queue_command(command, &block)
|
|
2129
|
+
end
|
|
2130
|
+
|
|
1369
2131
|
# Reschedules the maintenance on the given instance.
|
|
1370
2132
|
# @param [String] project
|
|
1371
2133
|
# ID of the project that contains the instance.
|
|
@@ -1402,6 +2164,42 @@ module Google
|
|
|
1402
2164
|
execute_or_queue_command(command, &block)
|
|
1403
2165
|
end
|
|
1404
2166
|
|
|
2167
|
+
# Reset Replica Size to primary instance disk size.
|
|
2168
|
+
# @param [String] project
|
|
2169
|
+
# ID of the project that contains the read replica.
|
|
2170
|
+
# @param [String] instance
|
|
2171
|
+
# Cloud SQL read replica instance name.
|
|
2172
|
+
# @param [Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest] sql_instances_reset_replica_size_request_object
|
|
2173
|
+
# @param [String] fields
|
|
2174
|
+
# Selector specifying which fields to include in a partial response.
|
|
2175
|
+
# @param [String] quota_user
|
|
2176
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
2177
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
2178
|
+
# @param [Google::Apis::RequestOptions] options
|
|
2179
|
+
# Request-specific options
|
|
2180
|
+
#
|
|
2181
|
+
# @yield [result, err] Result & error if block supplied
|
|
2182
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
|
2183
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
2184
|
+
#
|
|
2185
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
|
2186
|
+
#
|
|
2187
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
2188
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
2189
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
2190
|
+
def reset_project_instance_replica_size(project, instance, sql_instances_reset_replica_size_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
2191
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize', options)
|
|
2192
|
+
command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest::Representation
|
|
2193
|
+
command.request_object = sql_instances_reset_replica_size_request_object
|
|
2194
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
2195
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
|
2196
|
+
command.params['project'] = project unless project.nil?
|
|
2197
|
+
command.params['instance'] = instance unless instance.nil?
|
|
2198
|
+
command.query['fields'] = fields unless fields.nil?
|
|
2199
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
2200
|
+
execute_or_queue_command(command, &block)
|
|
2201
|
+
end
|
|
2202
|
+
|
|
1405
2203
|
# Start External primary instance migration.
|
|
1406
2204
|
# @param [String] project
|
|
1407
2205
|
# ID of the project that contains the instance.
|