Class: Google::Apis::SqlV1beta4::SQLAdminService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::SqlV1beta4::SQLAdminService
- Defined in:
- generated/google/apis/sql_v1beta4/service.rb
Overview
Cloud SQL Admin API
API for Cloud SQL database instance management
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#add_instance_server_ca(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Add a new trusted Certificate Authority (CA) version for the specified instance.
-
#clone_instance(project, instance, instances_clone_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Creates a Cloud SQL instance as a clone of the source instance.
-
#create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCert
Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance.
-
#delete_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes the backup taken by a backup run.
-
#delete_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes a database from a Cloud SQL instance.
-
#delete_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes a Cloud SQL instance.
-
#delete_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes the SSL certificate.
-
#delete_user(project, instance, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes a user from a Cloud SQL instance.
-
#demote_instance_master(project, instance, instances_demote_master_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
-
#export_instance(project, instance, instances_export_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
-
#failover_instance(project, instance, instances_failover_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Failover the instance to its failover replica instance.
-
#get_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::BackupRun
Retrieves a resource containing information about a backup run.
-
#get_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Database
Retrieves a resource containing information about a database inside a Cloud SQL instance.
-
#get_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::DatabaseInstance
Retrieves a resource containing information about a Cloud SQL instance.
-
#get_operation(project, operation, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Retrieves an instance operation that has been performed on an instance.
-
#get_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCert
Retrieves a particular SSL certificate.
-
#import_instance(project, instance, instances_import_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
-
#initialize ⇒ SQLAdminService
constructor
A new instance of SQLAdminService.
-
#insert_backup_run(project, instance, backup_run_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Creates a new backup run on demand.
-
#insert_database(project, instance, database_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Inserts a resource containing information about a database inside a Cloud SQL instance.
-
#insert_instance(project, database_instance_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Creates a new Cloud SQL instance.
-
#insert_ssl_cert(project, instance, ssl_certs_insert_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCertsInsertResponse
Creates an SSL certificate and returns it along with the private key and server certificate authority.
-
#insert_user(project, instance, user_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Creates a new user in a Cloud SQL instance.
-
#list_backup_runs(project, instance, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::BackupRunsListResponse
Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.
-
#list_databases(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::DatabasesListResponse
Lists databases in the specified Cloud SQL instance.
-
#list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::FlagsListResponse
List all available database flags for Cloud SQL instances.
-
#list_instance_server_cas(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::InstancesListServerCasResponse
Lists all of the trusted Certificate Authorities (CAs) for the specified instance.
-
#list_instances(project, filter: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::InstancesListResponse
Lists instances under a given project.
-
#list_operations(project, instance: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::OperationsListResponse
Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.
-
#list_ssl_certs(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCertsListResponse
Lists all of the current SSL certificates for the instance.
-
#list_tiers(project, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::TiersListResponse
Lists all available machine types (tiers) for Cloud SQL, for example, db-n1-standard-1.
-
#list_users(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::UsersListResponse
Lists users in the specified Cloud SQL instance.
-
#patch_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Partially updates a resource containing information about a database inside a Cloud SQL instance.
-
#patch_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates settings of a Cloud SQL instance.
-
#promote_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Promotes the read replica instance to be a stand-alone Cloud SQL instance.
-
#reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Reschedules the maintenance on the given instance.
-
#reschedule_project_location_instance_maintenance(parent, sql_instances_reschedule_maintenance_request_body_object = nil, instance: nil, project: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Reschedules the maintenance on the given instance.
-
#reset_instance_ssl_config(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes all client certificates and generates a new server SSL certificate for the instance.
-
#restart_instance(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Restarts a Cloud SQL instance.
-
#restore_instance_backup(project, instance, instances_restore_backup_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Restores a backup of a Cloud SQL instance.
-
#rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
-
#start_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Starts the replication in the read replica instance.
-
#start_project_instance_external_sync(project, instance, parent: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Start External master migration.
-
#start_project_location_instance_external_sync(parent, instance: nil, project: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Start External master migration.
-
#stop_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Stops the replication in the read replica instance.
-
#truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Truncate MySQL general and slow query log tables.
-
#update_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates a resource containing information about a database inside a Cloud SQL instance.
-
#update_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates settings of a Cloud SQL instance.
-
#update_user(project, instance, user_object = nil, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates an existing user in a Cloud SQL instance.
-
#verify_project_instance_external_sync_settings(project, instance, parent: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
Verify External master external sync settings.
-
#verify_project_location_instance_external_sync_settings(parent, instance: nil, project: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
Verify External master external sync settings.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ SQLAdminService
Returns a new instance of SQLAdminService.
45 46 47 48 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 45 def initialize super('https://sqladmin.googleapis.com/', '') @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
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.
38 39 40 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 38 def key @key end |
#quota_user ⇒ String
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.
43 44 45 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#add_instance_server_ca(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.
543 544 545 546 547 548 549 550 551 552 553 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 543 def add_instance_server_ca(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/addServerCa', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#clone_instance(project, instance, instances_clone_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Creates a Cloud SQL instance as a clone of the source instance.
582 583 584 585 586 587 588 589 590 591 592 593 594 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 582 def clone_instance(project, instance, instances_clone_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/clone', ) command.request_representation = Google::Apis::SqlV1beta4::InstancesCloneRequest::Representation command.request_object = instances_clone_request_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCert
Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.
1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1720 def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral', ) command.request_representation = Google::Apis::SqlV1beta4::SslCertsCreateEphemeralRequest::Representation command.request_object = ssl_certs_create_ephemeral_request_object command.response_representation = Google::Apis::SqlV1beta4::SslCert::Representation command.response_class = Google::Apis::SqlV1beta4::SslCert command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes the backup taken by a backup run.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 81 def delete_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['id'] = id unless id.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes a database from a Cloud SQL instance.
251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 251 def delete_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['database'] = database unless database.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes a Cloud SQL instance.
621 622 623 624 625 626 627 628 629 630 631 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 621 def delete_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.
1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1763 def delete_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_user(project, instance, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes a user from a Cloud SQL instance.
1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1959 def delete_user(project, instance, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/users', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['host'] = host unless host.nil? command.query['name'] = name unless name.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#demote_instance_master(project, instance, instances_demote_master_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
660 661 662 663 664 665 666 667 668 669 670 671 672 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 660 def demote_instance_master(project, instance, instances_demote_master_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster', ) command.request_representation = Google::Apis::SqlV1beta4::InstancesDemoteMasterRequest::Representation command.request_object = instances_demote_master_request_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#export_instance(project, instance, instances_export_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
701 702 703 704 705 706 707 708 709 710 711 712 713 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 701 def export_instance(project, instance, instances_export_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/export', ) command.request_representation = Google::Apis::SqlV1beta4::InstancesExportRequest::Representation command.request_object = instances_export_request_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#failover_instance(project, instance, instances_failover_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Failover the instance to its failover replica instance.
742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 742 def failover_instance(project, instance, instances_failover_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/failover', ) command.request_representation = Google::Apis::SqlV1beta4::InstancesFailoverRequest::Representation command.request_object = instances_failover_request_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::BackupRun
Retrieves a resource containing information about a backup run.
123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 123 def get_backup_run(project, instance, id, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', ) command.response_representation = Google::Apis::SqlV1beta4::BackupRun::Representation command.response_class = Google::Apis::SqlV1beta4::BackupRun command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['id'] = id unless id.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Database
Retrieves a resource containing information about a database inside a Cloud SQL instance.
294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 294 def get_database(project, instance, database, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', ) command.response_representation = Google::Apis::SqlV1beta4::Database::Representation command.response_class = Google::Apis::SqlV1beta4::Database command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['database'] = database unless database.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::DatabaseInstance
Retrieves a resource containing information about a Cloud SQL instance.
781 782 783 784 785 786 787 788 789 790 791 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 781 def get_instance(project, instance, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}', ) command.response_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation command.response_class = Google::Apis::SqlV1beta4::DatabaseInstance command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_operation(project, operation, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Retrieves an instance operation that has been performed on an instance.
1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1380 def get_operation(project, operation, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations/{operation}', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['operation'] = operation unless operation.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCert
Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.
1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1806 def get_ssl_cert(project, instance, sha1_fingerprint, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', ) command.response_representation = Google::Apis::SqlV1beta4::SslCert::Representation command.response_class = Google::Apis::SqlV1beta4::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['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#import_instance(project, instance, instances_import_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
820 821 822 823 824 825 826 827 828 829 830 831 832 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 820 def import_instance(project, instance, instances_import_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/import', ) command.request_representation = Google::Apis::SqlV1beta4::InstancesImportRequest::Representation command.request_object = instances_import_request_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_backup_run(project, instance, backup_run_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Creates a new backup run on demand. This method is applicable only to Second Generation instances.
163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 163 def insert_backup_run(project, instance, backup_run_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', ) command.request_representation = Google::Apis::SqlV1beta4::BackupRun::Representation command.request_object = backup_run_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_database(project, instance, database_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Inserts a resource containing information about a database inside a Cloud SQL instance.
334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 334 def insert_database(project, instance, database_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', ) command.request_representation = Google::Apis::SqlV1beta4::Database::Representation command.request_object = database_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_instance(project, database_instance_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Creates a new Cloud SQL instance.
859 860 861 862 863 864 865 866 867 868 869 870 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 859 def insert_instance(project, database_instance_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances', ) command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation command.request_object = database_instance_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_ssl_cert(project, instance, ssl_certs_insert_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCertsInsertResponse
Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.
1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1847 def insert_ssl_cert(project, instance, ssl_certs_insert_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', ) command.request_representation = Google::Apis::SqlV1beta4::SslCertsInsertRequest::Representation command.request_object = ssl_certs_insert_request_object command.response_representation = Google::Apis::SqlV1beta4::SslCertsInsertResponse::Representation command.response_class = Google::Apis::SqlV1beta4::SslCertsInsertResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_user(project, instance, user_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Creates a new user in a Cloud SQL instance.
1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1999 def insert_user(project, instance, user_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/users', ) command.request_representation = Google::Apis::SqlV1beta4::User::Representation command.request_object = user_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_backup_runs(project, instance, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::BackupRunsListResponse
Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.
208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 208 def list_backup_runs(project, instance, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', ) command.response_representation = Google::Apis::SqlV1beta4::BackupRunsListResponse::Representation command.response_class = Google::Apis::SqlV1beta4::BackupRunsListResponse 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['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_databases(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::DatabasesListResponse
Lists databases in the specified Cloud SQL instance.
373 374 375 376 377 378 379 380 381 382 383 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 373 def list_databases(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', ) command.response_representation = Google::Apis::SqlV1beta4::DatabasesListResponse::Representation command.response_class = Google::Apis::SqlV1beta4::DatabasesListResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::FlagsListResponse
List all available database flags for Cloud SQL instances.
504 505 506 507 508 509 510 511 512 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 504 def list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/flags', ) command.response_representation = Google::Apis::SqlV1beta4::FlagsListResponse::Representation command.response_class = Google::Apis::SqlV1beta4::FlagsListResponse command.query['databaseVersion'] = database_version unless database_version.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_instance_server_cas(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::InstancesListServerCasResponse
Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.
952 953 954 955 956 957 958 959 960 961 962 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 952 def list_instance_server_cas(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/listServerCas', ) command.response_representation = Google::Apis::SqlV1beta4::InstancesListServerCasResponse::Representation command.response_class = Google::Apis::SqlV1beta4::InstancesListServerCasResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_instances(project, filter: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::InstancesListResponse
Lists instances under a given project.
909 910 911 912 913 914 915 916 917 918 919 920 921 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 909 def list_instances(project, filter: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances', ) command.response_representation = Google::Apis::SqlV1beta4::InstancesListResponse::Representation command.response_class = Google::Apis::SqlV1beta4::InstancesListResponse command.params['project'] = project unless project.nil? command.query['filter'] = filter unless filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_operations(project, instance: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::OperationsListResponse
Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.
1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1425 def list_operations(project, instance: nil, max_results: nil, page_token: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations', ) command.response_representation = Google::Apis::SqlV1beta4::OperationsListResponse::Representation command.response_class = Google::Apis::SqlV1beta4::OperationsListResponse command.params['project'] = project unless project.nil? command.query['instance'] = instance unless instance.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_ssl_certs(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SslCertsListResponse
Lists all of the current SSL certificates for the instance.
1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1886 def list_ssl_certs(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', ) command.response_representation = Google::Apis::SqlV1beta4::SslCertsListResponse::Representation command.response_class = Google::Apis::SqlV1beta4::SslCertsListResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_tiers(project, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::TiersListResponse
Lists all available machine types (tiers) for Cloud SQL, for example, db-n1-standard-1. For related information, see Pricing.
1920 1921 1922 1923 1924 1925 1926 1927 1928 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1920 def list_tiers(project, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/tiers', ) command.response_representation = Google::Apis::SqlV1beta4::TiersListResponse::Representation command.response_class = Google::Apis::SqlV1beta4::TiersListResponse command.params['project'] = project unless project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_users(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::UsersListResponse
Lists users in the specified Cloud SQL instance.
2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 2038 def list_users(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/users', ) command.response_representation = Google::Apis::SqlV1beta4::UsersListResponse::Representation command.response_class = Google::Apis::SqlV1beta4::UsersListResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.
422 423 424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 422 def patch_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', ) command.request_representation = Google::Apis::SqlV1beta4::Database::Representation command.request_object = database_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['database'] = database unless database.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates settings of a Cloud SQL instance. This method supports patch semantics.
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 991 def patch_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'sql/v1beta4/projects/{project}/instances/{instance}', ) command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation command.request_object = database_instance_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#promote_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Promotes the read replica instance to be a stand-alone Cloud SQL instance.
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1030 def promote_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Reschedules the maintenance on the given instance.
1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1466 def reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance', ) command.request_representation = Google::Apis::SqlV1beta4::SqlInstancesRescheduleMaintenanceRequestBody::Representation command.request_object = sql_instances_reschedule_maintenance_request_body_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reschedule_project_location_instance_maintenance(parent, sql_instances_reschedule_maintenance_request_body_object = nil, instance: nil, project: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Reschedules the maintenance on the given instance.
1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1592 def reschedule_project_location_instance_maintenance(parent, sql_instances_reschedule_maintenance_request_body_object = nil, instance: nil, project: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/{+parent}/rescheduleMaintenance', ) command.request_representation = Google::Apis::SqlV1beta4::SqlInstancesRescheduleMaintenanceRequestBody::Representation command.request_object = sql_instances_reschedule_maintenance_request_body_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['parent'] = parent unless parent.nil? command.query['instance'] = instance unless instance.nil? command.query['project'] = project unless project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reset_instance_ssl_config(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes all client certificates and generates a new server SSL certificate for the instance.
1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1068 def reset_instance_ssl_config(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#restart_instance(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Restarts a Cloud SQL instance.
1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1105 def restart_instance(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restart', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#restore_instance_backup(project, instance, instances_restore_backup_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Restores a backup of a Cloud SQL instance.
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1144 def restore_instance_backup(project, instance, instances_restore_backup_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup', ) command.request_representation = Google::Apis::SqlV1beta4::InstancesRestoreBackupRequest::Representation command.request_object = instances_restore_backup_request_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1185 def rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa', ) command.request_representation = Google::Apis::SqlV1beta4::InstancesRotateServerCaRequest::Representation command.request_object = instances_rotate_server_ca_request_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#start_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Starts the replication in the read replica instance.
1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1225 def start_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/startReplica', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#start_project_instance_external_sync(project, instance, parent: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Start External master migration.
1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1508 def start_project_instance_external_sync(project, instance, parent: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['syncMode'] = sync_mode unless sync_mode.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#start_project_location_instance_external_sync(parent, instance: nil, project: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Start External master migration.
1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1634 def start_project_location_instance_external_sync(parent, instance: nil, project: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/{+parent}/startExternalSync', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['parent'] = parent unless parent.nil? command.query['instance'] = instance unless instance.nil? command.query['project'] = project unless project.nil? command.query['syncMode'] = sync_mode unless sync_mode.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#stop_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Stops the replication in the read replica instance.
1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1263 def stop_instance_replica(project, instance, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/stopReplica', ) command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Truncate MySQL general and slow query log tables
1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1301 def truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/truncateLog', ) command.request_representation = Google::Apis::SqlV1beta4::InstancesTruncateLogRequest::Representation command.request_object = instances_truncate_log_request_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates a resource containing information about a database inside a Cloud SQL instance.
468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 468 def update_database(project, instance, database, database_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', ) command.request_representation = Google::Apis::SqlV1beta4::Database::Representation command.request_object = database_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['database'] = database unless database.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates settings of a Cloud SQL instance.
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1341 def update_instance(project, instance, database_instance_object = nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}', ) command.request_representation = Google::Apis::SqlV1beta4::DatabaseInstance::Representation command.request_object = database_instance_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_user(project, instance, user_object = nil, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates an existing user in a Cloud SQL instance.
2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 2080 def update_user(project, instance, user_object = nil, host: nil, name: nil, resource_name: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}/users', ) command.request_representation = Google::Apis::SqlV1beta4::User::Representation command.request_object = user_object command.response_representation = Google::Apis::SqlV1beta4::Operation::Representation command.response_class = Google::Apis::SqlV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['host'] = host unless host.nil? command.query['name'] = name unless name.nil? command.query['resourceName'] = resource_name unless resource_name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#verify_project_instance_external_sync_settings(project, instance, parent: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
Verify External master external sync settings.
1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1551 def verify_project_instance_external_sync_settings(project, instance, parent: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings', ) command.response_representation = Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse::Representation command.response_class = Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['parent'] = parent unless parent.nil? command.query['syncMode'] = sync_mode unless sync_mode.nil? command.query['verifyConnectionOnly'] = verify_connection_only unless verify_connection_only.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#verify_project_location_instance_external_sync_settings(parent, instance: nil, project: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
Verify External master external sync settings.
1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1677 def verify_project_location_instance_external_sync_settings(parent, instance: nil, project: nil, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/{+parent}/verifyExternalSyncSettings', ) command.response_representation = Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse::Representation command.response_class = Google::Apis::SqlV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse command.params['parent'] = parent unless parent.nil? command.query['instance'] = instance unless instance.nil? command.query['project'] = project unless project.nil? command.query['syncMode'] = sync_mode unless sync_mode.nil? command.query['verifyConnectionOnly'] = verify_connection_only unless verify_connection_only.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |