Class: Google::Apis::SqladminV1beta4::SQLAdminService

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

Overview

Cloud SQL Admin API

API for Cloud SQL database instance management

Examples:

require 'google/apis/sqladmin_v1beta4'

Sqladmin = Google::Apis::SqladminV1beta4 # 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_v1beta4/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-sqladmin_v1beta4',
        client_version: Google::Apis::SqladminV1beta4::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_v1beta4/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_v1beta4/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::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse

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

Parameters:

  • project (String)

    Required. 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::SqladminV1beta4::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



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

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, 'sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease', options)
  command.request_representation = Google::Apis::SqladminV1beta4::InstancesAcquireSsrsLeaseRequest::Representation
  command.request_object = instances_acquire_ssrs_lease_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesAcquireSsrsLeaseResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::Operation

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



600
601
602
603
604
605
606
607
608
609
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 600

def add_instance_server_ca(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/addServerCa', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1516

def cancel_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/operations/{operation}/cancel', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Empty::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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, clone_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::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.

  • clone_instances_request_object (Google::Apis::SqladminV1beta4::CloneInstancesRequest) (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



636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 636

def clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/clone', options)
  command.request_representation = Google::Apis::SqladminV1beta4::CloneInstancesRequest::Representation
  command.request_object = clone_instances_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1872

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, 'sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral', options)
  command.request_representation = Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest::Representation
  command.request_object = ssl_certs_create_ephemeral_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/service.rb', line 80

def delete_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/service.rb', line 304

def delete_database(project, instance, database, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::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.

  • 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



671
672
673
674
675
676
677
678
679
680
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 671

def delete_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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

#delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::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



1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1910

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



2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 2088

def delete_user(project, instance, host: nil, name: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::Operation

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

Parameters:

  • project (String)

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

  • instance (String)

    Required. The name of the Cloud SQL instance.

  • instances_demote_request_object (Google::Apis::SqladminV1beta4::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



706
707
708
709
710
711
712
713
714
715
716
717
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 706

def demote_instance(project, instance, instances_demote_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/demote', options)
  command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteRequest::Representation
  command.request_object = instances_demote_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



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

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, 'sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster', options)
  command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest::Representation
  command.request_object = instances_demote_master_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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, export_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::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)

    The Cloud SQL instance ID. This doesn't include the project ID.

  • export_instances_request_object (Google::Apis::SqladminV1beta4::ExportInstancesRequest) (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



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

def export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/export', options)
  command.request_representation = Google::Apis::SqladminV1beta4::ExportInstancesRequest::Representation
  command.request_object = export_instances_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



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

def failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/failover', options)
  command.request_representation = Google::Apis::SqladminV1beta4::InstancesFailoverRequest::Representation
  command.request_object = instances_failover_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/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, 'sql/v1beta4/projects/{project}/instances/{instance}:generateEphemeralCert', options)
  command.request_representation = Google::Apis::SqladminV1beta4::GenerateEphemeralCertRequest::Representation
  command.request_object = generate_ephemeral_cert_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::GenerateEphemeralCertResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/service.rb', line 116

def get_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/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, 'sql/v1beta4/projects/{project}/instances/{instance}/connectSettings', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ConnectSettings::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/service.rb', line 341

def get_database(project, instance, database, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Database::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



856
857
858
859
860
861
862
863
864
865
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 856

def get_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1549

def get_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations/{operation}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1623

def get_project_instance_disk_shrink_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig', options)
  command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetDiskShrinkConfigResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1656

def get_project_instance_latest_recovery_time(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime', options)
  command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesGetLatestRecoveryTimeResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1948

def get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 2127

def get_user(project, instance, name, host: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/users/{name}', options)
  command.response_representation = Google::Apis::SqladminV1beta4::User::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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, import_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::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.

  • import_instances_request_object (Google::Apis::SqladminV1beta4::ImportInstancesRequest) (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



891
892
893
894
895
896
897
898
899
900
901
902
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 891

def import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/import', options)
  command.request_representation = Google::Apis::SqladminV1beta4::ImportInstancesRequest::Representation
  command.request_object = import_instances_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/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, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', options)
  command.request_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation
  command.request_object = backup_run_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/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, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', options)
  command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



926
927
928
929
930
931
932
933
934
935
936
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 926

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

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.

  • insert_ssl_certs_request_object (Google::Apis::SqladminV1beta4::InsertSslCertsRequest) (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



1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1985

def insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', options)
  command.request_representation = Google::Apis::SqladminV1beta4::InsertSslCertsRequest::Representation
  command.request_object = insert_ssl_certs_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::InsertSslCertsResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::InsertSslCertsResponse
  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::SqladminV1beta4::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::SqladminV1beta4::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



2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 2163

def insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
  command.request_representation = Google::Apis::SqladminV1beta4::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::ListBackupRunsResponse

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_v1beta4/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, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ListBackupRunsResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::ListBackupRunsResponse
  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::SqladminV1beta4::ListDatabasesResponse

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_v1beta4/service.rb', line 412

def list_databases(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ListDatabasesResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::ListDatabasesResponse
  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::SqladminV1beta4::ListFlagsResponse

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_v1beta4/service.rb', line 524

def list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/flags', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse
  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::SqladminV1beta4::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



1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1012

def list_instance_server_cas(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/listServerCas', options)
  command.response_representation = Google::Apis::SqladminV1beta4::InstancesListServerCasResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListInstancesResponse

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



973
974
975
976
977
978
979
980
981
982
983
984
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 973

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, 'sql/v1beta4/projects/{project}/instances', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ListInstancesResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::ListInstancesResponse
  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, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListOperationsResponse

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

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String) (defaults to: nil)

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

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of operations per response.

  • page_token (String) (defaults to: nil)

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

  • 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



1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1588

def list_operations(project, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ListOperationsResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::ListOperationsResponse
  command.params['project'] = project unless project.nil?
  command.query['instance'] = instance unless instance.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['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::SqladminV1beta4::ListSslCertsResponse

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



2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 2020

def list_ssl_certs(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ListSslCertsResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::ListSslCertsResponse
  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::SqladminV1beta4::ListTiersResponse

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

Parameters:

  • project (String)

    Project ID of the project for which to list tiers.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

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

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

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



2052
2053
2054
2055
2056
2057
2058
2059
2060
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 2052

def list_tiers(project, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/tiers', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ListTiersResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::ListTiersResponse
  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::SqladminV1beta4::ListUsersResponse

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



2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 2198

def list_users(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
  command.response_representation = Google::Apis::SqladminV1beta4::ListUsersResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::ListUsersResponse
  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::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/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, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
  command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1047

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



1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1690

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, 'sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink', options)
  command.request_representation = Google::Apis::SqladminV1beta4::PerformDiskShrinkContext::Representation
  command.request_object = perform_disk_shrink_context_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1090

def promote_instance_replica(project, instance, failover: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1125

def reencrypt_instance(project, instance, instances_reencrypt_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/reencrypt', options)
  command.request_representation = Google::Apis::SqladminV1beta4::InstancesReencryptRequest::Representation
  command.request_object = instances_reencrypt_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse

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

Parameters:

  • project (String)

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

  • instance (String)

    Required. The 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).

  • 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



1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1163

def release_instance_ssrs_lease(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease', options)
  command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesReleaseSsrsLeaseResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1726

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, 'sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance', options)
  command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesRescheduleMaintenanceRequestBody::Representation
  command.request_object = sql_instances_reschedule_maintenance_request_body_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1197

def reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1762

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, 'sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize', options)
  command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesResetReplicaSizeRequest::Representation
  command.request_object = sql_instances_reset_replica_size_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1230

def restart_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restart', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::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.

  • restore_instances_backup_request_object (Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest) (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



1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1265

def restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup', options)
  command.request_representation = Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest::Representation
  command.request_object = restore_instances_backup_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1304

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, 'sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa', options)
  command.request_representation = Google::Apis::SqladminV1beta4::InstancesRotateServerCaRequest::Representation
  command.request_object = instances_rotate_server_ca_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1339

def start_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/startReplica', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1798

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, 'sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync', options)
  command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesStartExternalSyncRequest::Representation
  command.request_object = sql_instances_start_external_sync_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1372

def stop_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/stopReplica', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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



1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1409

def switchover_instance(project, instance, db_timeout: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/switchover', options)
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1444

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, 'sql/v1beta4/projects/{project}/instances/{instance}/truncateLog', options)
  command.request_representation = Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest::Representation
  command.request_object = instances_truncate_log_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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_v1beta4/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, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
  command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
  command.request_object = database_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1481

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



2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 2236

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, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
  command.request_representation = Google::Apis::SqladminV1beta4::User::Representation
  command.request_object = user_object
  command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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::SqladminV1beta4::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::SqladminV1beta4::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



1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
# File 'lib/google/apis/sqladmin_v1beta4/service.rb', line 1834

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, 'sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings', options)
  command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsRequest::Representation
  command.request_object = sql_instances_verify_external_sync_settings_request_object
  command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta4::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