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



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

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 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_v1beta3/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_v1beta3/service.rb', line 50

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)

    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:



210
211
212
213
214
215
216
217
218
219
220
221
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 210

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)

    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:



249
250
251
252
253
254
255
256
257
258
259
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 249

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)

    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:



865
866
867
868
869
870
871
872
873
874
875
876
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 865

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)

    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:



289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 289

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)

    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:



90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 90

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)

    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:



329
330
331
332
333
334
335
336
337
338
339
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 329

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)

    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:



779
780
781
782
783
784
785
786
787
788
789
790
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 779

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)

    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:



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

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)

    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:



369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 369

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)

    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:



409
410
411
412
413
414
415
416
417
418
419
420
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 409

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)

    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:



948
949
950
951
952
953
954
955
956
957
958
959
960
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 948

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)

    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:



138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 138

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)

    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:



175
176
177
178
179
180
181
182
183
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 175

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)

    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:



451
452
453
454
455
456
457
458
459
460
461
462
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 451

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)

    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:



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

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)

    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:



988
989
990
991
992
993
994
995
996
997
998
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 988

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)

    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:



1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 1024

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)

    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:



492
493
494
495
496
497
498
499
500
501
502
503
504
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 492

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)

    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:



532
533
534
535
536
537
538
539
540
541
542
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 532

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)

    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:



571
572
573
574
575
576
577
578
579
580
581
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 571

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)

    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:



609
610
611
612
613
614
615
616
617
618
619
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 609

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)

    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:



654
655
656
657
658
659
660
661
662
663
664
665
666
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 654

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)

    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:



695
696
697
698
699
700
701
702
703
704
705
706
707
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 695

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)

    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:



736
737
738
739
740
741
742
743
744
745
746
747
748
# File 'generated/google/apis/sqladmin_v1beta3/service.rb', line 736

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