google-apis-sqladmin_v1beta4 0.41.0 → 0.89.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 +201 -0
- data/OVERVIEW.md +2 -2
- data/lib/google/apis/sqladmin_v1beta4/classes.rb +2359 -61
- data/lib/google/apis/sqladmin_v1beta4/gem_version.rb +3 -3
- data/lib/google/apis/sqladmin_v1beta4/representations.rb +871 -2
- data/lib/google/apis/sqladmin_v1beta4/service.rb +778 -20
- 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,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,11 +708,126 @@ 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?
|
717
|
+
command.query['fields'] = fields unless fields.nil?
|
718
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
719
|
+
execute_or_queue_command(command, &block)
|
720
|
+
end
|
721
|
+
|
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.
|
728
|
+
# @param [String] project
|
729
|
+
# Required. Project ID of the project that contains the instance.
|
730
|
+
# @param [String] instance
|
731
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
732
|
+
# @param [String] fields
|
733
|
+
# Selector specifying which fields to include in a partial response.
|
734
|
+
# @param [String] quota_user
|
735
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
736
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
737
|
+
# @param [Google::Apis::RequestOptions] options
|
738
|
+
# Request-specific options
|
739
|
+
#
|
740
|
+
# @yield [result, err] Result & error if block supplied
|
741
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse] parsed result object
|
742
|
+
# @yieldparam err [StandardError] error object if request failed
|
743
|
+
#
|
744
|
+
# @return [Google::Apis::SqladminV1beta4::InstancesListServerCertificatesResponse]
|
745
|
+
#
|
746
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
747
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
748
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
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
|
753
|
+
command.params['project'] = project unless project.nil?
|
754
|
+
command.params['instance'] = instance unless instance.nil?
|
755
|
+
command.query['fields'] = fields unless fields.nil?
|
756
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
757
|
+
execute_or_queue_command(command, &block)
|
758
|
+
end
|
759
|
+
|
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.
|
763
|
+
# @param [String] project
|
764
|
+
# Required. Project ID of the project that contains the instance.
|
765
|
+
# @param [String] instance
|
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
|
768
|
+
# @param [String] fields
|
769
|
+
# Selector specifying which fields to include in a partial response.
|
770
|
+
# @param [String] quota_user
|
771
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
772
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
773
|
+
# @param [Google::Apis::RequestOptions] options
|
774
|
+
# Request-specific options
|
775
|
+
#
|
776
|
+
# @yield [result, err] Result & error if block supplied
|
777
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
778
|
+
# @yieldparam err [StandardError] error object if request failed
|
779
|
+
#
|
780
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
781
|
+
#
|
782
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
783
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
784
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
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
|
789
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
790
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
791
|
+
command.params['project'] = project unless project.nil?
|
792
|
+
command.params['instance'] = instance unless instance.nil?
|
793
|
+
command.query['fields'] = fields unless fields.nil?
|
794
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
795
|
+
execute_or_queue_command(command, &block)
|
796
|
+
end
|
797
|
+
|
798
|
+
# Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
|
799
|
+
# @param [String] project
|
800
|
+
# Required. ID of the project that contains the instance (Example: project-id).
|
801
|
+
# @param [String] instance
|
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
|
806
|
+
# @param [String] fields
|
807
|
+
# Selector specifying which fields to include in a partial response.
|
808
|
+
# @param [String] quota_user
|
809
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
810
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
811
|
+
# @param [Google::Apis::RequestOptions] options
|
812
|
+
# Request-specific options
|
813
|
+
#
|
814
|
+
# @yield [result, err] Result & error if block supplied
|
815
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse] parsed result object
|
816
|
+
# @yieldparam err [StandardError] error object if request failed
|
817
|
+
#
|
818
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse]
|
819
|
+
#
|
820
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
821
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
822
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
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
|
829
|
+
command.params['project'] = project unless project.nil?
|
830
|
+
command.params['instance'] = instance unless instance.nil?
|
527
831
|
command.query['fields'] = fields unless fields.nil?
|
528
832
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
529
833
|
execute_or_queue_command(command, &block)
|
@@ -533,7 +837,8 @@ module Google
|
|
533
837
|
# instance. Required to prepare for a certificate rotation. If a CA version was
|
534
838
|
# previously added but never used in a certificate rotation, this operation
|
535
839
|
# replaces that version. There cannot be more than one CA version waiting to be
|
536
|
-
# rotated in.
|
840
|
+
# rotated in. For instances that have enabled Certificate Authority Service (CAS)
|
841
|
+
# based server CA, use AddServerCertificate to add a new server certificate.
|
537
842
|
# @param [String] project
|
538
843
|
# Project ID of the project that contains the instance.
|
539
844
|
# @param [String] instance
|
@@ -566,6 +871,44 @@ module Google
|
|
566
871
|
execute_or_queue_command(command, &block)
|
567
872
|
end
|
568
873
|
|
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.
|
880
|
+
# @param [String] project
|
881
|
+
# Required. Project ID of the project that contains the instance.
|
882
|
+
# @param [String] instance
|
883
|
+
# Required. Cloud SQL instance ID. This does not include the project ID.
|
884
|
+
# @param [String] fields
|
885
|
+
# Selector specifying which fields to include in a partial response.
|
886
|
+
# @param [String] quota_user
|
887
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
888
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
889
|
+
# @param [Google::Apis::RequestOptions] options
|
890
|
+
# Request-specific options
|
891
|
+
#
|
892
|
+
# @yield [result, err] Result & error if block supplied
|
893
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
894
|
+
# @yieldparam err [StandardError] error object if request failed
|
895
|
+
#
|
896
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
897
|
+
#
|
898
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
899
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
900
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
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)
|
903
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
904
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
905
|
+
command.params['project'] = project unless project.nil?
|
906
|
+
command.params['instance'] = instance unless instance.nil?
|
907
|
+
command.query['fields'] = fields unless fields.nil?
|
908
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
909
|
+
execute_or_queue_command(command, &block)
|
910
|
+
end
|
911
|
+
|
569
912
|
# Creates a Cloud SQL instance as a clone of the source instance. Using this
|
570
913
|
# operation might cause your instance to restart.
|
571
914
|
# @param [String] project
|
@@ -609,6 +952,15 @@ module Google
|
|
609
952
|
# Project ID of the project that contains the instance to be deleted.
|
610
953
|
# @param [String] instance
|
611
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.
|
612
964
|
# @param [String] fields
|
613
965
|
# Selector specifying which fields to include in a partial response.
|
614
966
|
# @param [String] quota_user
|
@@ -626,12 +978,53 @@ module Google
|
|
626
978
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
627
979
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
628
980
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
629
|
-
def delete_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
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)
|
630
982
|
command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
|
631
983
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
632
984
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
633
985
|
command.params['project'] = project unless project.nil?
|
634
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?
|
991
|
+
command.query['fields'] = fields unless fields.nil?
|
992
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
993
|
+
execute_or_queue_command(command, &block)
|
994
|
+
end
|
995
|
+
|
996
|
+
# Demotes an existing standalone instance to be a Cloud SQL read replica for an
|
997
|
+
# external database server.
|
998
|
+
# @param [String] project
|
999
|
+
# Required. The project ID of the project that contains the instance.
|
1000
|
+
# @param [String] instance
|
1001
|
+
# Required. The name of the Cloud SQL instance.
|
1002
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteRequest] instances_demote_request_object
|
1003
|
+
# @param [String] fields
|
1004
|
+
# Selector specifying which fields to include in a partial response.
|
1005
|
+
# @param [String] quota_user
|
1006
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1007
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1008
|
+
# @param [Google::Apis::RequestOptions] options
|
1009
|
+
# Request-specific options
|
1010
|
+
#
|
1011
|
+
# @yield [result, err] Result & error if block supplied
|
1012
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
1013
|
+
# @yieldparam err [StandardError] error object if request failed
|
1014
|
+
#
|
1015
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
1016
|
+
#
|
1017
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1018
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1019
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
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
|
1024
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1025
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1026
|
+
command.params['project'] = project unless project.nil?
|
1027
|
+
command.params['instance'] = instance unless instance.nil?
|
635
1028
|
command.query['fields'] = fields unless fields.nil?
|
636
1029
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
637
1030
|
execute_or_queue_command(command, &block)
|
@@ -642,8 +1035,44 @@ module Google
|
|
642
1035
|
# @param [String] project
|
643
1036
|
# ID of the project that contains the instance.
|
644
1037
|
# @param [String] instance
|
645
|
-
# Cloud SQL instance name.
|
646
|
-
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest] instances_demote_master_request_object
|
1038
|
+
# Cloud SQL instance name.
|
1039
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest] instances_demote_master_request_object
|
1040
|
+
# @param [String] fields
|
1041
|
+
# Selector specifying which fields to include in a partial response.
|
1042
|
+
# @param [String] quota_user
|
1043
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1044
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1045
|
+
# @param [Google::Apis::RequestOptions] options
|
1046
|
+
# Request-specific options
|
1047
|
+
#
|
1048
|
+
# @yield [result, err] Result & error if block supplied
|
1049
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
1050
|
+
# @yieldparam err [StandardError] error object if request failed
|
1051
|
+
#
|
1052
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
1053
|
+
#
|
1054
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1055
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1056
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
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
|
1061
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1062
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1063
|
+
command.params['project'] = project unless project.nil?
|
1064
|
+
command.params['instance'] = instance unless instance.nil?
|
1065
|
+
command.query['fields'] = fields unless fields.nil?
|
1066
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1067
|
+
execute_or_queue_command(command, &block)
|
1068
|
+
end
|
1069
|
+
|
1070
|
+
# Execute SQL statements.
|
1071
|
+
# @param [String] project
|
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
|
647
1076
|
# @param [String] fields
|
648
1077
|
# Selector specifying which fields to include in a partial response.
|
649
1078
|
# @param [String] quota_user
|
@@ -653,20 +1082,20 @@ module Google
|
|
653
1082
|
# Request-specific options
|
654
1083
|
#
|
655
1084
|
# @yield [result, err] Result & error if block supplied
|
656
|
-
# @yieldparam result [Google::Apis::SqladminV1beta4::
|
1085
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesExecuteSqlResponse] parsed result object
|
657
1086
|
# @yieldparam err [StandardError] error object if request failed
|
658
1087
|
#
|
659
|
-
# @return [Google::Apis::SqladminV1beta4::
|
1088
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesExecuteSqlResponse]
|
660
1089
|
#
|
661
1090
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
662
1091
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
663
1092
|
# @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::
|
667
|
-
command.request_object =
|
668
|
-
command.response_representation = Google::Apis::SqladminV1beta4::
|
669
|
-
command.response_class = Google::Apis::SqladminV1beta4::
|
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
|
670
1099
|
command.params['project'] = project unless project.nil?
|
671
1100
|
command.params['instance'] = instance unless instance.nil?
|
672
1101
|
command.query['fields'] = fields unless fields.nil?
|
@@ -679,7 +1108,7 @@ module Google
|
|
679
1108
|
# @param [String] project
|
680
1109
|
# Project ID of the project that contains the instance to be exported.
|
681
1110
|
# @param [String] instance
|
682
|
-
# Cloud SQL instance ID. This
|
1111
|
+
# The Cloud SQL instance ID. This doesn't include the project ID.
|
683
1112
|
# @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object
|
684
1113
|
# @param [String] fields
|
685
1114
|
# Selector specifying which fields to include in a partial response.
|
@@ -978,12 +1407,53 @@ 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
|
+
# Promotes the read replica instance to be an independent Cloud SQL primary
|
1446
|
+
# instance. Using this operation might cause your instance to restart.
|
983
1447
|
# @param [String] project
|
984
1448
|
# ID of the project that contains the read replica.
|
985
1449
|
# @param [String] instance
|
986
1450
|
# Cloud SQL read replica instance name.
|
1451
|
+
# @param [Boolean] failover
|
1452
|
+
# Set to true to invoke a replica failover to the DR replica. As part of replica
|
1453
|
+
# failover, the promote operation attempts to add the original primary instance
|
1454
|
+
# as a replica of the promoted DR replica when the original primary instance
|
1455
|
+
# comes back online. If set to false or not specified, then the original primary
|
1456
|
+
# instance becomes an independent Cloud SQL primary instance.
|
987
1457
|
# @param [String] fields
|
988
1458
|
# Selector specifying which fields to include in a partial response.
|
989
1459
|
# @param [String] quota_user
|
@@ -1001,12 +1471,85 @@ module Google
|
|
1001
1471
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1002
1472
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1003
1473
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1004
|
-
def promote_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
1474
|
+
def promote_instance_replica(project, instance, failover: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1005
1475
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', options)
|
1006
1476
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1007
1477
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1008
1478
|
command.params['project'] = project unless project.nil?
|
1009
1479
|
command.params['instance'] = instance unless instance.nil?
|
1480
|
+
command.query['failover'] = failover unless failover.nil?
|
1481
|
+
command.query['fields'] = fields unless fields.nil?
|
1482
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1483
|
+
execute_or_queue_command(command, &block)
|
1484
|
+
end
|
1485
|
+
|
1486
|
+
# Reencrypt CMEK instance with latest key version.
|
1487
|
+
# @param [String] project
|
1488
|
+
# ID of the project that contains the instance.
|
1489
|
+
# @param [String] instance
|
1490
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
1491
|
+
# @param [Google::Apis::SqladminV1beta4::InstancesReencryptRequest] instances_reencrypt_request_object
|
1492
|
+
# @param [String] fields
|
1493
|
+
# Selector specifying which fields to include in a partial response.
|
1494
|
+
# @param [String] quota_user
|
1495
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1496
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1497
|
+
# @param [Google::Apis::RequestOptions] options
|
1498
|
+
# Request-specific options
|
1499
|
+
#
|
1500
|
+
# @yield [result, err] Result & error if block supplied
|
1501
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
1502
|
+
# @yieldparam err [StandardError] error object if request failed
|
1503
|
+
#
|
1504
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
1505
|
+
#
|
1506
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1507
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1508
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1509
|
+
def reencrypt_instance(project, instance, instances_reencrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
1510
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/reencrypt', options)
|
1511
|
+
command.request_representation = Google::Apis::SqladminV1beta4::InstancesReencryptRequest::Representation
|
1512
|
+
command.request_object = instances_reencrypt_request_object
|
1513
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1514
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1515
|
+
command.params['project'] = project unless project.nil?
|
1516
|
+
command.params['instance'] = instance unless instance.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
|
+
# Release a lease for the setup of SQL Server Reporting Services (SSRS).
|
1523
|
+
# @param [String] project
|
1524
|
+
# Required. The ID of the project that contains the instance (Example: project-
|
1525
|
+
# id).
|
1526
|
+
# @param [String] instance
|
1527
|
+
# Required. The Cloud SQL instance ID. This doesn't include the project ID. It's
|
1528
|
+
# composed of lowercase letters, numbers, and hyphens, and it must start with a
|
1529
|
+
# letter. The total length must be 98 characters or less (Example: instance-id).
|
1530
|
+
# @param [String] fields
|
1531
|
+
# Selector specifying which fields to include in a partial response.
|
1532
|
+
# @param [String] quota_user
|
1533
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1534
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1535
|
+
# @param [Google::Apis::RequestOptions] options
|
1536
|
+
# Request-specific options
|
1537
|
+
#
|
1538
|
+
# @yield [result, err] Result & error if block supplied
|
1539
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse] parsed result object
|
1540
|
+
# @yieldparam err [StandardError] error object if request failed
|
1541
|
+
#
|
1542
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse]
|
1543
|
+
#
|
1544
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1545
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1546
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1547
|
+
def release_instance_ssrs_lease(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
1548
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease', options)
|
1549
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse::Representation
|
1550
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse
|
1551
|
+
command.params['project'] = project unless project.nil?
|
1552
|
+
command.params['instance'] = instance unless instance.nil?
|
1010
1553
|
command.query['fields'] = fields unless fields.nil?
|
1011
1554
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1012
1555
|
execute_or_queue_command(command, &block)
|
@@ -1117,7 +1660,9 @@ module Google
|
|
1117
1660
|
end
|
1118
1661
|
|
1119
1662
|
# Rotates the server certificate to one signed by the Certificate Authority (CA)
|
1120
|
-
# version previously added with the addServerCA method.
|
1663
|
+
# version previously added with the addServerCA method. For instances that have
|
1664
|
+
# enabled Certificate Authority Service (CAS) based server CA, use
|
1665
|
+
# RotateServerCertificate to rotate the server certificate.
|
1121
1666
|
# @param [String] project
|
1122
1667
|
# Project ID of the project that contains the instance.
|
1123
1668
|
# @param [String] instance
|
@@ -1219,6 +1764,44 @@ module Google
|
|
1219
1764
|
execute_or_queue_command(command, &block)
|
1220
1765
|
end
|
1221
1766
|
|
1767
|
+
# Switches over from the primary instance to the DR replica instance.
|
1768
|
+
# @param [String] project
|
1769
|
+
# ID of the project that contains the replica.
|
1770
|
+
# @param [String] instance
|
1771
|
+
# Cloud SQL read replica instance name.
|
1772
|
+
# @param [String] db_timeout
|
1773
|
+
# Optional. (MySQL and PostgreSQL only) Cloud SQL instance operations timeout,
|
1774
|
+
# which is a sum of all database operations. Default value is 10 minutes and can
|
1775
|
+
# be modified to a maximum value of 24 hours.
|
1776
|
+
# @param [String] fields
|
1777
|
+
# Selector specifying which fields to include in a partial response.
|
1778
|
+
# @param [String] quota_user
|
1779
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1780
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1781
|
+
# @param [Google::Apis::RequestOptions] options
|
1782
|
+
# Request-specific options
|
1783
|
+
#
|
1784
|
+
# @yield [result, err] Result & error if block supplied
|
1785
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
1786
|
+
# @yieldparam err [StandardError] error object if request failed
|
1787
|
+
#
|
1788
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
1789
|
+
#
|
1790
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1791
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1792
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1793
|
+
def switchover_instance(project, instance, db_timeout: nil, fields: nil, quota_user: nil, options: nil, &block)
|
1794
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/switchover', options)
|
1795
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
1796
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
1797
|
+
command.params['project'] = project unless project.nil?
|
1798
|
+
command.params['instance'] = instance unless instance.nil?
|
1799
|
+
command.query['dbTimeout'] = db_timeout unless db_timeout.nil?
|
1800
|
+
command.query['fields'] = fields unless fields.nil?
|
1801
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1802
|
+
execute_or_queue_command(command, &block)
|
1803
|
+
end
|
1804
|
+
|
1222
1805
|
# Truncate MySQL general and slow query log tables MySQL only.
|
1223
1806
|
# @param [String] project
|
1224
1807
|
# Project ID of the Cloud SQL project.
|
@@ -1292,6 +1875,39 @@ module Google
|
|
1292
1875
|
execute_or_queue_command(command, &block)
|
1293
1876
|
end
|
1294
1877
|
|
1878
|
+
# Cancels an instance operation that has been performed on an instance.
|
1879
|
+
# @param [String] project
|
1880
|
+
# Project ID of the project that contains the instance.
|
1881
|
+
# @param [String] operation
|
1882
|
+
# Instance operation ID.
|
1883
|
+
# @param [String] fields
|
1884
|
+
# Selector specifying which fields to include in a partial response.
|
1885
|
+
# @param [String] quota_user
|
1886
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1887
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1888
|
+
# @param [Google::Apis::RequestOptions] options
|
1889
|
+
# Request-specific options
|
1890
|
+
#
|
1891
|
+
# @yield [result, err] Result & error if block supplied
|
1892
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Empty] parsed result object
|
1893
|
+
# @yieldparam err [StandardError] error object if request failed
|
1894
|
+
#
|
1895
|
+
# @return [Google::Apis::SqladminV1beta4::Empty]
|
1896
|
+
#
|
1897
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1898
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1899
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1900
|
+
def cancel_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
|
1901
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/operations/{operation}/cancel', options)
|
1902
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Empty::Representation
|
1903
|
+
command.response_class = Google::Apis::SqladminV1beta4::Empty
|
1904
|
+
command.params['project'] = project unless project.nil?
|
1905
|
+
command.params['operation'] = operation unless operation.nil?
|
1906
|
+
command.query['fields'] = fields unless fields.nil?
|
1907
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1908
|
+
execute_or_queue_command(command, &block)
|
1909
|
+
end
|
1910
|
+
|
1295
1911
|
# Retrieves an instance operation that has been performed on an instance.
|
1296
1912
|
# @param [String] project
|
1297
1913
|
# Project ID of the project that contains the instance.
|
@@ -1366,6 +1982,112 @@ module Google
|
|
1366
1982
|
execute_or_queue_command(command, &block)
|
1367
1983
|
end
|
1368
1984
|
|
1985
|
+
# Get Disk Shrink Config for a given instance.
|
1986
|
+
# @param [String] project
|
1987
|
+
# Project ID of the project that contains the instance.
|
1988
|
+
# @param [String] instance
|
1989
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
1990
|
+
# @param [String] fields
|
1991
|
+
# Selector specifying which fields to include in a partial response.
|
1992
|
+
# @param [String] quota_user
|
1993
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1994
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1995
|
+
# @param [Google::Apis::RequestOptions] options
|
1996
|
+
# Request-specific options
|
1997
|
+
#
|
1998
|
+
# @yield [result, err] Result & error if block supplied
|
1999
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse] parsed result object
|
2000
|
+
# @yieldparam err [StandardError] error object if request failed
|
2001
|
+
#
|
2002
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse]
|
2003
|
+
#
|
2004
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2005
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2006
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2007
|
+
def get_project_instance_disk_shrink_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2008
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig', options)
|
2009
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse::Representation
|
2010
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse
|
2011
|
+
command.params['project'] = project unless project.nil?
|
2012
|
+
command.params['instance'] = instance unless instance.nil?
|
2013
|
+
command.query['fields'] = fields unless fields.nil?
|
2014
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2015
|
+
execute_or_queue_command(command, &block)
|
2016
|
+
end
|
2017
|
+
|
2018
|
+
# Get Latest Recovery Time for a given instance.
|
2019
|
+
# @param [String] project
|
2020
|
+
# Project ID of the project that contains the instance.
|
2021
|
+
# @param [String] instance
|
2022
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
2023
|
+
# @param [String] source_instance_deletion_time
|
2024
|
+
# The timestamp used to identify the time when the source instance is deleted.
|
2025
|
+
# If this instance is deleted, then you must set the timestamp.
|
2026
|
+
# @param [String] fields
|
2027
|
+
# Selector specifying which fields to include in a partial response.
|
2028
|
+
# @param [String] quota_user
|
2029
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2030
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2031
|
+
# @param [Google::Apis::RequestOptions] options
|
2032
|
+
# Request-specific options
|
2033
|
+
#
|
2034
|
+
# @yield [result, err] Result & error if block supplied
|
2035
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse] parsed result object
|
2036
|
+
# @yieldparam err [StandardError] error object if request failed
|
2037
|
+
#
|
2038
|
+
# @return [Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse]
|
2039
|
+
#
|
2040
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2041
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2042
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2043
|
+
def get_project_instance_latest_recovery_time(project, instance, source_instance_deletion_time: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2044
|
+
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime', options)
|
2045
|
+
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse::Representation
|
2046
|
+
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse
|
2047
|
+
command.params['project'] = project unless project.nil?
|
2048
|
+
command.params['instance'] = instance unless instance.nil?
|
2049
|
+
command.query['sourceInstanceDeletionTime'] = source_instance_deletion_time unless source_instance_deletion_time.nil?
|
2050
|
+
command.query['fields'] = fields unless fields.nil?
|
2051
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2052
|
+
execute_or_queue_command(command, &block)
|
2053
|
+
end
|
2054
|
+
|
2055
|
+
# Perform Disk Shrink on primary instance.
|
2056
|
+
# @param [String] project
|
2057
|
+
# Project ID of the project that contains the instance.
|
2058
|
+
# @param [String] instance
|
2059
|
+
# Cloud SQL instance ID. This does not include the project ID.
|
2060
|
+
# @param [Google::Apis::SqladminV1beta4::PerformDiskShrinkContext] perform_disk_shrink_context_object
|
2061
|
+
# @param [String] fields
|
2062
|
+
# Selector specifying which fields to include in a partial response.
|
2063
|
+
# @param [String] quota_user
|
2064
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2065
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2066
|
+
# @param [Google::Apis::RequestOptions] options
|
2067
|
+
# Request-specific options
|
2068
|
+
#
|
2069
|
+
# @yield [result, err] Result & error if block supplied
|
2070
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2071
|
+
# @yieldparam err [StandardError] error object if request failed
|
2072
|
+
#
|
2073
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2074
|
+
#
|
2075
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2076
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2077
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2078
|
+
def perform_project_instance_disk_shrink(project, instance, perform_disk_shrink_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2079
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink', options)
|
2080
|
+
command.request_representation = Google::Apis::SqladminV1beta4::PerformDiskShrinkContext::Representation
|
2081
|
+
command.request_object = perform_disk_shrink_context_object
|
2082
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
2083
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2084
|
+
command.params['project'] = project unless project.nil?
|
2085
|
+
command.params['instance'] = instance unless instance.nil?
|
2086
|
+
command.query['fields'] = fields unless fields.nil?
|
2087
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2088
|
+
execute_or_queue_command(command, &block)
|
2089
|
+
end
|
2090
|
+
|
1369
2091
|
# Reschedules the maintenance on the given instance.
|
1370
2092
|
# @param [String] project
|
1371
2093
|
# ID of the project that contains the instance.
|
@@ -1402,6 +2124,42 @@ module Google
|
|
1402
2124
|
execute_or_queue_command(command, &block)
|
1403
2125
|
end
|
1404
2126
|
|
2127
|
+
# Reset Replica Size to primary instance disk size.
|
2128
|
+
# @param [String] project
|
2129
|
+
# ID of the project that contains the read replica.
|
2130
|
+
# @param [String] instance
|
2131
|
+
# Cloud SQL read replica instance name.
|
2132
|
+
# @param [Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest] sql_instances_reset_replica_size_request_object
|
2133
|
+
# @param [String] fields
|
2134
|
+
# Selector specifying which fields to include in a partial response.
|
2135
|
+
# @param [String] quota_user
|
2136
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2137
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2138
|
+
# @param [Google::Apis::RequestOptions] options
|
2139
|
+
# Request-specific options
|
2140
|
+
#
|
2141
|
+
# @yield [result, err] Result & error if block supplied
|
2142
|
+
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2143
|
+
# @yieldparam err [StandardError] error object if request failed
|
2144
|
+
#
|
2145
|
+
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2146
|
+
#
|
2147
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2148
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2149
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2150
|
+
def reset_project_instance_replica_size(project, instance, sql_instances_reset_replica_size_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2151
|
+
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize', options)
|
2152
|
+
command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest::Representation
|
2153
|
+
command.request_object = sql_instances_reset_replica_size_request_object
|
2154
|
+
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
2155
|
+
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2156
|
+
command.params['project'] = project unless project.nil?
|
2157
|
+
command.params['instance'] = instance unless instance.nil?
|
2158
|
+
command.query['fields'] = fields unless fields.nil?
|
2159
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2160
|
+
execute_or_queue_command(command, &block)
|
2161
|
+
end
|
2162
|
+
|
1405
2163
|
# Start External primary instance migration.
|
1406
2164
|
# @param [String] project
|
1407
2165
|
# ID of the project that contains the instance.
|