Class: Google::Apis::SqladminV1::SQLAdminService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/sqladmin_v1/service.rb

Overview

Cloud SQL Admin API

API for Cloud SQL database instance management

Examples:

require 'google/apis/sqladmin_v1'

Sqladmin = Google::Apis::SqladminV1 # Alias the module
service = Sqladmin::SQLAdminService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://sqladmin.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSQLAdminService

Returns a new instance of SQLAdminService.



47
48
49
50
51
52
# File 'lib/google/apis/sqladmin_v1/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-sqladmin_v1',
        client_version: Google::Apis::SqladminV1::GEM_VERSION)
  @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.



40
41
42
# File 'lib/google/apis/sqladmin_v1/service.rb', line 40

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.



45
46
47
# File 'lib/google/apis/sqladmin_v1/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#acquire_instance_ssrs_lease(project, instance, instances_acquire_ssrs_lease_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::SqlInstancesAcquireSsrsLeaseResponse

Acquire a lease for the setup of SQL Server Reporting Services (SSRS).

Parameters:

  • project (String)

    Required. Project ID of the project that contains the instance (Example: project-id).

  • instance (String)

    Required. Cloud SQL instance ID. This doesn't include the project ID. It's composed of lowercase letters, numbers, and hyphens, and it must start with a letter. The total length must be 98 characters or less (Example: instance-id).

  • instances_acquire_ssrs_lease_request_object (Google::Apis::SqladminV1::InstancesAcquireSsrsLeaseRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



634
635
636
637
638
639
640
641
642
643
644
645
# File 'lib/google/apis/sqladmin_v1/service.rb', line 634

def acquire_instance_ssrs_lease(project, instance, instances_acquire_ssrs_lease_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/acquireSsrsLease', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesAcquireSsrsLeaseRequest::Representation
  command.request_object = instances_acquire_ssrs_lease_request_object
  command.response_representation = Google::Apis::SqladminV1::SqlInstancesAcquireSsrsLeaseResponse::Representation
  command.response_class = Google::Apis::SqladminV1::SqlInstancesAcquireSsrsLeaseResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

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

Adds 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. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use AddServerCertificate to add a new server certificate.

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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



675
676
677
678
679
680
681
682
683
684
# File 'lib/google/apis/sqladmin_v1/service.rb', line 675

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

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

Add a new trusted server certificate version for the specified instance using Certificate Authority Service (CAS) server CA. Required to prepare for a certificate rotation. If a server certificate version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one certificate version waiting to be rotated in. For instances not using CAS server CA, please use AddServerCa instead.

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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



713
714
715
716
717
718
719
720
721
722
# File 'lib/google/apis/sqladmin_v1/service.rb', line 713

def add_instance_server_certificate(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/addServerCertificate', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#cancel_operation(project, operation, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Empty

Cancels 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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1641

def cancel_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/operations/{operation}/cancel', options)
  command.response_representation = Google::Apis::SqladminV1::Empty::Representation
  command.response_class = Google::Apis::SqladminV1::Empty
  command.params['project'] = project unless project.nil?
  command.params['operation'] = operation unless operation.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.

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::SqladminV1::InstancesCloneRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



749
750
751
752
753
754
755
756
757
758
759
760
# File 'lib/google/apis/sqladmin_v1/service.rb', line 749

def clone_instance(project, instance, instances_clone_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/clone', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesCloneRequest::Representation
  command.request_object = instances_clone_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::SslCertsCreateEphemeralRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2002

def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/createEphemeral', options)
  command.request_representation = Google::Apis::SqladminV1::SslCertsCreateEphemeralRequest::Representation
  command.request_object = ssl_certs_create_ephemeral_request_object
  command.response_representation = Google::Apis::SqladminV1::SslCert::Representation
  command.response_class = Google::Apis::SqladminV1::SslCert
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



80
81
82
83
84
85
86
87
88
89
90
# File 'lib/google/apis/sqladmin_v1/service.rb', line 80

def delete_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/projects/{project}/instances/{instance}/backupRuns/{id}', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['id'] = id unless id.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



304
305
306
307
308
309
310
311
312
313
314
# File 'lib/google/apis/sqladmin_v1/service.rb', line 304

def delete_database(project, instance, database, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/projects/{project}/instances/{instance}/databases/{database}', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['database'] = database unless database.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, enable_final_backup: nil, final_backup_description: nil, final_backup_expiry_time: nil, final_backup_ttl_days: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • enable_final_backup (Boolean) (defaults to: nil)

    Flag to opt-in for final backup. By default, it is turned off.

  • final_backup_description (String) (defaults to: nil)

    Optional. The description of the final backup.

  • final_backup_expiry_time (String) (defaults to: nil)

    Optional. Final Backup expiration time. Timestamp in UTC of when this resource is considered expired.

  • final_backup_ttl_days (Fixnum) (defaults to: nil)

    Optional. Retention period of the final backup.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



793
794
795
796
797
798
799
800
801
802
803
804
805
806
# File 'lib/google/apis/sqladmin_v1/service.rb', line 793

def delete_instance(project, instance, enable_final_backup: nil, final_backup_description: nil, final_backup_expiry_time: nil, final_backup_ttl_days: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/projects/{project}/instances/{instance}', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['enableFinalBackup'] = enable_final_backup unless enable_final_backup.nil?
  command.query['finalBackupDescription'] = final_backup_description unless final_backup_description.nil?
  command.query['finalBackupExpiryTime'] = final_backup_expiry_time unless final_backup_expiry_time.nil?
  command.query['finalBackupTtlDays'] = final_backup_ttl_days unless final_backup_ttl_days.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2040

def delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::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['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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2218

def delete_user(project, instance, host: nil, name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/projects/{project}/instances/{instance}/users', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::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['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#demote_instance(project, instance, instances_demote_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server.

Parameters:

  • project (String)

    Required. ID of the project that contains the instance.

  • instance (String)

    Required. Cloud SQL instance name.

  • instances_demote_request_object (Google::Apis::SqladminV1::InstancesDemoteRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



832
833
834
835
836
837
838
839
840
841
842
843
# File 'lib/google/apis/sqladmin_v1/service.rb', line 832

def demote_instance(project, instance, instances_demote_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/demote', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesDemoteRequest::Representation
  command.request_object = instances_demote_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::InstancesDemoteMasterRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



869
870
871
872
873
874
875
876
877
878
879
880
# File 'lib/google/apis/sqladmin_v1/service.rb', line 869

def demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/demoteMaster', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesDemoteMasterRequest::Representation
  command.request_object = instances_demote_master_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::InstancesExportRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



906
907
908
909
910
911
912
913
914
915
916
917
# File 'lib/google/apis/sqladmin_v1/service.rb', line 906

def export_instance(project, instance, instances_export_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/export', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesExportRequest::Representation
  command.request_object = instances_export_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the Overview of high availability page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover 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::SqladminV1::InstancesFailoverRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



947
948
949
950
951
952
953
954
955
956
957
958
# File 'lib/google/apis/sqladmin_v1/service.rb', line 947

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

#generate_connect_ephemeral_cert(project, instance, generate_ephemeral_cert_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::GenerateEphemeralCertResponse

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 project that contains the instance.

  • instance (String)

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

  • generate_ephemeral_cert_request_object (Google::Apis::SqladminV1::GenerateEphemeralCertRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



231
232
233
234
235
236
237
238
239
240
241
242
# File 'lib/google/apis/sqladmin_v1/service.rb', line 231

def generate_connect_ephemeral_cert(project, instance, generate_ephemeral_cert_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}:generateEphemeralCert', options)
  command.request_representation = Google::Apis::SqladminV1::GenerateEphemeralCertRequest::Representation
  command.request_object = generate_ephemeral_cert_request_object
  command.response_representation = Google::Apis::SqladminV1::GenerateEphemeralCertResponse::Representation
  command.response_class = Google::Apis::SqladminV1::GenerateEphemeralCertResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



116
117
118
119
120
121
122
123
124
125
126
# File 'lib/google/apis/sqladmin_v1/service.rb', line 116

def get_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/backupRuns/{id}', options)
  command.response_representation = Google::Apis::SqladminV1::BackupRun::Representation
  command.response_class = Google::Apis::SqladminV1::BackupRun
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['id'] = id unless id.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_connect(project, instance, read_time: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::ConnectSettings

Retrieves connect settings about 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.

  • read_time (String) (defaults to: nil)

    Optional. Optional snapshot read timestamp to trade freshness for performance.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



268
269
270
271
272
273
274
275
276
277
278
# File 'lib/google/apis/sqladmin_v1/service.rb', line 268

def get_connect(project, instance, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/connectSettings', options)
  command.response_representation = Google::Apis::SqladminV1::ConnectSettings::Representation
  command.response_class = Google::Apis::SqladminV1::ConnectSettings
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['readTime'] = read_time unless read_time.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



341
342
343
344
345
346
347
348
349
350
351
# File 'lib/google/apis/sqladmin_v1/service.rb', line 341

def get_database(project, instance, database, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/databases/{database}', options)
  command.response_representation = Google::Apis::SqladminV1::Database::Representation
  command.response_class = Google::Apis::SqladminV1::Database
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['database'] = database unless database.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



982
983
984
985
986
987
988
989
990
991
# File 'lib/google/apis/sqladmin_v1/service.rb', line 982

def get_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}', options)
  command.response_representation = Google::Apis::SqladminV1::DatabaseInstance::Representation
  command.response_class = Google::Apis::SqladminV1::DatabaseInstance
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1674

def get_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/operations/{operation}', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['operation'] = operation unless operation.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_project_instance_disk_shrink_config(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::SqlInstancesGetDiskShrinkConfigResponse

Get Disk Shrink Config for a given 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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1753

def get_project_instance_disk_shrink_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/getDiskShrinkConfig', options)
  command.response_representation = Google::Apis::SqladminV1::SqlInstancesGetDiskShrinkConfigResponse::Representation
  command.response_class = Google::Apis::SqladminV1::SqlInstancesGetDiskShrinkConfigResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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_project_instance_latest_recovery_time(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::SqlInstancesGetLatestRecoveryTimeResponse

Get Latest Recovery Time for a given 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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1786

def get_project_instance_latest_recovery_time(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/getLatestRecoveryTime', options)
  command.response_representation = Google::Apis::SqladminV1::SqlInstancesGetLatestRecoveryTimeResponse::Representation
  command.response_class = Google::Apis::SqladminV1::SqlInstancesGetLatestRecoveryTimeResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2078

def get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
  command.response_representation = Google::Apis::SqladminV1::SslCert::Representation
  command.response_class = Google::Apis::SqladminV1::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['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_user(project, instance, name, host: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::User

Retrieves a resource containing information about a user.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

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

  • name (String)

    User of the instance.

  • host (String) (defaults to: nil)

    Host of a user of 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2257

def get_user(project, instance, name, host: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/users/{name}', options)
  command.response_representation = Google::Apis::SqladminV1::User::Representation
  command.response_class = Google::Apis::SqladminV1::User
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['name'] = name unless name.nil?
  command.query['host'] = host unless host.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::InstancesImportRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1017

def import_instance(project, instance, instances_import_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/import', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesImportRequest::Representation
  command.request_object = instances_import_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Creates a new backup run on demand.

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::SqladminV1::BackupRun) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/google/apis/sqladmin_v1/service.rb', line 151

def insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/backupRuns', options)
  command.request_representation = Google::Apis::SqladminV1::BackupRun::Representation
  command.request_object = backup_run_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Inserts a resource containing information about a database inside a Cloud SQL instance. Note: You can't modify the default character set and collation.

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::SqladminV1::Database) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



377
378
379
380
381
382
383
384
385
386
387
388
# File 'lib/google/apis/sqladmin_v1/service.rb', line 377

def insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/databases', options)
  command.request_representation = Google::Apis::SqladminV1::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::DatabaseInstance) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1052

def insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances', options)
  command.request_representation = Google::Apis::SqladminV1::DatabaseInstance::Representation
  command.request_object = database_instance_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  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

#insert_ssl_cert(project, instance, ssl_certs_insert_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::SslCertsInsertRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2115

def insert_ssl_cert(project, instance, ssl_certs_insert_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/sslCerts', options)
  command.request_representation = Google::Apis::SqladminV1::SslCertsInsertRequest::Representation
  command.request_object = ssl_certs_insert_request_object
  command.response_representation = Google::Apis::SqladminV1::SslCertsInsertResponse::Representation
  command.response_class = Google::Apis::SqladminV1::SslCertsInsertResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::User) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2293

def insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/users', options)
  command.request_representation = Google::Apis::SqladminV1::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::BackupRunsListResponse

Lists all backup runs associated with the project or 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, or "-" for all instances. 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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



193
194
195
196
197
198
199
200
201
202
203
204
# File 'lib/google/apis/sqladmin_v1/service.rb', line 193

def list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/backupRuns', options)
  command.response_representation = Google::Apis::SqladminV1::BackupRunsListResponse::Representation
  command.response_class = Google::Apis::SqladminV1::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['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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



412
413
414
415
416
417
418
419
420
421
# File 'lib/google/apis/sqladmin_v1/service.rb', line 412

def list_databases(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/databases', options)
  command.response_representation = Google::Apis::SqladminV1::DatabasesListResponse::Representation
  command.response_class = Google::Apis::SqladminV1::DatabasesListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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::SqladminV1::FlagsListResponse

Lists 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



524
525
526
527
528
529
530
531
532
# File 'lib/google/apis/sqladmin_v1/service.rb', line 524

def list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/flags', options)
  command.response_representation = Google::Apis::SqladminV1::FlagsListResponse::Representation
  command.response_class = Google::Apis::SqladminV1::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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1138

def list_instance_server_cas(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/listServerCas', options)
  command.response_representation = Google::Apis::SqladminV1::InstancesListServerCasResponse::Representation
  command.response_class = Google::Apis::SqladminV1::InstancesListServerCasResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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_certificates(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::InstancesListServerCertificatesResponse

Lists all versions of server certificates and certificate authorities (CAs) for the specified instance. There can be up to three sets of certs listed: the certificate that is currently in use, a future that has been added but not yet used to sign a certificate, and a certificate that has been rotated out.

Parameters:

  • project (String)

    Required. Project ID of the project that contains the instance.

  • instance (String)

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

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



559
560
561
562
563
564
565
566
567
568
# File 'lib/google/apis/sqladmin_v1/service.rb', line 559

def list_instance_server_certificates(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/listServerCertificates', options)
  command.response_representation = Google::Apis::SqladminV1::InstancesListServerCertificatesResponse::Representation
  command.response_class = Google::Apis::SqladminV1::InstancesListServerCertificatesResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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 instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.

  • page_token (String) (defaults to: nil)

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

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1099

def list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances', options)
  command.response_representation = Google::Apis::SqladminV1::InstancesListResponse::Representation
  command.response_class = Google::Apis::SqladminV1::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['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_operations(project, filter: nil, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • filter (String) (defaults to: nil)

    Optional. A filter string that follows the rules of EBNF grammar (https:// google.aip.dev/assets/misc/ebnf-filtering.txt). Cloud SQL provides filters for status, operationType, and startTime.

  • 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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1717

def list_operations(project, filter: nil, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/operations', options)
  command.response_representation = Google::Apis::SqladminV1::OperationsListResponse::Representation
  command.response_class = Google::Apis::SqladminV1::OperationsListResponse
  command.params['project'] = project unless project.nil?
  command.query['filter'] = filter unless filter.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['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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2150

def list_ssl_certs(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/sslCerts', options)
  command.response_representation = Google::Apis::SqladminV1::SslCertsListResponse::Representation
  command.response_class = Google::Apis::SqladminV1::SslCertsListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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::SqladminV1::TiersListResponse

Lists all available machine types (tiers) for Cloud SQL, for example, db- custom-1-3840. For more information, see https://cloud.google.com/sql/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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2182
2183
2184
2185
2186
2187
2188
2189
2190
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2182

def list_tiers(project, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/tiers', options)
  command.response_representation = Google::Apis::SqladminV1::TiersListResponse::Representation
  command.response_class = Google::Apis::SqladminV1::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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2328

def list_users(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/projects/{project}/instances/{instance}/users', options)
  command.response_representation = Google::Apis::SqladminV1::UsersListResponse::Representation
  command.response_class = Google::Apis::SqladminV1::UsersListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::Database) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



449
450
451
452
453
454
455
456
457
458
459
460
461
# File 'lib/google/apis/sqladmin_v1/service.rb', line 449

def patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/projects/{project}/instances/{instance}/databases/{database}', options)
  command.request_representation = Google::Apis::SqladminV1::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['database'] = database unless database.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. 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::SqladminV1::DatabaseInstance) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1173

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

#perform_project_instance_disk_shrink(project, instance, perform_disk_shrink_context_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Perform Disk Shrink on primary 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.

  • perform_disk_shrink_context_object (Google::Apis::SqladminV1::PerformDiskShrinkContext) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1820

def perform_project_instance_disk_shrink(project, instance, perform_disk_shrink_context_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/performDiskShrink', options)
  command.request_representation = Google::Apis::SqladminV1::PerformDiskShrinkContext::Representation
  command.request_object = perform_disk_shrink_context_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, failover: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Promotes the read replica instance to be an independent Cloud SQL primary instance. Using this operation might cause your instance to restart.

Parameters:

  • project (String)

    ID of the project that contains the read replica.

  • instance (String)

    Cloud SQL read replica instance name.

  • failover (Boolean) (defaults to: nil)

    Set to true to invoke a replica failover to the designated DR replica. As part of replica failover, the promote operation attempts to add the original primary instance as a replica of the promoted DR replica when the original primary instance comes back online. If set to false or not specified, then the original primary instance becomes an independent Cloud SQL primary instance. Only applicable to MySQL.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1216

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

#reencrypt_instance(project, instance, instances_reencrypt_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Reencrypt CMEK instance with latest key version.

Parameters:

  • project (String)

    ID of the project that contains the instance.

  • instance (String)

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

  • instances_reencrypt_request_object (Google::Apis::SqladminV1::InstancesReencryptRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1251

def reencrypt_instance(project, instance, instances_reencrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/reencrypt', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesReencryptRequest::Representation
  command.request_object = instances_reencrypt_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#release_instance_ssrs_lease(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::SqlInstancesReleaseSsrsLeaseResponse

Release a lease for the setup of SQL Server Reporting Services (SSRS).

Parameters:

  • project (String)

    Required. The project ID that contains the instance.

  • instance (String)

    Required. The Cloud SQL instance ID. This doesn't include the project ID. The instance ID contains lowercase letters, numbers, and hyphens, and it must start with a letter. This ID can have a maximum length of 98 characters.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1288

def release_instance_ssrs_lease(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/releaseSsrsLease', options)
  command.response_representation = Google::Apis::SqladminV1::SqlInstancesReleaseSsrsLeaseResponse::Representation
  command.response_class = Google::Apis::SqladminV1::SqlInstancesReleaseSsrsLeaseResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::SqlInstancesRescheduleMaintenanceRequestBody) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1856

def reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/rescheduleMaintenance', options)
  command.request_representation = Google::Apis::SqladminV1::SqlInstancesRescheduleMaintenanceRequestBody::Representation
  command.request_object = sql_instances_reschedule_maintenance_request_body_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1322

def reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/resetSslConfig', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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_project_instance_replica_size(project, instance, sql_instances_reset_replica_size_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Reset Replica Size to primary instance disk size.

Parameters:

  • project (String)

    ID of the project that contains the read replica.

  • instance (String)

    Cloud SQL read replica instance name.

  • sql_instances_reset_replica_size_request_object (Google::Apis::SqladminV1::SqlInstancesResetReplicaSizeRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1892

def reset_project_instance_replica_size(project, instance, sql_instances_reset_replica_size_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/resetReplicaSize', options)
  command.request_representation = Google::Apis::SqladminV1::SqlInstancesResetReplicaSizeRequest::Representation
  command.request_object = sql_instances_reset_replica_size_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1355

def restart_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/restart', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.

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::SqladminV1::InstancesRestoreBackupRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1390

def restore_instance_backup(project, instance, instances_restore_backup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/restoreBackup', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesRestoreBackupRequest::Representation
  command.request_object = instances_restore_backup_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. For instances that have enabled Certificate Authority Service (CAS) based server CA, please use RotateServerCertificate to rotate the server certificate.

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::SqladminV1::InstancesRotateServerCaRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1429

def rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/rotateServerCa', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesRotateServerCaRequest::Representation
  command.request_object = instances_rotate_server_ca_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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_certificate(project, instance, instances_rotate_server_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Rotates the server certificate version to one previously added with the addServerCertificate method. For instances not using Certificate Authority Service (CAS) server CA, please use RotateServerCa instead.

Parameters:

  • project (String)

    Required. Project ID of the project that contains the instance.

  • instance (String)

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

  • instances_rotate_server_certificate_request_object (Google::Apis::SqladminV1::InstancesRotateServerCertificateRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



595
596
597
598
599
600
601
602
603
604
605
606
# File 'lib/google/apis/sqladmin_v1/service.rb', line 595

def rotate_instance_server_certificate(project, instance, instances_rotate_server_certificate_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/rotateServerCertificate', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesRotateServerCertificateRequest::Representation
  command.request_object = instances_rotate_server_certificate_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1464

def start_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/startReplica', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, sql_instances_start_external_sync_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Start External primary instance migration.

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_start_external_sync_request_object (Google::Apis::SqladminV1::SqlInstancesStartExternalSyncRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1928

def start_project_instance_external_sync(project, instance, sql_instances_start_external_sync_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/startExternalSync', options)
  command.request_representation = Google::Apis::SqladminV1::SqlInstancesStartExternalSyncRequest::Representation
  command.request_object = sql_instances_start_external_sync_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1497

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

#switchover_instance(project, instance, db_timeout: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Switches over from the primary instance to the designated DR replica instance.

Parameters:

  • project (String)

    ID of the project that contains the replica.

  • instance (String)

    Cloud SQL read replica instance name.

  • db_timeout (String) (defaults to: nil)

    Optional. (MySQL only) Cloud SQL instance operations timeout, which is a sum of all database operations. Default value is 10 minutes and can be modified to a maximum value of 24 hours.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1534

def switchover_instance(project, instance, db_timeout: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/switchover', options)
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['dbTimeout'] = db_timeout unless db_timeout.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Truncate MySQL general and slow query log tables MySQL only.

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::SqladminV1::InstancesTruncateLogRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1569

def truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/truncateLog', options)
  command.request_representation = Google::Apis::SqladminV1::InstancesTruncateLogRequest::Representation
  command.request_object = instances_truncate_log_request_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::Database) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/google/apis/sqladmin_v1/service.rb', line 489

def update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'v1/projects/{project}/instances/{instance}/databases/{database}', options)
  command.request_representation = Google::Apis::SqladminV1::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['database'] = database unless database.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::Operation

Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.

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::SqladminV1::DatabaseInstance) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1606

def update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'v1/projects/{project}/instances/{instance}', options)
  command.request_representation = Google::Apis::SqladminV1::DatabaseInstance::Representation
  command.request_object = database_instance_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::Operation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::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::SqladminV1::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.

  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
# File 'lib/google/apis/sqladmin_v1/service.rb', line 2366

def update_user(project, instance, user_object = nil, host: nil, name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'v1/projects/{project}/instances/{instance}/users', options)
  command.request_representation = Google::Apis::SqladminV1::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::SqladminV1::Operation::Representation
  command.response_class = Google::Apis::SqladminV1::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['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, sql_instances_verify_external_sync_settings_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1::SqlInstancesVerifyExternalSyncSettingsResponse

Verify External primary instance 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.

  • sql_instances_verify_external_sync_settings_request_object (Google::Apis::SqladminV1::SqlInstancesVerifyExternalSyncSettingsRequest) (defaults to: nil)
  • 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:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
# File 'lib/google/apis/sqladmin_v1/service.rb', line 1964

def verify_project_instance_external_sync_settings(project, instance, sql_instances_verify_external_sync_settings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings', options)
  command.request_representation = Google::Apis::SqladminV1::SqlInstancesVerifyExternalSyncSettingsRequest::Representation
  command.request_object = sql_instances_verify_external_sync_settings_request_object
  command.response_representation = Google::Apis::SqladminV1::SqlInstancesVerifyExternalSyncSettingsResponse::Representation
  command.response_class = Google::Apis::SqladminV1::SqlInstancesVerifyExternalSyncSettingsResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end