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

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

Overview

Cloud SQL Administration API

Creates and configures Cloud SQL instances, which provide fully-managed MySQL 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



52
53
54
55
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 52

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



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

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. Overrides userIp if both are provided.

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. Overrides userIp if both are provided.



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

def quota_user
  @quota_user
end

#user_ipString

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.



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

def user_ip
  @user_ip
end

Instance Method Details

#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. The API is not ready for Second Generation instances yet.

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



546
547
548
549
550
551
552
553
554
555
556
557
558
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 546

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1320

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



86
87
88
89
90
91
92
93
94
95
96
97
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 86

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



256
257
258
259
260
261
262
263
264
265
266
267
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 256

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



586
587
588
589
590
591
592
593
594
595
596
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 586

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. The change will not take effect until the instance is restarted.

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.

  • sha1_fingerprint (String)

    Sha1 FingerPrint.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1363

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1567

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

#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 Google Cloud Storage bucket as a MySQL dump 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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



626
627
628
629
630
631
632
633
634
635
636
637
638
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 626

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



667
668
669
670
671
672
673
674
675
676
677
678
679
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 667

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



127
128
129
130
131
132
133
134
135
136
137
138
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 127

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



298
299
300
301
302
303
304
305
306
307
308
309
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 298

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1233

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1406

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 MySQL dump file in Google 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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



747
748
749
750
751
752
753
754
755
756
757
758
759
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 747

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 168

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 339

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



787
788
789
790
791
792
793
794
795
796
797
798
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 787

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 to which the newly created Cloud SQL instances should belong.

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

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1449

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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 enqueued 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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 214

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 for which to list Cloud SQL instances.

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

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



379
380
381
382
383
384
385
386
387
388
389
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 379

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 Google Cloud SQL instances.

Parameters:

  • database_version (String)

    Database version for flag retrieval. Flags are specific to the database version.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



506
507
508
509
510
511
512
513
514
515
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 506

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_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)

    Reserved for future use.

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

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1277

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 for which to list Cloud SQL instances.

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

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1489

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 service tiers for Google Cloud SQL, for example D1, D2. 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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1526

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • 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
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1648

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



875
876
877
878
879
880
881
882
883
884
885
886
887
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 875

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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. The changes will not take effect until the instance is restarted. Existing instances without a server certificate will need to call this once to set a 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)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



994
995
996
997
998
999
1000
1001
1002
1003
1004
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 994

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1033

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

#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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1073

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1111

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1150

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1193

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, host, name, user_object = 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.

  • host (String)

    Host of the user in the instance.

  • name (String)

    Name of the user in the instance.

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

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1691

def update_user(project, instance, host, name, user_object = 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