Class: Google::Apis::SqlV1beta4::SQLAdminService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/sql_v1beta4/service.rb

Overview

Cloud SQL Admin API

API for Cloud SQL database instance management

Examples:

require 'google/apis/sql_v1beta4'

Sql = Google::Apis::SqlV1beta4 # Alias the module
service = Sql::SQLAdminService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeSQLAdminService

Returns a new instance of SQLAdminService.



45
46
47
48
# File 'generated/google/apis/sql_v1beta4/service.rb', line 45

def initialize
  super('https://sqladmin.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/sql_v1beta4/service.rb', line 38

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



43
44
45
# File 'generated/google/apis/sql_v1beta4/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#add_instance_server_ca(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL should add this server CA. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



543
544
545
546
547
548
549
550
551
552
553
# File 'generated/google/apis/sql_v1beta4/service.rb', line 543

def add_instance_server_ca(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/addServerCa', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#clone_instance(project, instance, instances_clone_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Creates a Cloud SQL instance as a clone of the source instance.

Parameters:

  • project (String)

    Project ID of the source as well as the clone Cloud SQL instance.

  • instance (String)

    The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.

  • instances_clone_request_object (Google::Apis::SqlV1beta4::InstancesCloneRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL should clone this instance. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



582
583
584
585
586
587
588
589
590
591
592
593
594
# File 'generated/google/apis/sql_v1beta4/service.rb', line 582

def clone_instance(project, instance, instances_clone_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/clone', options)
  command.request_representation = Google::Apis::SqlV1beta4::InstancesCloneRequest::Representation
  command.request_object = instances_clone_request_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCert

Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.

Parameters:

  • project (String)

    Project ID of the Cloud SQL project.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • ssl_certs_create_ephemeral_request_object (Google::Apis::SqlV1beta4::SslCertsCreateEphemeralRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL creates this ephemeral certificate. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1720

def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral', options)
  command.request_representation = Google::Apis::SqlV1beta4::SslCertsCreateEphemeralRequest::Representation
  command.request_object = ssl_certs_create_ephemeral_request_object
  command.response_representation = Google::Apis::SqlV1beta4::SslCert::Representation
  command.response_class = Google::Apis::SqlV1beta4::SslCert
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Deletes the backup taken by a backup run.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • id (Fixnum)

    The ID of the Backup Run to delete. To find a Backup Run ID, use the list method.

  • resource_name (String) (defaults to: nil)

    The name of the backupRun to delete. Format: projects/project/locations/location/instances/instance/backupRuns/ backupRun

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



81
82
83
84
85
86
87
88
89
90
91
92
# File 'generated/google/apis/sql_v1beta4/service.rb', line 81

def delete_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['id'] = id unless id.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Deletes a database from a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • database (String)

    Name of the database to be deleted in the instance.

  • resource_name (String) (defaults to: nil)

    The name of the database to delete. Format: projects/project/locations/location/instances/instance/databases/ database

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



251
252
253
254
255
256
257
258
259
260
261
262
# File 'generated/google/apis/sql_v1beta4/service.rb', line 251

def delete_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['database'] = database unless database.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Deletes a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance to be deleted.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • resource_name (String) (defaults to: nil)

    The name of database instance to delete. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



621
622
623
624
625
626
627
628
629
630
631
# File 'generated/google/apis/sql_v1beta4/service.rb', line 621

def delete_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • sha1_fingerprint (String)

    Sha1 FingerPrint.

  • resource_name (String) (defaults to: nil)

    The name of SSL certificate to delete. Format: projects/project/locations/location/instances/instance/sslCerts/sslCert

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1763

def delete_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_user(project, instance, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Deletes a user from a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • host (String) (defaults to: nil)

    Host of the user in the instance.

  • name (String) (defaults to: nil)

    Name of the user in the instance.

  • resource_name (String) (defaults to: nil)

    The name of the user to delete. Format: projects/project/locations/location/instances/instance/users

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1959

def delete_user(project, instance, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['host'] = host unless host.nil?
  command.query['name'] = name unless name.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#demote_instance_master(project, instance, instances_demote_master_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.

Parameters:

  • project (String)

    ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance name.

  • instances_demote_master_request_object (Google::Apis::SqlV1beta4::InstancesDemoteMasterRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL demotes this master database instance. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



660
661
662
663
664
665
666
667
668
669
670
671
672
# File 'generated/google/apis/sql_v1beta4/service.rb', line 660

def demote_instance_master(project, instance, instances_demote_master_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster', options)
  command.request_representation = Google::Apis::SqlV1beta4::InstancesDemoteMasterRequest::Representation
  command.request_object = instances_demote_master_request_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#export_instance(project, instance, instances_export_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.

Parameters:

  • project (String)

    Project ID of the project that contains the instance to be exported.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • instances_export_request_object (Google::Apis::SqlV1beta4::InstancesExportRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL exports this database instance. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



701
702
703
704
705
706
707
708
709
710
711
712
713
# File 'generated/google/apis/sql_v1beta4/service.rb', line 701

def export_instance(project, instance, instances_export_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/export', options)
  command.request_representation = Google::Apis::SqlV1beta4::InstancesExportRequest::Representation
  command.request_object = instances_export_request_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#failover_instance(project, instance, instances_failover_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Failover the instance to its failover replica instance.

Parameters:

  • project (String)

    ID of the project that contains the read replica.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • instances_failover_request_object (Google::Apis::SqlV1beta4::InstancesFailoverRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL sends this database instance during a failover. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



742
743
744
745
746
747
748
749
750
751
752
753
754
# File 'generated/google/apis/sql_v1beta4/service.rb', line 742

def failover_instance(project, instance, instances_failover_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/failover', options)
  command.request_representation = Google::Apis::SqlV1beta4::InstancesFailoverRequest::Representation
  command.request_object = instances_failover_request_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::BackupRun

Retrieves a resource containing information about a backup run.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • id (Fixnum)

    The ID of this Backup Run.

  • resource_name (String) (defaults to: nil)

    Name of the resource backupRun. Format: projects/project/locations/location/instances/instance/backupRuns/ backupRun

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



123
124
125
126
127
128
129
130
131
132
133
134
# File 'generated/google/apis/sql_v1beta4/service.rb', line 123

def get_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', options)
  command.response_representation = Google::Apis::SqlV1beta4::BackupRun::Representation
  command.response_class = Google::Apis::SqlV1beta4::BackupRun
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['id'] = id unless id.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Database

Retrieves a resource containing information about a database inside a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • database (String)

    Name of the database in the instance.

  • resource_name (String) (defaults to: nil)

    Name of the resource database. Format: projects/project/locations/location/instances/instance/databases/ database

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



294
295
296
297
298
299
300
301
302
303
304
305
# File 'generated/google/apis/sql_v1beta4/service.rb', line 294

def get_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
  command.response_representation = Google::Apis::SqlV1beta4::Database::Representation
  command.response_class = Google::Apis::SqlV1beta4::Database
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['database'] = database unless database.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::DatabaseInstance

Retrieves a resource containing information about a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • resource_name (String) (defaults to: nil)

    Name of the resource database instance. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



781
782
783
784
785
786
787
788
789
790
791
# File 'generated/google/apis/sql_v1beta4/service.rb', line 781

def get_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
  command.response_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation
  command.response_class = Google::Apis::SqlV1beta4::DatabaseInstance
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_operation(project, operation, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Retrieves an instance operation that has been performed on an instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • operation (String)

    Instance operation ID.

  • resource_name (String) (defaults to: nil)

    The name of the operation for Cloud SQL to get. Format: projects/project/locations/location/operations/operation

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1380

def get_operation(project, operation, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations/{operation}', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['operation'] = operation unless operation.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCert

Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • sha1_fingerprint (String)

    Sha1 FingerPrint.

  • resource_name (String) (defaults to: nil)

    Name of the resource ssl certificate. Format: projects/project/locations/location/instances/instance/sslCerts/sslCert

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1806

def get_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
  command.response_representation = Google::Apis::SqlV1beta4::SslCert::Representation
  command.response_class = Google::Apis::SqlV1beta4::SslCert
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#import_instance(project, instance, instances_import_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • instances_import_request_object (Google::Apis::SqlV1beta4::InstancesImportRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL imports this database instance. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



820
821
822
823
824
825
826
827
828
829
830
831
832
# File 'generated/google/apis/sql_v1beta4/service.rb', line 820

def import_instance(project, instance, instances_import_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/import', options)
  command.request_representation = Google::Apis::SqlV1beta4::InstancesImportRequest::Representation
  command.request_object = instances_import_request_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_backup_run(project, instance, backup_run_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Creates a new backup run on demand. This method is applicable only to Second Generation instances.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • backup_run_object (Google::Apis::SqlV1beta4::BackupRun) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL should create this backupRun. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'generated/google/apis/sql_v1beta4/service.rb', line 163

def insert_backup_run(project, instance, backup_run_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', options)
  command.request_representation = Google::Apis::SqlV1beta4::BackupRun::Representation
  command.request_object = backup_run_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_database(project, instance, database_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Inserts a resource containing information about a database inside a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • database_object (Google::Apis::SqlV1beta4::Database) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL should add this database. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'generated/google/apis/sql_v1beta4/service.rb', line 334

def insert_database(project, instance, database_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', options)
  command.request_representation = Google::Apis::SqlV1beta4::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_instance(project, database_instance_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Creates a new Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project to which the newly created Cloud SQL instances should belong.

  • database_instance_object (Google::Apis::SqlV1beta4::DatabaseInstance) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL creates this database instance. Format: projects/project/locations/location

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



859
860
861
862
863
864
865
866
867
868
869
870
# File 'generated/google/apis/sql_v1beta4/service.rb', line 859

def insert_instance(project, database_instance_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances', options)
  command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation
  command.request_object = database_instance_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_ssl_cert(project, instance, ssl_certs_insert_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCertsInsertResponse

Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • ssl_certs_insert_request_object (Google::Apis::SqlV1beta4::SslCertsInsertRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL creates this SSL certificate. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1847

def insert_ssl_cert(project, instance, ssl_certs_insert_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', options)
  command.request_representation = Google::Apis::SqlV1beta4::SslCertsInsertRequest::Representation
  command.request_object = ssl_certs_insert_request_object
  command.response_representation = Google::Apis::SqlV1beta4::SslCertsInsertResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::SslCertsInsertResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#insert_user(project, instance, user_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Creates a new user in a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • user_object (Google::Apis::SqlV1beta4::User) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL creates this user. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1999

def insert_user(project, instance, user_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
  command.request_representation = Google::Apis::SqlV1beta4::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_backup_runs(project, instance, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::BackupRunsListResponse

Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of backup runs per response.

  • page_token (String) (defaults to: nil)

    A previously-returned page token representing part of the larger set of results to view.

  • parent (String) (defaults to: nil)

    The parent, which owns this collection of backupRuns. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'generated/google/apis/sql_v1beta4/service.rb', line 208

def list_backup_runs(project, instance, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', options)
  command.response_representation = Google::Apis::SqlV1beta4::BackupRunsListResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::BackupRunsListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_databases(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::DatabasesListResponse

Lists databases in the specified Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent, which owns this collection of databases. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



373
374
375
376
377
378
379
380
381
382
383
# File 'generated/google/apis/sql_v1beta4/service.rb', line 373

def list_databases(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', options)
  command.response_representation = Google::Apis::SqlV1beta4::DatabasesListResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::DatabasesListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::FlagsListResponse

List all available database flags for Cloud SQL instances.

Parameters:

  • database_version (String) (defaults to: nil)

    Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



504
505
506
507
508
509
510
511
512
# File 'generated/google/apis/sql_v1beta4/service.rb', line 504

def list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/flags', options)
  command.response_representation = Google::Apis::SqlV1beta4::FlagsListResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::FlagsListResponse
  command.query['databaseVersion'] = database_version unless database_version.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_instance_server_cas(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::InstancesListServerCasResponse

Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent, which owns this collection of server CAs. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



952
953
954
955
956
957
958
959
960
961
962
# File 'generated/google/apis/sql_v1beta4/service.rb', line 952

def list_instance_server_cas(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/listServerCas', options)
  command.response_representation = Google::Apis::SqlV1beta4::InstancesListServerCasResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::InstancesListServerCasResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_instances(project, filter: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::InstancesListResponse

Lists instances under a given project.

Parameters:

  • project (String)

    Project ID of the project for which to list Cloud SQL instances.

  • filter (String) (defaults to: nil)

    A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of results to return per response.

  • page_token (String) (defaults to: nil)

    A previously-returned page token representing part of the larger set of results to view.

  • parent (String) (defaults to: nil)

    The parent, which owns this collection of database instances. Format: projects/project/locations/location

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



909
910
911
912
913
914
915
916
917
918
919
920
921
# File 'generated/google/apis/sql_v1beta4/service.rb', line 909

def list_instances(project, filter: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances', options)
  command.response_representation = Google::Apis::SqlV1beta4::InstancesListResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::InstancesListResponse
  command.params['project'] = project unless project.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_operations(project, instance: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::OperationsListResponse

Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String) (defaults to: nil)

    Cloud SQL instance ID. This does not include the project ID.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of operations per response.

  • page_token (String) (defaults to: nil)

    A previously-returned page token representing part of the larger set of results to view.

  • parent (String) (defaults to: nil)

    Indirect parent. The direct parent should combine with the instance name, which owns this collection of operations. Format: projects/project/locations/location

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1425

def list_operations(project, instance: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations', options)
  command.response_representation = Google::Apis::SqlV1beta4::OperationsListResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::OperationsListResponse
  command.params['project'] = project unless project.nil?
  command.query['instance'] = instance unless instance.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_ssl_certs(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCertsListResponse

Lists all of the current SSL certificates for the instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent, which owns this collection of SSL certificates. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1886

def list_ssl_certs(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', options)
  command.response_representation = Google::Apis::SqlV1beta4::SslCertsListResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::SslCertsListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_tiers(project, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::TiersListResponse

Lists all available machine types (tiers) for Cloud SQL, for example, db-n1-standard-1. For related information, see Pricing.

Parameters:

  • project (String)

    Project ID of the project for which to list tiers.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1920
1921
1922
1923
1924
1925
1926
1927
1928
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1920

def list_tiers(project, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/tiers', options)
  command.response_representation = Google::Apis::SqlV1beta4::TiersListResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::TiersListResponse
  command.params['project'] = project unless project.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_users(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::UsersListResponse

Lists users in the specified Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent, which owns this collection of users. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
# File 'generated/google/apis/sql_v1beta4/service.rb', line 2038

def list_users(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
  command.response_representation = Google::Apis::SqlV1beta4::UsersListResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::UsersListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • database (String)

    Name of the database to be updated in the instance.

  • database_object (Google::Apis::SqlV1beta4::Database) (defaults to: nil)
  • resource_name (String) (defaults to: nil)

    The name of the database for Cloud SQL to update. Format: projects/project/locations/location/instances/instance/databases/ database

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



422
423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'generated/google/apis/sql_v1beta4/service.rb', line 422

def patch_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
  command.request_representation = Google::Apis::SqlV1beta4::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['database'] = database unless database.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Updates settings of a Cloud SQL instance. This method supports patch semantics.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • database_instance_object (Google::Apis::SqlV1beta4::DatabaseInstance) (defaults to: nil)
  • resource_name (String) (defaults to: nil)

    The name of the database instance for Cloud SQL to update. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
# File 'generated/google/apis/sql_v1beta4/service.rb', line 991

def patch_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
  command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation
  command.request_object = database_instance_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#promote_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Promotes the read replica instance to be a stand-alone Cloud SQL instance.

Parameters:

  • project (String)

    ID of the project that contains the read replica.

  • instance (String)

    Cloud SQL read replica instance name.

  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL promotes this replica database instance. Format: projects/project/locations/location

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1030

def promote_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Reschedules the maintenance on the given instance.

Parameters:

  • project (String)

    ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • sql_instances_reschedule_maintenance_request_body_object (Google::Apis::SqlV1beta4::SqlInstancesRescheduleMaintenanceRequestBody) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL reshedule this database instance's maintenance. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1466

def reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance', options)
  command.request_representation = Google::Apis::SqlV1beta4::SqlInstancesRescheduleMaintenanceRequestBody::Representation
  command.request_object = sql_instances_reschedule_maintenance_request_body_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#reschedule_project_location_instance_maintenance(parent, sql_instances_reschedule_maintenance_request_body_object = nil, instance: nil, project: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Reschedules the maintenance on the given instance.

Parameters:

  • parent (String)

    The parent resource where Cloud SQL reshedule this database instance's maintenance. Format: projects/project/locations/location/instances/instance

  • sql_instances_reschedule_maintenance_request_body_object (Google::Apis::SqlV1beta4::SqlInstancesRescheduleMaintenanceRequestBody) (defaults to: nil)
  • instance (String) (defaults to: nil)

    Cloud SQL instance ID. This does not include the project ID.

  • project (String) (defaults to: nil)

    ID of the project that contains the instance.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1592

def reschedule_project_location_instance_maintenance(parent, sql_instances_reschedule_maintenance_request_body_object = nil, instance: nil, project: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/{+parent}/rescheduleMaintenance', options)
  command.request_representation = Google::Apis::SqlV1beta4::SqlInstancesRescheduleMaintenanceRequestBody::Representation
  command.request_object = sql_instances_reschedule_maintenance_request_body_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['instance'] = instance unless instance.nil?
  command.query['project'] = project unless project.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#reset_instance_ssl_config(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Deletes all client certificates and generates a new server SSL certificate for the instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL resets this SSL config. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1068

def reset_instance_ssl_config(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#restart_instance(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Restarts a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance to be restarted.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL restarts this database instance. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1105

def restart_instance(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restart', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#restore_instance_backup(project, instance, instances_restore_backup_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Restores a backup of a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • instances_restore_backup_request_object (Google::Apis::SqlV1beta4::InstancesRestoreBackupRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL restores this database instance from backup. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1144

def restore_instance_backup(project, instance, instances_restore_backup_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup', options)
  command.request_representation = Google::Apis::SqlV1beta4::InstancesRestoreBackupRequest::Representation
  command.request_object = instances_restore_backup_request_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • instances_rotate_server_ca_request_object (Google::Apis::SqlV1beta4::InstancesRotateServerCaRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL rotates these server CAs. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1185

def rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa', options)
  command.request_representation = Google::Apis::SqlV1beta4::InstancesRotateServerCaRequest::Representation
  command.request_object = instances_rotate_server_ca_request_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#start_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Starts the replication in the read replica instance.

Parameters:

  • project (String)

    ID of the project that contains the read replica.

  • instance (String)

    Cloud SQL read replica instance name.

  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL starts this database instance replication. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1225

def start_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/startReplica', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#start_project_instance_external_sync(project, instance, parent: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Start External master migration.

Parameters:

  • project (String)

    ID of the project that contains the first generation instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL starts this database instance external sync. Format: projects/project/locations/location/instances/instance

  • sync_mode (String) (defaults to: nil)

    External sync mode

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1508

def start_project_instance_external_sync(project, instance, parent: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['syncMode'] = sync_mode unless sync_mode.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#start_project_location_instance_external_sync(parent, instance: nil, project: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Start External master migration.

Parameters:

  • parent (String)

    The parent resource where Cloud SQL starts this database instance external sync. Format: projects/project/locations/location/instances/instance

  • instance (String) (defaults to: nil)

    Cloud SQL instance ID. This does not include the project ID.

  • project (String) (defaults to: nil)

    ID of the project that contains the first generation instance.

  • sync_mode (String) (defaults to: nil)

    External sync mode

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1634

def start_project_location_instance_external_sync(parent, instance: nil, project: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/{+parent}/startExternalSync', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['parent'] = parent unless parent.nil?
  command.query['instance'] = instance unless instance.nil?
  command.query['project'] = project unless project.nil?
  command.query['syncMode'] = sync_mode unless sync_mode.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#stop_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Stops the replication in the read replica instance.

Parameters:

  • project (String)

    ID of the project that contains the read replica.

  • instance (String)

    Cloud SQL read replica instance name.

  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL stops this database instance replication. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1263

def stop_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/stopReplica', options)
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Truncate MySQL general and slow query log tables

Parameters:

  • project (String)

    Project ID of the Cloud SQL project.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • instances_truncate_log_request_object (Google::Apis::SqlV1beta4::InstancesTruncateLogRequest) (defaults to: nil)
  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL truncates this log. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1301

def truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/truncateLog', options)
  command.request_representation = Google::Apis::SqlV1beta4::InstancesTruncateLogRequest::Representation
  command.request_object = instances_truncate_log_request_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Updates a resource containing information about a database inside a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • database (String)

    Name of the database to be updated in the instance.

  • database_object (Google::Apis::SqlV1beta4::Database) (defaults to: nil)
  • resource_name (String) (defaults to: nil)

    The name of the database for Cloud SQL to update. Format: projects/project/locations/location/instances/instance/databases/ database

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



468
469
470
471
472
473
474
475
476
477
478
479
480
481
# File 'generated/google/apis/sql_v1beta4/service.rb', line 468

def update_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
  command.request_representation = Google::Apis::SqlV1beta4::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['database'] = database unless database.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Updates settings of a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • database_instance_object (Google::Apis::SqlV1beta4::DatabaseInstance) (defaults to: nil)
  • resource_name (String) (defaults to: nil)

    The name of the database instance for Cloud SQL to update. Format: projects/project/locations/location/instances/instance

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1341

def update_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
  command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation
  command.request_object = database_instance_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_user(project, instance, user_object = nil, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation

Updates an existing user in a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Database instance ID. This does not include the project ID.

  • user_object (Google::Apis::SqlV1beta4::User) (defaults to: nil)
  • host (String) (defaults to: nil)

    Optional. Host of the user in the instance.

  • name (String) (defaults to: nil)

    Name of the user in the instance.

  • resource_name (String) (defaults to: nil)

    The name of the user for Cloud SQL to update. Format: projects/project/locations/location/instances/instance/users

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
# File 'generated/google/apis/sql_v1beta4/service.rb', line 2080

def update_user(project, instance, user_object = nil, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
  command.request_representation = Google::Apis::SqlV1beta4::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqlV1beta4::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['host'] = host unless host.nil?
  command.query['name'] = name unless name.nil?
  command.query['resourceName'] = resource_name unless resource_name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#verify_project_instance_external_sync_settings(project, instance, parent: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse

Verify External master external sync settings.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

    Cloud SQL instance ID. This does not include the project ID.

  • parent (String) (defaults to: nil)

    The parent resource where Cloud SQL verifies this database instance external sync settings. Format: projects/project/locations/location/instances/instance

  • sync_mode (String) (defaults to: nil)

    External sync mode

  • verify_connection_only (Boolean) (defaults to: nil)

    Flag to enable verifying connection only

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1551

def verify_project_instance_external_sync_settings(project, instance, parent: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings', options)
  command.response_representation = Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['syncMode'] = sync_mode unless sync_mode.nil?
  command.query['verifyConnectionOnly'] = verify_connection_only unless verify_connection_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#verify_project_location_instance_external_sync_settings(parent, instance: nil, project: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse

Verify External master external sync settings.

Parameters:

  • parent (String)

    The parent resource where Cloud SQL verifies this database instance external sync settings. Format: projects/project/locations/location/instances/instance

  • instance (String) (defaults to: nil)

    Cloud SQL instance ID. This does not include the project ID.

  • project (String) (defaults to: nil)

    Project ID of the project that contains the instance.

  • sync_mode (String) (defaults to: nil)

    External sync mode

  • verify_connection_only (Boolean) (defaults to: nil)

    Flag to enable verifying connection only

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1677

def verify_project_location_instance_external_sync_settings(parent, instance: nil, project: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/{+parent}/verifyExternalSyncSettings', options)
  command.response_representation = Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse::Representation
  command.response_class = Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['instance'] = instance unless instance.nil?
  command.query['project'] = project unless project.nil?
  command.query['syncMode'] = sync_mode unless sync_mode.nil?
  command.query['verifyConnectionOnly'] = verify_connection_only unless verify_connection_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end