google-apis-sqladmin_v1beta4 0.41.0 → 0.83.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.
@@ -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('https://sqladmin.googleapis.com/', '',
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)
@@ -679,7 +1072,7 @@ module Google
679
1072
  # @param [String] project
680
1073
  # Project ID of the project that contains the instance to be exported.
681
1074
  # @param [String] instance
682
- # Cloud SQL instance ID. This does not include the project ID.
1075
+ # The Cloud SQL instance ID. This doesn't include the project ID.
683
1076
  # @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object
684
1077
  # @param [String] fields
685
1078
  # Selector specifying which fields to include in a partial response.
@@ -978,12 +1371,53 @@ module Google
978
1371
  execute_or_queue_command(command, &block)
979
1372
  end
980
1373
 
981
- # Promotes the read replica instance to be a stand-alone Cloud SQL instance.
982
- # Using this operation might cause your instance to restart.
1374
+ # Point in time restore for an instance managed by Google Cloud Backup and
1375
+ # Disaster Recovery.
1376
+ # @param [String] parent
1377
+ # Required. The parent resource where you created this instance. Format:
1378
+ # projects/`project`
1379
+ # @param [Google::Apis::SqladminV1beta4::PointInTimeRestoreContext] point_in_time_restore_context_object
1380
+ # @param [String] fields
1381
+ # Selector specifying which fields to include in a partial response.
1382
+ # @param [String] quota_user
1383
+ # Available to use for quota purposes for server-side applications. Can be any
1384
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1385
+ # @param [Google::Apis::RequestOptions] options
1386
+ # Request-specific options
1387
+ #
1388
+ # @yield [result, err] Result & error if block supplied
1389
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1390
+ # @yieldparam err [StandardError] error object if request failed
1391
+ #
1392
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1393
+ #
1394
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1395
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1396
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1397
+ def point_instance_in_time_restore(parent, point_in_time_restore_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1398
+ command = make_simple_command(:post, 'sql/v1beta4/{+parent}:pointInTimeRestore', options)
1399
+ command.request_representation = Google::Apis::SqladminV1beta4::PointInTimeRestoreContext::Representation
1400
+ command.request_object = point_in_time_restore_context_object
1401
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1402
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1403
+ command.params['parent'] = parent unless parent.nil?
1404
+ command.query['fields'] = fields unless fields.nil?
1405
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1406
+ execute_or_queue_command(command, &block)
1407
+ end
1408
+
1409
+ # Promotes the read replica instance to be an independent Cloud SQL primary
1410
+ # instance. Using this operation might cause your instance to restart.
983
1411
  # @param [String] project
984
1412
  # ID of the project that contains the read replica.
985
1413
  # @param [String] instance
986
1414
  # Cloud SQL read replica instance name.
1415
+ # @param [Boolean] failover
1416
+ # Set to true to invoke a replica failover to the DR replica. As part of replica
1417
+ # failover, the promote operation attempts to add the original primary instance
1418
+ # as a replica of the promoted DR replica when the original primary instance
1419
+ # comes back online. If set to false or not specified, then the original primary
1420
+ # instance becomes an independent Cloud SQL primary instance.
987
1421
  # @param [String] fields
988
1422
  # Selector specifying which fields to include in a partial response.
989
1423
  # @param [String] quota_user
@@ -1001,12 +1435,85 @@ module Google
1001
1435
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1002
1436
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1003
1437
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1004
- def promote_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
1438
+ def promote_instance_replica(project, instance, failover: nil, fields: nil, quota_user: nil, options: nil, &block)
1005
1439
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', options)
1006
1440
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1007
1441
  command.response_class = Google::Apis::SqladminV1beta4::Operation
1008
1442
  command.params['project'] = project unless project.nil?
1009
1443
  command.params['instance'] = instance unless instance.nil?
1444
+ command.query['failover'] = failover unless failover.nil?
1445
+ command.query['fields'] = fields unless fields.nil?
1446
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1447
+ execute_or_queue_command(command, &block)
1448
+ end
1449
+
1450
+ # Reencrypt CMEK instance with latest key version.
1451
+ # @param [String] project
1452
+ # ID of the project that contains the instance.
1453
+ # @param [String] instance
1454
+ # Cloud SQL instance ID. This does not include the project ID.
1455
+ # @param [Google::Apis::SqladminV1beta4::InstancesReencryptRequest] instances_reencrypt_request_object
1456
+ # @param [String] fields
1457
+ # Selector specifying which fields to include in a partial response.
1458
+ # @param [String] quota_user
1459
+ # Available to use for quota purposes for server-side applications. Can be any
1460
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1461
+ # @param [Google::Apis::RequestOptions] options
1462
+ # Request-specific options
1463
+ #
1464
+ # @yield [result, err] Result & error if block supplied
1465
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1466
+ # @yieldparam err [StandardError] error object if request failed
1467
+ #
1468
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1469
+ #
1470
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1471
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1472
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1473
+ def reencrypt_instance(project, instance, instances_reencrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1474
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/reencrypt', options)
1475
+ command.request_representation = Google::Apis::SqladminV1beta4::InstancesReencryptRequest::Representation
1476
+ command.request_object = instances_reencrypt_request_object
1477
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1478
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1479
+ command.params['project'] = project unless project.nil?
1480
+ command.params['instance'] = instance unless instance.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
+ # Release a lease for the setup of SQL Server Reporting Services (SSRS).
1487
+ # @param [String] project
1488
+ # Required. The ID of the project that contains the instance (Example: project-
1489
+ # id).
1490
+ # @param [String] instance
1491
+ # Required. The Cloud SQL instance ID. This doesn't include the project ID. It's
1492
+ # composed of lowercase letters, numbers, and hyphens, and it must start with a
1493
+ # letter. The total length must be 98 characters or less (Example: instance-id).
1494
+ # @param [String] fields
1495
+ # Selector specifying which fields to include in a partial response.
1496
+ # @param [String] quota_user
1497
+ # Available to use for quota purposes for server-side applications. Can be any
1498
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1499
+ # @param [Google::Apis::RequestOptions] options
1500
+ # Request-specific options
1501
+ #
1502
+ # @yield [result, err] Result & error if block supplied
1503
+ # @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse] parsed result object
1504
+ # @yieldparam err [StandardError] error object if request failed
1505
+ #
1506
+ # @return [Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse]
1507
+ #
1508
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1509
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1510
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1511
+ def release_instance_ssrs_lease(project, instance, fields: nil, quota_user: nil, options: nil, &block)
1512
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease', options)
1513
+ command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse::Representation
1514
+ command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse
1515
+ command.params['project'] = project unless project.nil?
1516
+ command.params['instance'] = instance unless instance.nil?
1010
1517
  command.query['fields'] = fields unless fields.nil?
1011
1518
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1012
1519
  execute_or_queue_command(command, &block)
@@ -1117,7 +1624,9 @@ module Google
1117
1624
  end
1118
1625
 
1119
1626
  # Rotates the server certificate to one signed by the Certificate Authority (CA)
1120
- # version previously added with the addServerCA method.
1627
+ # version previously added with the addServerCA method. For instances that have
1628
+ # enabled Certificate Authority Service (CAS) based server CA, use
1629
+ # RotateServerCertificate to rotate the server certificate.
1121
1630
  # @param [String] project
1122
1631
  # Project ID of the project that contains the instance.
1123
1632
  # @param [String] instance
@@ -1219,6 +1728,44 @@ module Google
1219
1728
  execute_or_queue_command(command, &block)
1220
1729
  end
1221
1730
 
1731
+ # Switches over from the primary instance to the DR replica instance.
1732
+ # @param [String] project
1733
+ # ID of the project that contains the replica.
1734
+ # @param [String] instance
1735
+ # Cloud SQL read replica instance name.
1736
+ # @param [String] db_timeout
1737
+ # Optional. (MySQL and PostgreSQL only) Cloud SQL instance operations timeout,
1738
+ # which is a sum of all database operations. Default value is 10 minutes and can
1739
+ # be modified to a maximum value of 24 hours.
1740
+ # @param [String] fields
1741
+ # Selector specifying which fields to include in a partial response.
1742
+ # @param [String] quota_user
1743
+ # Available to use for quota purposes for server-side applications. Can be any
1744
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1745
+ # @param [Google::Apis::RequestOptions] options
1746
+ # Request-specific options
1747
+ #
1748
+ # @yield [result, err] Result & error if block supplied
1749
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
1750
+ # @yieldparam err [StandardError] error object if request failed
1751
+ #
1752
+ # @return [Google::Apis::SqladminV1beta4::Operation]
1753
+ #
1754
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1755
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1756
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1757
+ def switchover_instance(project, instance, db_timeout: nil, fields: nil, quota_user: nil, options: nil, &block)
1758
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/switchover', options)
1759
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
1760
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
1761
+ command.params['project'] = project unless project.nil?
1762
+ command.params['instance'] = instance unless instance.nil?
1763
+ command.query['dbTimeout'] = db_timeout unless db_timeout.nil?
1764
+ command.query['fields'] = fields unless fields.nil?
1765
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1766
+ execute_or_queue_command(command, &block)
1767
+ end
1768
+
1222
1769
  # Truncate MySQL general and slow query log tables MySQL only.
1223
1770
  # @param [String] project
1224
1771
  # Project ID of the Cloud SQL project.
@@ -1292,6 +1839,39 @@ module Google
1292
1839
  execute_or_queue_command(command, &block)
1293
1840
  end
1294
1841
 
1842
+ # Cancels an instance operation that has been performed on an instance.
1843
+ # @param [String] project
1844
+ # Project ID of the project that contains the instance.
1845
+ # @param [String] operation
1846
+ # Instance operation ID.
1847
+ # @param [String] fields
1848
+ # Selector specifying which fields to include in a partial response.
1849
+ # @param [String] quota_user
1850
+ # Available to use for quota purposes for server-side applications. Can be any
1851
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1852
+ # @param [Google::Apis::RequestOptions] options
1853
+ # Request-specific options
1854
+ #
1855
+ # @yield [result, err] Result & error if block supplied
1856
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Empty] parsed result object
1857
+ # @yieldparam err [StandardError] error object if request failed
1858
+ #
1859
+ # @return [Google::Apis::SqladminV1beta4::Empty]
1860
+ #
1861
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1862
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1863
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1864
+ def cancel_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
1865
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/operations/{operation}/cancel', options)
1866
+ command.response_representation = Google::Apis::SqladminV1beta4::Empty::Representation
1867
+ command.response_class = Google::Apis::SqladminV1beta4::Empty
1868
+ command.params['project'] = project unless project.nil?
1869
+ command.params['operation'] = operation unless operation.nil?
1870
+ command.query['fields'] = fields unless fields.nil?
1871
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1872
+ execute_or_queue_command(command, &block)
1873
+ end
1874
+
1295
1875
  # Retrieves an instance operation that has been performed on an instance.
1296
1876
  # @param [String] project
1297
1877
  # Project ID of the project that contains the instance.
@@ -1366,6 +1946,108 @@ module Google
1366
1946
  execute_or_queue_command(command, &block)
1367
1947
  end
1368
1948
 
1949
+ # Get Disk Shrink Config for a given instance.
1950
+ # @param [String] project
1951
+ # Project ID of the project that contains the instance.
1952
+ # @param [String] instance
1953
+ # Cloud SQL instance ID. This does not include the project ID.
1954
+ # @param [String] fields
1955
+ # Selector specifying which fields to include in a partial response.
1956
+ # @param [String] quota_user
1957
+ # Available to use for quota purposes for server-side applications. Can be any
1958
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1959
+ # @param [Google::Apis::RequestOptions] options
1960
+ # Request-specific options
1961
+ #
1962
+ # @yield [result, err] Result & error if block supplied
1963
+ # @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse] parsed result object
1964
+ # @yieldparam err [StandardError] error object if request failed
1965
+ #
1966
+ # @return [Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse]
1967
+ #
1968
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1969
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1970
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1971
+ def get_project_instance_disk_shrink_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
1972
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig', options)
1973
+ command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse::Representation
1974
+ command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse
1975
+ command.params['project'] = project unless project.nil?
1976
+ command.params['instance'] = instance unless instance.nil?
1977
+ command.query['fields'] = fields unless fields.nil?
1978
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1979
+ execute_or_queue_command(command, &block)
1980
+ end
1981
+
1982
+ # Get Latest Recovery Time for a given instance.
1983
+ # @param [String] project
1984
+ # Project ID of the project that contains the instance.
1985
+ # @param [String] instance
1986
+ # Cloud SQL instance ID. This does not include the project ID.
1987
+ # @param [String] fields
1988
+ # Selector specifying which fields to include in a partial response.
1989
+ # @param [String] quota_user
1990
+ # Available to use for quota purposes for server-side applications. Can be any
1991
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1992
+ # @param [Google::Apis::RequestOptions] options
1993
+ # Request-specific options
1994
+ #
1995
+ # @yield [result, err] Result & error if block supplied
1996
+ # @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse] parsed result object
1997
+ # @yieldparam err [StandardError] error object if request failed
1998
+ #
1999
+ # @return [Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse]
2000
+ #
2001
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2002
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2003
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2004
+ def get_project_instance_latest_recovery_time(project, instance, fields: nil, quota_user: nil, options: nil, &block)
2005
+ command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime', options)
2006
+ command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse::Representation
2007
+ command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse
2008
+ command.params['project'] = project unless project.nil?
2009
+ command.params['instance'] = instance unless instance.nil?
2010
+ command.query['fields'] = fields unless fields.nil?
2011
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2012
+ execute_or_queue_command(command, &block)
2013
+ end
2014
+
2015
+ # Perform Disk Shrink on primary instance.
2016
+ # @param [String] project
2017
+ # Project ID of the project that contains the instance.
2018
+ # @param [String] instance
2019
+ # Cloud SQL instance ID. This does not include the project ID.
2020
+ # @param [Google::Apis::SqladminV1beta4::PerformDiskShrinkContext] perform_disk_shrink_context_object
2021
+ # @param [String] fields
2022
+ # Selector specifying which fields to include in a partial response.
2023
+ # @param [String] quota_user
2024
+ # Available to use for quota purposes for server-side applications. Can be any
2025
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2026
+ # @param [Google::Apis::RequestOptions] options
2027
+ # Request-specific options
2028
+ #
2029
+ # @yield [result, err] Result & error if block supplied
2030
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
2031
+ # @yieldparam err [StandardError] error object if request failed
2032
+ #
2033
+ # @return [Google::Apis::SqladminV1beta4::Operation]
2034
+ #
2035
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2036
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2037
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2038
+ def perform_project_instance_disk_shrink(project, instance, perform_disk_shrink_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2039
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink', options)
2040
+ command.request_representation = Google::Apis::SqladminV1beta4::PerformDiskShrinkContext::Representation
2041
+ command.request_object = perform_disk_shrink_context_object
2042
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
2043
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
2044
+ command.params['project'] = project unless project.nil?
2045
+ command.params['instance'] = instance unless instance.nil?
2046
+ command.query['fields'] = fields unless fields.nil?
2047
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2048
+ execute_or_queue_command(command, &block)
2049
+ end
2050
+
1369
2051
  # Reschedules the maintenance on the given instance.
1370
2052
  # @param [String] project
1371
2053
  # ID of the project that contains the instance.
@@ -1402,6 +2084,42 @@ module Google
1402
2084
  execute_or_queue_command(command, &block)
1403
2085
  end
1404
2086
 
2087
+ # Reset Replica Size to primary instance disk size.
2088
+ # @param [String] project
2089
+ # ID of the project that contains the read replica.
2090
+ # @param [String] instance
2091
+ # Cloud SQL read replica instance name.
2092
+ # @param [Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest] sql_instances_reset_replica_size_request_object
2093
+ # @param [String] fields
2094
+ # Selector specifying which fields to include in a partial response.
2095
+ # @param [String] quota_user
2096
+ # Available to use for quota purposes for server-side applications. Can be any
2097
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2098
+ # @param [Google::Apis::RequestOptions] options
2099
+ # Request-specific options
2100
+ #
2101
+ # @yield [result, err] Result & error if block supplied
2102
+ # @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
2103
+ # @yieldparam err [StandardError] error object if request failed
2104
+ #
2105
+ # @return [Google::Apis::SqladminV1beta4::Operation]
2106
+ #
2107
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2108
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2109
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2110
+ def reset_project_instance_replica_size(project, instance, sql_instances_reset_replica_size_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2111
+ command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize', options)
2112
+ command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest::Representation
2113
+ command.request_object = sql_instances_reset_replica_size_request_object
2114
+ command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
2115
+ command.response_class = Google::Apis::SqladminV1beta4::Operation
2116
+ command.params['project'] = project unless project.nil?
2117
+ command.params['instance'] = instance unless instance.nil?
2118
+ command.query['fields'] = fields unless fields.nil?
2119
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2120
+ execute_or_queue_command(command, &block)
2121
+ end
2122
+
1405
2123
  # Start External primary instance migration.
1406
2124
  # @param [String] project
1407
2125
  # ID of the project that contains the instance.