google-apis-sqladmin_v1beta4 0.41.0 → 0.82.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 +172 -0
- data/OVERVIEW.md +2 -2
- data/lib/google/apis/sqladmin_v1beta4/classes.rb +2075 -103
- data/lib/google/apis/sqladmin_v1beta4/gem_version.rb +3 -3
- data/lib/google/apis/sqladmin_v1beta4/representations.rb +735 -0
- data/lib/google/apis/sqladmin_v1beta4/service.rb +730 -10
- metadata +7 -10
@@ -32,6 +32,8 @@ module Google
|
|
32
32
|
#
|
33
33
|
# @see https://developers.google.com/cloud-sql/
|
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,192 @@ 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
|
+
# This API updates the following: 1- retention period and description of backup
|
352
|
+
# in case of final backups only. 2- gcbdr_soft_delete_status of backup in case
|
353
|
+
# of GCBDR managed backups only.
|
354
|
+
# @param [String] name
|
355
|
+
# Output only. The resource name of the backup. Format: projects/`project`/
|
356
|
+
# backups/`backup`.
|
357
|
+
# @param [Google::Apis::SqladminV1beta4::Backup] backup_object
|
358
|
+
# @param [String] update_mask
|
359
|
+
# The list of fields that you can update. 1- You can update only the description
|
360
|
+
# and retention period for a final backup. 2- You can update only the
|
361
|
+
# gcbdr_soft_delete_status for GCBDR managed backup.
|
362
|
+
# @param [String] fields
|
363
|
+
# Selector specifying which fields to include in a partial response.
|
364
|
+
# @param [String] quota_user
|
365
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
366
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
367
|
+
# @param [Google::Apis::RequestOptions] options
|
368
|
+
# Request-specific options
|
369
|
+
#
|
370
|
+
# @yield [result, err] Result & error if block supplied
|
371
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
372
|
+
# @yieldparam err [StandardError] error object if request failed
|
373
|
+
#
|
374
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
375
|
+
#
|
376
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
377
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
378
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
379
|
+
def update_backup_backup(name, backup_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
380
|
+
command = make_simple_command(:patch, 'sql/v1beta4/{+name}', options)
|
381
|
+
command.request_representation = Google::Apis::SqladminV1beta4::Backup::Representation
|
382
|
+
command.request_object = backup_object
|
383
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
384
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
385
|
+
command.params['name'] = name unless name.nil?
|
386
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
387
|
+
command.query['fields'] = fields unless fields.nil?
|
388
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
389
|
+
execute_or_queue_command(command, &block)
|
390
|
+
end
|
391
|
+
|
204
392
|
# Generates a short-lived X509 certificate containing the provided public key
|
205
393
|
# and signed by a private key specific to the target instance. Users may use the
|
206
394
|
# certificate to authenticate as themselves when connecting to the database.
|
@@ -349,7 +537,7 @@ module Google
|
|
349
537
|
end
|
350
538
|
|
351
539
|
# Inserts a resource containing information about a database inside a Cloud SQL
|
352
|
-
# instance.
|
540
|
+
# instance. **Note:** You can't modify the default character set and collation.
|
353
541
|
# @param [String] project
|
354
542
|
# Project ID of the project that contains the instance.
|
355
543
|
# @param [String] instance
|
@@ -502,6 +690,9 @@ module Google
|
|
502
690
|
# @param [String] database_version
|
503
691
|
# Database type and version you want to retrieve flags for. By default, this
|
504
692
|
# method returns flags for all database types and versions.
|
693
|
+
# @param [String] flag_scope
|
694
|
+
# Optional. Specify the scope of flags to be returned by SqlFlagsListService.
|
695
|
+
# Return list of database flags if unspecified.
|
505
696
|
# @param [String] fields
|
506
697
|
# Selector specifying which fields to include in a partial response.
|
507
698
|
# @param [String] quota_user
|
@@ -519,11 +710,126 @@ module Google
|
|
519
710
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
520
711
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
521
712
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
522
|
-
def list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
713
|
+
def list_flags(database_version: nil, flag_scope: nil, fields: nil, quota_user: nil, options: nil, &block)
|
523
714
|
command = make_simple_command(:get, 'sql/v1beta4/flags', options)
|
524
715
|
command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation
|
525
716
|
command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse
|
526
717
|
command.query['databaseVersion'] = database_version unless database_version.nil?
|
718
|
+
command.query['flagScope'] = flag_scope unless flag_scope.nil?
|
719
|
+
command.query['fields'] = fields unless fields.nil?
|
720
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
721
|
+
execute_or_queue_command(command, &block)
|
722
|
+
end
|
723
|
+
|
724
|
+
# Lists all versions of server certificates and certificate authorities (CAs)
|
725
|
+
# for the specified instance. There can be up to three sets of certs listed: the
|
726
|
+
# certificate that is currently in use, a future that has been added but not yet
|
727
|
+
# used to sign a certificate, and a certificate that has been rotated out. For
|
728
|
+
# instances not using Certificate Authority Service (CAS) server CA, use
|
729
|
+
# ListServerCas instead.
|
730
|
+
# @param [String] project
|
731
|
+
# Required. Project ID of the project that contains the instance.
|
732
|
+
# @param [String] instance
|
733
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
734
|
+
# @param [String] fields
|
735
|
+
# Selector specifying which fields to include in a partial response.
|
736
|
+
# @param [String] quota_user
|
737
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
738
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
739
|
+
# @param [Google::Apis::RequestOptions] options
|
740
|
+
# Request-specific options
|
741
|
+
#
|
742
|
+
# @yield [result, err] Result & error if block supplied
|
743
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse] parsed result object
|
744
|
+
# @yieldparam err [StandardError] error object if request failed
|
745
|
+
#
|
746
|
+
# @return [Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse]
|
747
|
+
#
|
748
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
749
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
750
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
751
|
+
def list_instance_server_certificates(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
752
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/listServerCertificates', options)
|
753
|
+
command.response_representation = Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse::Representation
|
754
|
+
command.response_class = Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse
|
755
|
+
command.params['project'] = project unless project.nil?
|
756
|
+
command.params['instance'] = instance unless instance.nil?
|
757
|
+
command.query['fields'] = fields unless fields.nil?
|
758
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
759
|
+
execute_or_queue_command(command, &block)
|
760
|
+
end
|
761
|
+
|
762
|
+
# Rotates the server certificate version to one previously added with the
|
763
|
+
# addServerCertificate method. For instances not using Certificate Authority
|
764
|
+
# Service (CAS) server CA, use RotateServerCa instead.
|
765
|
+
# @param [String] project
|
766
|
+
# Required. Project ID of the project that contains the instance.
|
767
|
+
# @param [String] instance
|
768
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
769
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesRotateServerCertificateRequest] instances_rotate_server_certificate_request_object
|
770
|
+
# @param [String] fields
|
771
|
+
# Selector specifying which fields to include in a partial response.
|
772
|
+
# @param [String] quota_user
|
773
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
774
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
775
|
+
# @param [Google::Apis::RequestOptions] options
|
776
|
+
# Request-specific options
|
777
|
+
#
|
778
|
+
# @yield [result, err] Result & error if block supplied
|
779
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
780
|
+
# @yieldparam err [StandardError] error object if request failed
|
781
|
+
#
|
782
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
783
|
+
#
|
784
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
785
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
786
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
787
|
+
def rotate_instance_server_certificate(project, instance, instances_rotate_server_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
788
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCertificate', options)
|
789
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesRotateServerCertificateRequest::Representation
|
790
|
+
command.request_object = instances_rotate_server_certificate_request_object
|
791
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
792
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
793
|
+
command.params['project'] = project unless project.nil?
|
794
|
+
command.params['instance'] = instance unless instance.nil?
|
795
|
+
command.query['fields'] = fields unless fields.nil?
|
796
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
797
|
+
execute_or_queue_command(command, &block)
|
798
|
+
end
|
799
|
+
|
800
|
+
# Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
|
801
|
+
# @param [String] project
|
802
|
+
# Required. ID of the project that contains the instance (Example: project-id).
|
803
|
+
# @param [String] instance
|
804
|
+
# Required. Cloud SQL instance ID. This doesn't include the project ID. It's
|
805
|
+
# composed of lowercase letters, numbers, and hyphens, and it must start with a
|
806
|
+
# letter. The total length must be 98 characters or less (Example: instance-id).
|
807
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesAcquireSsrsLeaseRequest] instances_acquire_ssrs_lease_request_object
|
808
|
+
# @param [String] fields
|
809
|
+
# Selector specifying which fields to include in a partial response.
|
810
|
+
# @param [String] quota_user
|
811
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
812
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
813
|
+
# @param [Google::Apis::RequestOptions] options
|
814
|
+
# Request-specific options
|
815
|
+
#
|
816
|
+
# @yield [result, err] Result & error if block supplied
|
817
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse] parsed result object
|
818
|
+
# @yieldparam err [StandardError] error object if request failed
|
819
|
+
#
|
820
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse]
|
821
|
+
#
|
822
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
823
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
824
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
825
|
+
def acquire_instance_ssrs_lease(project, instance, instances_acquire_ssrs_lease_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
826
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease', options)
|
827
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesAcquireSsrsLeaseRequest::Representation
|
828
|
+
command.request_object = instances_acquire_ssrs_lease_request_object
|
829
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse::Representation
|
830
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse
|
831
|
+
command.params['project'] = project unless project.nil?
|
832
|
+
command.params['instance'] = instance unless instance.nil?
|
527
833
|
command.query['fields'] = fields unless fields.nil?
|
528
834
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
529
835
|
execute_or_queue_command(command, &block)
|
@@ -533,7 +839,8 @@ module Google
|
|
533
839
|
# instance. Required to prepare for a certificate rotation. If a CA version was
|
534
840
|
# previously added but never used in a certificate rotation, this operation
|
535
841
|
# replaces that version. There cannot be more than one CA version waiting to be
|
536
|
-
# rotated in.
|
842
|
+
# rotated in. For instances that have enabled Certificate Authority Service (CAS)
|
843
|
+
# based server CA, use AddServerCertificate to add a new server certificate.
|
537
844
|
# @param [String] project
|
538
845
|
# Project ID of the project that contains the instance.
|
539
846
|
# @param [String] instance
|
@@ -566,6 +873,44 @@ module Google
|
|
566
873
|
execute_or_queue_command(command, &block)
|
567
874
|
end
|
568
875
|
|
876
|
+
# Add a new trusted server certificate version for the specified instance using
|
877
|
+
# Certificate Authority Service (CAS) server CA. Required to prepare for a
|
878
|
+
# certificate rotation. If a server certificate version was previously added but
|
879
|
+
# never used in a certificate rotation, this operation replaces that version.
|
880
|
+
# There cannot be more than one certificate version waiting to be rotated in.
|
881
|
+
# For instances not using CAS server CA, use AddServerCa instead.
|
882
|
+
# @param [String] project
|
883
|
+
# Required. Project ID of the project that contains the instance.
|
884
|
+
# @param [String] instance
|
885
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
886
|
+
# @param [String] fields
|
887
|
+
# Selector specifying which fields to include in a partial response.
|
888
|
+
# @param [String] quota_user
|
889
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
890
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
891
|
+
# @param [Google::Apis::RequestOptions] options
|
892
|
+
# Request-specific options
|
893
|
+
#
|
894
|
+
# @yield [result, err] Result & error if block supplied
|
895
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
896
|
+
# @yieldparam err [StandardError] error object if request failed
|
897
|
+
#
|
898
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
899
|
+
#
|
900
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
901
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
902
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
903
|
+
def add_instance_server_certificate(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
904
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/addServerCertificate', options)
|
905
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
906
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
907
|
+
command.params['project'] = project unless project.nil?
|
908
|
+
command.params['instance'] = instance unless instance.nil?
|
909
|
+
command.query['fields'] = fields unless fields.nil?
|
910
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
911
|
+
execute_or_queue_command(command, &block)
|
912
|
+
end
|
913
|
+
|
569
914
|
# Creates a Cloud SQL instance as a clone of the source instance. Using this
|
570
915
|
# operation might cause your instance to restart.
|
571
916
|
# @param [String] project
|
@@ -609,6 +954,15 @@ module Google
|
|
609
954
|
# Project ID of the project that contains the instance to be deleted.
|
610
955
|
# @param [String] instance
|
611
956
|
# Cloud SQL instance ID. This does not include the project ID.
|
957
|
+
# @param [Boolean] enable_final_backup
|
958
|
+
# Flag to opt-in for final backup. By default, it is turned off.
|
959
|
+
# @param [String] final_backup_description
|
960
|
+
# Optional. The description of the final backup.
|
961
|
+
# @param [String] final_backup_expiry_time
|
962
|
+
# Optional. Final Backup expiration time. Timestamp in UTC of when this resource
|
963
|
+
# is considered expired.
|
964
|
+
# @param [Fixnum] final_backup_ttl_days
|
965
|
+
# Optional. Retention period of the final backup.
|
612
966
|
# @param [String] fields
|
613
967
|
# Selector specifying which fields to include in a partial response.
|
614
968
|
# @param [String] quota_user
|
@@ -626,12 +980,53 @@ module Google
|
|
626
980
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
627
981
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
628
982
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
629
|
-
def delete_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
983
|
+
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)
|
630
984
|
command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
|
631
985
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
632
986
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
633
987
|
command.params['project'] = project unless project.nil?
|
634
988
|
command.params['instance'] = instance unless instance.nil?
|
989
|
+
command.query['enableFinalBackup'] = enable_final_backup unless enable_final_backup.nil?
|
990
|
+
command.query['finalBackupDescription'] = final_backup_description unless final_backup_description.nil?
|
991
|
+
command.query['finalBackupExpiryTime'] = final_backup_expiry_time unless final_backup_expiry_time.nil?
|
992
|
+
command.query['finalBackupTtlDays'] = final_backup_ttl_days unless final_backup_ttl_days.nil?
|
993
|
+
command.query['fields'] = fields unless fields.nil?
|
994
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
995
|
+
execute_or_queue_command(command, &block)
|
996
|
+
end
|
997
|
+
|
998
|
+
# Demotes an existing standalone instance to be a Cloud SQL read replica for an
|
999
|
+
# external database server.
|
1000
|
+
# @param [String] project
|
1001
|
+
# Required. The project ID of the project that contains the instance.
|
1002
|
+
# @param [String] instance
|
1003
|
+
# Required. The name of the Cloud SQL instance.
|
1004
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteRequest] instances_demote_request_object
|
1005
|
+
# @param [String] fields
|
1006
|
+
# Selector specifying which fields to include in a partial response.
|
1007
|
+
# @param [String] quota_user
|
1008
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1009
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1010
|
+
# @param [Google::Apis::RequestOptions] options
|
1011
|
+
# Request-specific options
|
1012
|
+
#
|
1013
|
+
# @yield [result, err] Result & error if block supplied
|
1014
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
1015
|
+
# @yieldparam err [StandardError] error object if request failed
|
1016
|
+
#
|
1017
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
1018
|
+
#
|
1019
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1020
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1021
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1022
|
+
def demote_instance(project, instance, instances_demote_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1023
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/demote', options)
|
1024
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteRequest::Representation
|
1025
|
+
command.request_object = instances_demote_request_object
|
1026
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1027
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1028
|
+
command.params['project'] = project unless project.nil?
|
1029
|
+
command.params['instance'] = instance unless instance.nil?
|
635
1030
|
command.query['fields'] = fields unless fields.nil?
|
636
1031
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
637
1032
|
execute_or_queue_command(command, &block)
|
@@ -679,7 +1074,7 @@ module Google
|
|
679
1074
|
# @param [String] project
|
680
1075
|
# Project ID of the project that contains the instance to be exported.
|
681
1076
|
# @param [String] instance
|
682
|
-
# Cloud SQL instance ID. This
|
1077
|
+
# The Cloud SQL instance ID. This doesn't include the project ID.
|
683
1078
|
# @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object
|
684
1079
|
# @param [String] fields
|
685
1080
|
# Selector specifying which fields to include in a partial response.
|
@@ -978,12 +1373,53 @@ module Google
|
|
978
1373
|
execute_or_queue_command(command, &block)
|
979
1374
|
end
|
980
1375
|
|
981
|
-
#
|
982
|
-
#
|
1376
|
+
# Point in time restore for an instance managed by Google Cloud Backup and
|
1377
|
+
# Disaster Recovery.
|
1378
|
+
# @param [String] parent
|
1379
|
+
# Required. The parent resource where you created this instance. Format:
|
1380
|
+
# projects/`project`
|
1381
|
+
# @param [Google::Apis::SqladminV1beta4::PointInTimeRestoreContext] point_in_time_restore_context_object
|
1382
|
+
# @param [String] fields
|
1383
|
+
# Selector specifying which fields to include in a partial response.
|
1384
|
+
# @param [String] quota_user
|
1385
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1386
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1387
|
+
# @param [Google::Apis::RequestOptions] options
|
1388
|
+
# Request-specific options
|
1389
|
+
#
|
1390
|
+
# @yield [result, err] Result & error if block supplied
|
1391
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
1392
|
+
# @yieldparam err [StandardError] error object if request failed
|
1393
|
+
#
|
1394
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
1395
|
+
#
|
1396
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1397
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1398
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1399
|
+
def point_instance_in_time_restore(parent, point_in_time_restore_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1400
|
+
command = make_simple_command(:post, 'sql/v1beta4/{+parent}:pointInTimeRestore', options)
|
1401
|
+
command.request_representation = Google::Apis::SqladminV1beta4::PointInTimeRestoreContext::Representation
|
1402
|
+
command.request_object = point_in_time_restore_context_object
|
1403
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1404
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1405
|
+
command.params['parent'] = parent unless parent.nil?
|
1406
|
+
command.query['fields'] = fields unless fields.nil?
|
1407
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1408
|
+
execute_or_queue_command(command, &block)
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
# Promotes the read replica instance to be an independent Cloud SQL primary
|
1412
|
+
# instance. Using this operation might cause your instance to restart.
|
983
1413
|
# @param [String] project
|
984
1414
|
# ID of the project that contains the read replica.
|
985
1415
|
# @param [String] instance
|
986
1416
|
# Cloud SQL read replica instance name.
|
1417
|
+
# @param [Boolean] failover
|
1418
|
+
# Set to true to invoke a replica failover to the DR replica. As part of replica
|
1419
|
+
# failover, the promote operation attempts to add the original primary instance
|
1420
|
+
# as a replica of the promoted DR replica when the original primary instance
|
1421
|
+
# comes back online. If set to false or not specified, then the original primary
|
1422
|
+
# instance becomes an independent Cloud SQL primary instance.
|
987
1423
|
# @param [String] fields
|
988
1424
|
# Selector specifying which fields to include in a partial response.
|
989
1425
|
# @param [String] quota_user
|
@@ -1001,12 +1437,85 @@ module Google
|
|
1001
1437
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1002
1438
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1003
1439
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1004
|
-
def promote_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
1440
|
+
def promote_instance_replica(project, instance, failover: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1005
1441
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', options)
|
1006
1442
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1007
1443
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1008
1444
|
command.params['project'] = project unless project.nil?
|
1009
1445
|
command.params['instance'] = instance unless instance.nil?
|
1446
|
+
command.query['failover'] = failover unless failover.nil?
|
1447
|
+
command.query['fields'] = fields unless fields.nil?
|
1448
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1449
|
+
execute_or_queue_command(command, &block)
|
1450
|
+
end
|
1451
|
+
|
1452
|
+
# Reencrypt CMEK instance with latest key version.
|
1453
|
+
# @param [String] project
|
1454
|
+
# ID of the project that contains the instance.
|
1455
|
+
# @param [String] instance
|
1456
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
1457
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesReencryptRequest] instances_reencrypt_request_object
|
1458
|
+
# @param [String] fields
|
1459
|
+
# Selector specifying which fields to include in a partial response.
|
1460
|
+
# @param [String] quota_user
|
1461
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1462
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1463
|
+
# @param [Google::Apis::RequestOptions] options
|
1464
|
+
# Request-specific options
|
1465
|
+
#
|
1466
|
+
# @yield [result, err] Result & error if block supplied
|
1467
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
1468
|
+
# @yieldparam err [StandardError] error object if request failed
|
1469
|
+
#
|
1470
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
1471
|
+
#
|
1472
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1473
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1474
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1475
|
+
def reencrypt_instance(project, instance, instances_reencrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1476
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/reencrypt', options)
|
1477
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesReencryptRequest::Representation
|
1478
|
+
command.request_object = instances_reencrypt_request_object
|
1479
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1480
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1481
|
+
command.params['project'] = project unless project.nil?
|
1482
|
+
command.params['instance'] = instance unless instance.nil?
|
1483
|
+
command.query['fields'] = fields unless fields.nil?
|
1484
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1485
|
+
execute_or_queue_command(command, &block)
|
1486
|
+
end
|
1487
|
+
|
1488
|
+
# Release a lease for the setup of SQL Server Reporting Services (SSRS).
|
1489
|
+
# @param [String] project
|
1490
|
+
# Required. The ID of the project that contains the instance (Example: project-
|
1491
|
+
# id).
|
1492
|
+
# @param [String] instance
|
1493
|
+
# Required. The Cloud SQL instance ID. This doesn't include the project ID. It's
|
1494
|
+
# composed of lowercase letters, numbers, and hyphens, and it must start with a
|
1495
|
+
# letter. The total length must be 98 characters or less (Example: instance-id).
|
1496
|
+
# @param [String] fields
|
1497
|
+
# Selector specifying which fields to include in a partial response.
|
1498
|
+
# @param [String] quota_user
|
1499
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1500
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1501
|
+
# @param [Google::Apis::RequestOptions] options
|
1502
|
+
# Request-specific options
|
1503
|
+
#
|
1504
|
+
# @yield [result, err] Result & error if block supplied
|
1505
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse] parsed result object
|
1506
|
+
# @yieldparam err [StandardError] error object if request failed
|
1507
|
+
#
|
1508
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse]
|
1509
|
+
#
|
1510
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1511
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1512
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1513
|
+
def release_instance_ssrs_lease(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
1514
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease', options)
|
1515
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse::Representation
|
1516
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse
|
1517
|
+
command.params['project'] = project unless project.nil?
|
1518
|
+
command.params['instance'] = instance unless instance.nil?
|
1010
1519
|
command.query['fields'] = fields unless fields.nil?
|
1011
1520
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1012
1521
|
execute_or_queue_command(command, &block)
|
@@ -1117,7 +1626,9 @@ module Google
|
|
1117
1626
|
end
|
1118
1627
|
|
1119
1628
|
# Rotates the server certificate to one signed by the Certificate Authority (CA)
|
1120
|
-
# version previously added with the addServerCA method.
|
1629
|
+
# version previously added with the addServerCA method. For instances that have
|
1630
|
+
# enabled Certificate Authority Service (CAS) based server CA, use
|
1631
|
+
# RotateServerCertificate to rotate the server certificate.
|
1121
1632
|
# @param [String] project
|
1122
1633
|
# Project ID of the project that contains the instance.
|
1123
1634
|
# @param [String] instance
|
@@ -1219,6 +1730,44 @@ module Google
|
|
1219
1730
|
execute_or_queue_command(command, &block)
|
1220
1731
|
end
|
1221
1732
|
|
1733
|
+
# Switches over from the primary instance to the DR replica instance.
|
1734
|
+
# @param [String] project
|
1735
|
+
# ID of the project that contains the replica.
|
1736
|
+
# @param [String] instance
|
1737
|
+
# Cloud SQL read replica instance name.
|
1738
|
+
# @param [String] db_timeout
|
1739
|
+
# Optional. (MySQL and PostgreSQL only) Cloud SQL instance operations timeout,
|
1740
|
+
# which is a sum of all database operations. Default value is 10 minutes and can
|
1741
|
+
# be modified to a maximum value of 24 hours.
|
1742
|
+
# @param [String] fields
|
1743
|
+
# Selector specifying which fields to include in a partial response.
|
1744
|
+
# @param [String] quota_user
|
1745
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1746
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1747
|
+
# @param [Google::Apis::RequestOptions] options
|
1748
|
+
# Request-specific options
|
1749
|
+
#
|
1750
|
+
# @yield [result, err] Result & error if block supplied
|
1751
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
1752
|
+
# @yieldparam err [StandardError] error object if request failed
|
1753
|
+
#
|
1754
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
1755
|
+
#
|
1756
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1757
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1758
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1759
|
+
def switchover_instance(project, instance, db_timeout: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1760
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/switchover', options)
|
1761
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1762
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1763
|
+
command.params['project'] = project unless project.nil?
|
1764
|
+
command.params['instance'] = instance unless instance.nil?
|
1765
|
+
command.query['dbTimeout'] = db_timeout unless db_timeout.nil?
|
1766
|
+
command.query['fields'] = fields unless fields.nil?
|
1767
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1768
|
+
execute_or_queue_command(command, &block)
|
1769
|
+
end
|
1770
|
+
|
1222
1771
|
# Truncate MySQL general and slow query log tables MySQL only.
|
1223
1772
|
# @param [String] project
|
1224
1773
|
# Project ID of the Cloud SQL project.
|
@@ -1292,6 +1841,39 @@ module Google
|
|
1292
1841
|
execute_or_queue_command(command, &block)
|
1293
1842
|
end
|
1294
1843
|
|
1844
|
+
# Cancels an instance operation that has been performed on an instance.
|
1845
|
+
# @param [String] project
|
1846
|
+
# Project ID of the project that contains the instance.
|
1847
|
+
# @param [String] operation
|
1848
|
+
# Instance operation ID.
|
1849
|
+
# @param [String] fields
|
1850
|
+
# Selector specifying which fields to include in a partial response.
|
1851
|
+
# @param [String] quota_user
|
1852
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1853
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1854
|
+
# @param [Google::Apis::RequestOptions] options
|
1855
|
+
# Request-specific options
|
1856
|
+
#
|
1857
|
+
# @yield [result, err] Result & error if block supplied
|
1858
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Empty] parsed result object
|
1859
|
+
# @yieldparam err [StandardError] error object if request failed
|
1860
|
+
#
|
1861
|
+
# @return [Google::Apis::SqladminV1beta4::Empty]
|
1862
|
+
#
|
1863
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1864
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1865
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1866
|
+
def cancel_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
|
1867
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/operations/{operation}/cancel', options)
|
1868
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Empty::Representation
|
1869
|
+
command.response_class = Google::Apis::SqladminV1beta4::Empty
|
1870
|
+
command.params['project'] = project unless project.nil?
|
1871
|
+
command.params['operation'] = operation unless operation.nil?
|
1872
|
+
command.query['fields'] = fields unless fields.nil?
|
1873
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1874
|
+
execute_or_queue_command(command, &block)
|
1875
|
+
end
|
1876
|
+
|
1295
1877
|
# Retrieves an instance operation that has been performed on an instance.
|
1296
1878
|
# @param [String] project
|
1297
1879
|
# Project ID of the project that contains the instance.
|
@@ -1366,6 +1948,108 @@ module Google
|
|
1366
1948
|
execute_or_queue_command(command, &block)
|
1367
1949
|
end
|
1368
1950
|
|
1951
|
+
# Get Disk Shrink Config for a given instance.
|
1952
|
+
# @param [String] project
|
1953
|
+
# Project ID of the project that contains the instance.
|
1954
|
+
# @param [String] instance
|
1955
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
1956
|
+
# @param [String] fields
|
1957
|
+
# Selector specifying which fields to include in a partial response.
|
1958
|
+
# @param [String] quota_user
|
1959
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1960
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1961
|
+
# @param [Google::Apis::RequestOptions] options
|
1962
|
+
# Request-specific options
|
1963
|
+
#
|
1964
|
+
# @yield [result, err] Result & error if block supplied
|
1965
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse] parsed result object
|
1966
|
+
# @yieldparam err [StandardError] error object if request failed
|
1967
|
+
#
|
1968
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse]
|
1969
|
+
#
|
1970
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1971
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1972
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1973
|
+
def get_project_instance_disk_shrink_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
1974
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig', options)
|
1975
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse::Representation
|
1976
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse
|
1977
|
+
command.params['project'] = project unless project.nil?
|
1978
|
+
command.params['instance'] = instance unless instance.nil?
|
1979
|
+
command.query['fields'] = fields unless fields.nil?
|
1980
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1981
|
+
execute_or_queue_command(command, &block)
|
1982
|
+
end
|
1983
|
+
|
1984
|
+
# Get Latest Recovery Time for a given instance.
|
1985
|
+
# @param [String] project
|
1986
|
+
# Project ID of the project that contains the instance.
|
1987
|
+
# @param [String] instance
|
1988
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
1989
|
+
# @param [String] fields
|
1990
|
+
# Selector specifying which fields to include in a partial response.
|
1991
|
+
# @param [String] quota_user
|
1992
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1993
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1994
|
+
# @param [Google::Apis::RequestOptions] options
|
1995
|
+
# Request-specific options
|
1996
|
+
#
|
1997
|
+
# @yield [result, err] Result & error if block supplied
|
1998
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse] parsed result object
|
1999
|
+
# @yieldparam err [StandardError] error object if request failed
|
2000
|
+
#
|
2001
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse]
|
2002
|
+
#
|
2003
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2004
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2005
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2006
|
+
def get_project_instance_latest_recovery_time(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2007
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime', options)
|
2008
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse::Representation
|
2009
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse
|
2010
|
+
command.params['project'] = project unless project.nil?
|
2011
|
+
command.params['instance'] = instance unless instance.nil?
|
2012
|
+
command.query['fields'] = fields unless fields.nil?
|
2013
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2014
|
+
execute_or_queue_command(command, &block)
|
2015
|
+
end
|
2016
|
+
|
2017
|
+
# Perform Disk Shrink on primary instance.
|
2018
|
+
# @param [String] project
|
2019
|
+
# Project ID of the project that contains the instance.
|
2020
|
+
# @param [String] instance
|
2021
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
2022
|
+
# @param [Google::Apis::SqladminV1beta4::PerformDiskShrinkContext] perform_disk_shrink_context_object
|
2023
|
+
# @param [String] fields
|
2024
|
+
# Selector specifying which fields to include in a partial response.
|
2025
|
+
# @param [String] quota_user
|
2026
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2027
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2028
|
+
# @param [Google::Apis::RequestOptions] options
|
2029
|
+
# Request-specific options
|
2030
|
+
#
|
2031
|
+
# @yield [result, err] Result & error if block supplied
|
2032
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2033
|
+
# @yieldparam err [StandardError] error object if request failed
|
2034
|
+
#
|
2035
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2036
|
+
#
|
2037
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2038
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2039
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2040
|
+
def perform_project_instance_disk_shrink(project, instance, perform_disk_shrink_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2041
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink', options)
|
2042
|
+
command.request_representation = Google::Apis::SqladminV1beta4::PerformDiskShrinkContext::Representation
|
2043
|
+
command.request_object = perform_disk_shrink_context_object
|
2044
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
2045
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2046
|
+
command.params['project'] = project unless project.nil?
|
2047
|
+
command.params['instance'] = instance unless instance.nil?
|
2048
|
+
command.query['fields'] = fields unless fields.nil?
|
2049
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2050
|
+
execute_or_queue_command(command, &block)
|
2051
|
+
end
|
2052
|
+
|
1369
2053
|
# Reschedules the maintenance on the given instance.
|
1370
2054
|
# @param [String] project
|
1371
2055
|
# ID of the project that contains the instance.
|
@@ -1402,6 +2086,42 @@ module Google
|
|
1402
2086
|
execute_or_queue_command(command, &block)
|
1403
2087
|
end
|
1404
2088
|
|
2089
|
+
# Reset Replica Size to primary instance disk size.
|
2090
|
+
# @param [String] project
|
2091
|
+
# ID of the project that contains the read replica.
|
2092
|
+
# @param [String] instance
|
2093
|
+
# Cloud SQL read replica instance name.
|
2094
|
+
# @param [Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest] sql_instances_reset_replica_size_request_object
|
2095
|
+
# @param [String] fields
|
2096
|
+
# Selector specifying which fields to include in a partial response.
|
2097
|
+
# @param [String] quota_user
|
2098
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2099
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2100
|
+
# @param [Google::Apis::RequestOptions] options
|
2101
|
+
# Request-specific options
|
2102
|
+
#
|
2103
|
+
# @yield [result, err] Result & error if block supplied
|
2104
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2105
|
+
# @yieldparam err [StandardError] error object if request failed
|
2106
|
+
#
|
2107
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2108
|
+
#
|
2109
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2110
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2111
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2112
|
+
def reset_project_instance_replica_size(project, instance, sql_instances_reset_replica_size_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2113
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize', options)
|
2114
|
+
command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest::Representation
|
2115
|
+
command.request_object = sql_instances_reset_replica_size_request_object
|
2116
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
2117
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2118
|
+
command.params['project'] = project unless project.nil?
|
2119
|
+
command.params['instance'] = instance unless instance.nil?
|
2120
|
+
command.query['fields'] = fields unless fields.nil?
|
2121
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2122
|
+
execute_or_queue_command(command, &block)
|
2123
|
+
end
|
2124
|
+
|
1405
2125
|
# Start External primary instance migration.
|
1406
2126
|
# @param [String] project
|
1407
2127
|
# ID of the project that contains the instance.
|