Class: Google::Apis::SqladminV1beta3::SQLAdminService

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

Overview

Cloud SQL Administration API

Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.

Examples:

require 'google/apis/sqladmin_v1beta3'

Sqladmin = Google::Apis::SqladminV1beta3 # 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_v1beta3/service.rb', line 50

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

def user_ip
  @user_ip
end

Instance Method Details

#clone_instance(project, instances_clone_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::InstancesCloneResponse

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

Parameters:

  • project (String)

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

  • instances_clone_request_object (Google::Apis::SqladminV1beta3::InstancesCloneRequest) (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:



200
201
202
203
204
205
206
207
208
209
210
211
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 200

def clone_instance(project, instances_clone_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'projects/{project}/instances/clone', options)
  command.request_representation = Google::Apis::SqladminV1beta3::InstancesCloneRequest::Representation
  command.request_object = instances_clone_request_object
  command.response_representation = Google::Apis::SqladminV1beta3::InstancesCloneResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesCloneResponse
  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

#delete_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::InstancesDeleteResponse

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:



237
238
239
240
241
242
243
244
245
246
247
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 237

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::SqladminV1beta3::InstancesDeleteResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesDeleteResponse
  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::SqladminV1beta3::SslCertsDeleteResponse

Deletes an SSL certificate from 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.

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



823
824
825
826
827
828
829
830
831
832
833
834
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 823

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::SqladminV1beta3::SslCertsDeleteResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::SslCertsDeleteResponse
  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

#export_instance(project, instance, instances_export_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::InstancesExportResponse

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.

  • instances_export_request_object (Google::Apis::SqladminV1beta3::InstancesExportRequest) (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:



275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 275

def export_instance(project, instance, instances_export_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::SqladminV1beta3::InstancesExportRequest::Representation
  command.request_object = instances_export_request_object
  command.response_representation = Google::Apis::SqladminV1beta3::InstancesExportResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesExportResponse
  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, backup_configuration, due_time, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::BackupRun

Retrieves information about a specified backup run for 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.

  • backup_configuration (String)

    Identifier for the backup configuration. This gets generated automatically when a backup configuration is created.

  • due_time (String)

    The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00. 094Z.

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



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

def get_backup_run(project, instance, backup_configuration, due_time, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'projects/{project}/instances/{instance}/backupRuns/{backupConfiguration}', options)
  command.response_representation = Google::Apis::SqladminV1beta3::BackupRun::Representation
  command.response_class = Google::Apis::SqladminV1beta3::BackupRun
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.params['backupConfiguration'] = backup_configuration unless backup_configuration.nil?
  command.query['dueTime'] = due_time unless due_time.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::SqladminV1beta3::DatabaseInstance

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



313
314
315
316
317
318
319
320
321
322
323
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 313

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::SqladminV1beta3::DatabaseInstance::Representation
  command.response_class = Google::Apis::SqladminV1beta3::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, instance, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::InstanceOperation

Retrieves information about a specific operation that was performed on 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.

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



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

def get_operation(project, instance, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'projects/{project}/instances/{instance}/operations/{operation}', options)
  command.response_representation = Google::Apis::SqladminV1beta3::InstanceOperation::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstanceOperation
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.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::SqladminV1beta3::SslCert

Retrieves an SSL certificate as specified by its SHA-1 fingerprint.

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:



862
863
864
865
866
867
868
869
870
871
872
873
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 862

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::SqladminV1beta3::SslCert::Representation
  command.response_class = Google::Apis::SqladminV1beta3::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, instances_import_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::InstancesImportResponse

Imports data into a Cloud SQL instance from a MySQL dump file stored in a Google Cloud Storage bucket.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

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

  • instances_import_request_object (Google::Apis::SqladminV1beta3::InstancesImportRequest) (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:



351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 351

def import_instance(project, instance, instances_import_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::SqladminV1beta3::InstancesImportRequest::Representation
  command.request_object = instances_import_request_object
  command.response_representation = Google::Apis::SqladminV1beta3::InstancesImportResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesImportResponse
  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::SqladminV1beta3::InstancesInsertResponse

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



389
390
391
392
393
394
395
396
397
398
399
400
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 389

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::SqladminV1beta3::DatabaseInstance::Representation
  command.request_object = database_instance_object
  command.response_representation = Google::Apis::SqladminV1beta3::InstancesInsertResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesInsertResponse
  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, ssl_certs_insert_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::SslCertsInsertResponse

Creates an SSL certificate and returns the certificate, the associated private key, and the server certificate authority.

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.

  • ssl_certs_insert_request_object (Google::Apis::SqladminV1beta3::SslCertsInsertRequest) (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:



902
903
904
905
906
907
908
909
910
911
912
913
914
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 902

def insert_ssl_cert(project, instance, ssl_certs_insert_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::SqladminV1beta3::SslCertsInsertRequest::Representation
  command.request_object = ssl_certs_insert_request_object
  command.response_representation = Google::Apis::SqladminV1beta3::SslCertsInsertResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::SslCertsInsertResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

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

Lists all backup runs associated with 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.

  • backup_configuration (String)

    Identifier for the backup configuration. This gets generated automatically when a backup configuration is created.

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



132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 132

def list_backup_runs(project, instance, backup_configuration, 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::SqladminV1beta3::BackupRunsListResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::BackupRunsListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['backupConfiguration'] = backup_configuration unless backup_configuration.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_flags(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::FlagsListResponse

Lists all database flags that can be set for Google Cloud SQL instances.

Parameters:

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



167
168
169
170
171
172
173
174
175
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 167

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

Lists instances for a given project, in alphabetical order by instance name.

Parameters:

  • project (String)

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

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



429
430
431
432
433
434
435
436
437
438
439
440
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 429

def list_instances(project, 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::SqladminV1beta3::InstancesListResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesListResponse
  command.params['project'] = project unless project.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::SqladminV1beta3::OperationsListResponse

Lists all operations that have been performed on 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.

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



783
784
785
786
787
788
789
790
791
792
793
794
795
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 783

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}/instances/{instance}/operations', options)
  command.response_representation = Google::Apis::SqladminV1beta3::OperationsListResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::OperationsListResponse
  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_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::SslCertsListResponse

Lists all of the current SSL certificates defined for a 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)

    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:



940
941
942
943
944
945
946
947
948
949
950
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 940

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::SqladminV1beta3::SslCertsListResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::SslCertsListResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  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::SqladminV1beta3::TiersListResponse

Lists service tiers that can be used to create Google Cloud SQL instances.

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:



974
975
976
977
978
979
980
981
982
983
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 974

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::SqladminV1beta3::TiersListResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::TiersListResponse
  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

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

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

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

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

  • database_instance_object (Google::Apis::SqladminV1beta3::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:



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

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::SqladminV1beta3::DatabaseInstance::Representation
  command.request_object = database_instance_object
  command.response_representation = Google::Apis::SqladminV1beta3::InstancesUpdateResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesUpdateResponse
  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::SqladminV1beta3::InstancesPromoteReplicaResponse

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:



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

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::SqladminV1beta3::InstancesPromoteReplicaResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesPromoteReplicaResponse
  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::SqladminV1beta3::InstancesResetSslConfigResponse

Deletes all client certificates and generates a new server SSL certificate for 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.

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



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

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::SqladminV1beta3::InstancesResetSslConfigResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesResetSslConfigResponse
  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::SqladminV1beta3::InstancesRestartResponse

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:



579
580
581
582
583
584
585
586
587
588
589
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 579

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::SqladminV1beta3::InstancesRestartResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesRestartResponse
  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, backup_configuration, due_time, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::InstancesRestoreBackupResponse

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.

  • backup_configuration (String)

    The identifier of the backup configuration. This gets generated automatically when a backup configuration is created.

  • due_time (String)

    The start time of the four-hour backup window. The backup can occur any time in the window. The time is in RFC 3339 format, for example 2012-11-15T16:19:00. 094Z.

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



622
623
624
625
626
627
628
629
630
631
632
633
634
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 622

def restore_instance_backup(project, instance, backup_configuration, due_time, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'projects/{project}/instances/{instance}/restoreBackup', options)
  command.response_representation = Google::Apis::SqladminV1beta3::InstancesRestoreBackupResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesRestoreBackupResponse
  command.params['project'] = project unless project.nil?
  command.params['instance'] = instance unless instance.nil?
  command.query['backupConfiguration'] = backup_configuration unless backup_configuration.nil?
  command.query['dueTime'] = due_time unless due_time.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

#set_instance_root_password(project, instance, instance_set_root_password_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::InstancesSetRootPasswordResponse

Sets the password for the root user of 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.

  • instance_set_root_password_request_object (Google::Apis::SqladminV1beta3::InstanceSetRootPasswordRequest) (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:



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

def set_instance_root_password(project, instance, instance_set_root_password_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'projects/{project}/instances/{instance}/setRootPassword', options)
  command.request_representation = Google::Apis::SqladminV1beta3::InstanceSetRootPasswordRequest::Representation
  command.request_object = instance_set_root_password_request_object
  command.response_representation = Google::Apis::SqladminV1beta3::InstancesSetRootPasswordResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesSetRootPasswordResponse
  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_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta3::InstancesUpdateResponse

Updates the settings of a Cloud SQL instance.

Parameters:

  • project (String)

    Project ID of the project that contains the instance.

  • instance (String)

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

  • database_instance_object (Google::Apis::SqladminV1beta3::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:



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

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::SqladminV1beta3::DatabaseInstance::Representation
  command.request_object = database_instance_object
  command.response_representation = Google::Apis::SqladminV1beta3::InstancesUpdateResponse::Representation
  command.response_class = Google::Apis::SqladminV1beta3::InstancesUpdateResponse
  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