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

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

Overview

Cloud SQL Admin API

Creates and manages Cloud SQL instances, which provide fully managed MySQL or PostgreSQL databases.

Examples:

require 'google/apis/sqladmin_v1beta4'

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

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

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

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeSQLAdminService

Returns a new instance of SQLAdminService



50
51
52
53
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 50

def initialize
  super('https://www.googleapis.com/', 'sql/v1beta4/')
  @batch_path = 'batch/sqladmin/v1beta4'
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.



39
40
41
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 39

def key
  @key
end

#quota_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.



44
45
46
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



48
49
50
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 48

def user_ip
  @user_ip
end

Instance Method Details

#add_instance_server_ca(project, instance, fields: nil, quota_user: nil, user_ip: 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.

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



521
522
523
524
525
526
527
528
529
530
531
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 521

def add_instance_server_ca(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation

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

Parameters:

  • project (String)

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

  • instance (String)

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

  • clone_instances_request_object (Google::Apis::SqladminV1beta4::CloneInstancesRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1414

def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def delete_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_database(project, instance, database, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



244
245
246
247
248
249
250
251
252
253
254
255
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 244

def delete_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_instance(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



597
598
599
600
601
602
603
604
605
606
607
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 597

def delete_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1455

def delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_user(project, instance, host, name, fields: nil, quota_user: nil, user_ip: 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)

    Host of the user in the instance.

  • name (String)

    Name of the user in the instance.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1648

def delete_user(project, instance, host, name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:delete, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: 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)

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

  • export_instances_request_object (Google::Apis::SqladminV1beta4::ExportInstancesRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



675
676
677
678
679
680
681
682
683
684
685
686
687
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 675

def export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Failover the instance to its failover replica instance.

Parameters:

  • project (String)

    ID of the project that contains the read replica.

  • instance (String)

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

  • instances_failover_request_object (Google::Apis::SqladminV1beta4::InstancesFailoverRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



714
715
716
717
718
719
720
721
722
723
724
725
726
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 714

def failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



121
122
123
124
125
126
127
128
129
130
131
132
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 121

def get_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_database(project, instance, database, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



284
285
286
287
288
289
290
291
292
293
294
295
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 284

def get_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_instance(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



752
753
754
755
756
757
758
759
760
761
762
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 752

def get_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_operation(project, operation, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1331

def get_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1496

def get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



790
791
792
793
794
795
796
797
798
799
800
801
802
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 790

def import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

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

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

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

  • backup_run_object (Google::Apis::SqladminV1beta4::BackupRun) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 160

def insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

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

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

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

  • database_object (Google::Apis::SqladminV1beta4::Database) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 323

def insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



828
829
830
831
832
833
834
835
836
837
838
839
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 828

def insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1536

def insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1687

def insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListBackupRunsResponse

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

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

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

  • max_results (Fixnum)

    Maximum number of backup runs per response.

  • page_token (String)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



204
205
206
207
208
209
210
211
212
213
214
215
216
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 204

def list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_databases(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



361
362
363
364
365
366
367
368
369
370
371
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 361

def list_databases(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

List all available database flags for Cloud SQL instances.

Parameters:

  • database_version (String)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



482
483
484
485
486
487
488
489
490
491
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 482

def list_flags(database_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_instance_server_cas(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



914
915
916
917
918
919
920
921
922
923
924
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 914

def list_instance_server_cas(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListInstancesResponse

Lists instances under a given project in the alphabetical order of the instance name.

Parameters:

  • project (String)

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

  • filter (String)

    An expression for filtering the results of the request, such as by name or label.

  • max_results (Fixnum)

    The maximum number of results to return per response.

  • page_token (String)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



872
873
874
875
876
877
878
879
880
881
882
883
884
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 872

def list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_operations(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: 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)

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

  • max_results (Fixnum)

    Maximum number of operations per response.

  • page_token (String)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1373

def list_operations(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1574

def list_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

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

Parameters:

  • project (String)

    Project ID of the project for which to list tiers.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1609

def list_tiers(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_users(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def list_users(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 401

def patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.. 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



953
954
955
956
957
958
959
960
961
962
963
964
965
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 953

def patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

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

Parameters:

  • project (String)

    ID of the project that contains the read replica.

  • instance (String)

    Cloud SQL read replica instance name.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def promote_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1028

def reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#restart_instance(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1064

def restart_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation

Restores a backup of a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

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

  • restore_instances_backup_request_object (Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1101

def restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1141

def rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#start_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1179

def start_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#stop_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1215

def stop_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Truncate MySQL general and slow query log tables

Parameters:

  • project (String)

    Project ID of the Cloud SQL project.

  • instance (String)

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

  • instances_truncate_log_request_object (Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1252

def truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 444

def update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1293

def update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_user(project, instance, name, user_object = nil, host: nil, fields: nil, quota_user: nil, user_ip: 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.

  • name (String)

    Name of the user in the instance.

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

    Host of the user in the instance.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1766

def update_user(project, instance, name, user_object = nil, host: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, '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?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end