Class: Google::Apis::SqladminV1beta4::SQLAdminService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::SqladminV1beta4::SQLAdminService
- Defined in:
- generated/google/apis/sqladmin_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.
Instance Method Summary collapse
-
#add_instance_server_ca(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Add a new trusted Certificate Authority (CA) version for the specified instance.
-
#clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::SslCert
Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance.
-
#delete_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes the backup taken by a backup run.
-
#delete_database(project, instance, database, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a database from a Cloud SQL instance.
-
#delete_instance(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a Cloud SQL instance.
-
#delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes the SSL certificate.
-
#delete_user(project, instance, host: nil, name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a user from a Cloud SQL instance.
-
#demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
-
#export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
-
#failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Failover the instance to its failover replica instance.
-
#get_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::BackupRun
Retrieves a resource containing information about a backup run.
-
#get_database(project, instance, database, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Database
Retrieves a resource containing information about a database inside a Cloud SQL instance.
-
#get_instance(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::DatabaseInstance
Retrieves a resource containing information about a Cloud SQL instance.
-
#get_operation(project, operation, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Retrieves an instance operation that has been performed on an instance.
-
#get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::SslCert
Retrieves a particular SSL certificate.
-
#import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
-
#initialize ⇒ SQLAdminService
constructor
A new instance of SQLAdminService.
-
#insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a new backup run on demand.
-
#insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Inserts a resource containing information about a database inside a Cloud SQL instance.
-
#insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a new Cloud SQL instance.
-
#insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::InsertSslCertsResponse
Creates an SSL certificate and returns it along with the private key and server certificate authority.
-
#insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a new user in a Cloud SQL instance.
-
#list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListBackupRunsResponse
Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.
-
#list_databases(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListDatabasesResponse
Lists databases in the specified Cloud SQL instance.
-
#list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListFlagsResponse
List all available database flags for Cloud SQL instances.
-
#list_instance_server_cas(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::InstancesListServerCasResponse
Lists all of the trusted Certificate Authorities (CAs) for the specified instance.
-
#list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListInstancesResponse
Lists instances under a given project.
-
#list_operations(project, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListOperationsResponse
Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.
-
#list_ssl_certs(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListSslCertsResponse
Lists all of the current SSL certificates for the instance.
-
#list_tiers(project, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListTiersResponse
Lists all available machine types (tiers) for Cloud SQL, for example, db-n1- standard-1.
-
#list_users(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListUsersResponse
Lists users in the specified Cloud SQL instance.
-
#patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Partially updates a resource containing information about a database inside a Cloud SQL instance.
-
#patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates settings of a Cloud SQL instance.
-
#promote_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Reschedules the maintenance on the given instance.
-
#reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes all client certificates and generates a new server SSL certificate for the instance.
-
#restart_instance(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Restarts a Cloud SQL instance.
-
#restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Restores a backup of a Cloud SQL instance.
-
#rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
-
#start_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Starts the replication in the read replica instance.
-
#start_project_instance_external_sync(project, instance, skip_verification: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Start External primary instance migration.
-
#stop_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Stops the replication in the read replica instance.
-
#truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Truncate MySQL general and slow query log tables.
-
#update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates a resource containing information about a database inside a Cloud SQL instance.
-
#update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates settings of a Cloud SQL instance.
-
#update_user(project, instance, user_object = nil, host: nil, name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates an existing user in a Cloud SQL instance.
-
#verify_project_instance_external_sync_settings(project, instance, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
Verify External primary instance external sync settings.
Constructor Details
#initialize ⇒ SQLAdminService
Returns a new instance of SQLAdminService.
45 46 47 48 |
# File 'generated/google/apis/sqladmin_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/sqladmin_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/sqladmin_v1beta4/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#add_instance_server_ca(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.
481 482 483 484 485 486 487 488 489 490 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 481 def add_instance_server_ca(project, instance, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.
517 518 519 520 521 522 523 524 525 526 527 528 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 517 def clone_instance(project, instance, clone_instances_request_object = 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::SqladminV1beta4::CloneInstancesRequest::Representation command.request_object = clone_instances_request_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::SslCert
Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.
1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1424 def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = 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::SqladminV1beta4::SslCertsCreateEphemeralRequest::Representation command.request_object = ssl_certs_create_ephemeral_request_object command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation command.response_class = Google::Apis::SqladminV1beta4::SslCert command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes the backup taken by a backup run.
75 76 77 78 79 80 81 82 83 84 85 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 75 def delete_backup_run(project, instance, id, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_database(project, instance, database, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a database from a Cloud SQL instance.
225 226 227 228 229 230 231 232 233 234 235 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 225 def delete_database(project, instance, database, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_instance(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a Cloud SQL instance.
552 553 554 555 556 557 558 559 560 561 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 552 def delete_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', ) command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.
1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1462 def delete_ssl_cert(project, instance, sha1_fingerprint, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_user(project, instance, host: nil, name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a user from a Cloud SQL instance.
1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1640 def delete_user(project, instance, host: nil, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['host'] = host unless host.nil? command.query['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.
587 588 589 590 591 592 593 594 595 596 597 598 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 587 def demote_instance_master(project, instance, instances_demote_master_request_object = 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::SqladminV1beta4::InstancesDemoteMasterRequest::Representation command.request_object = instances_demote_master_request_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.
624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 624 def export_instance(project, instance, export_instances_request_object = 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::SqladminV1beta4::ExportInstancesRequest::Representation command.request_object = export_instances_request_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Failover the instance to its failover replica instance. Using this operation might cause your instance to restart.
661 662 663 664 665 666 667 668 669 670 671 672 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 661 def failover_instance(project, instance, instances_failover_request_object = 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::SqladminV1beta4::InstancesFailoverRequest::Representation command.request_object = instances_failover_request_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::BackupRun
Retrieves a resource containing information about a backup run.
111 112 113 114 115 116 117 118 119 120 121 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 111 def get_backup_run(project, instance, id, 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::SqladminV1beta4::BackupRun::Representation command.response_class = Google::Apis::SqladminV1beta4::BackupRun command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['id'] = id unless id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_database(project, instance, database, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Database
Retrieves a resource containing information about a database inside a Cloud SQL instance.
262 263 264 265 266 267 268 269 270 271 272 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 262 def get_database(project, instance, database, 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::SqladminV1beta4::Database::Representation command.response_class = Google::Apis::SqladminV1beta4::Database command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_instance(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::DatabaseInstance
Retrieves a resource containing information about a Cloud SQL instance.
696 697 698 699 700 701 702 703 704 705 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 696 def get_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}', ) command.response_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation command.response_class = Google::Apis::SqladminV1beta4::DatabaseInstance command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_operation(project, operation, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Retrieves an instance operation that has been performed on an instance.
1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1233 def get_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations/{operation}', ) command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['operation'] = operation unless operation.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::SslCert
Retrieves a particular SSL certificate. Does not include the private key ( required for usage). The private key must be saved from the response to initial creation.
1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1500 def get_ssl_cert(project, instance, sha1_fingerprint, 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::SqladminV1beta4::SslCert::Representation command.response_class = Google::Apis::SqladminV1beta4::SslCert command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.
731 732 733 734 735 736 737 738 739 740 741 742 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 731 def import_instance(project, instance, import_instances_request_object = 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::SqladminV1beta4::ImportInstancesRequest::Representation command.request_object = import_instances_request_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a new backup run on demand. This method is applicable only to Second Generation instances.
147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 147 def insert_backup_run(project, instance, backup_run_object = 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::SqladminV1beta4::BackupRun::Representation command.request_object = backup_run_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Inserts a resource containing information about a database inside a Cloud SQL instance.
298 299 300 301 302 303 304 305 306 307 308 309 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 298 def insert_database(project, instance, database_object = 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::SqladminV1beta4::Database::Representation command.request_object = database_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a new Cloud SQL instance.
766 767 768 769 770 771 772 773 774 775 776 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 766 def insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances', ) command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation command.request_object = database_instance_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::InsertSslCertsResponse
Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.
1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1537 def insert_ssl_cert(project, instance, insert_ssl_certs_request_object = 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::SqladminV1beta4::InsertSslCertsRequest::Representation command.request_object = insert_ssl_certs_request_object command.response_representation = Google::Apis::SqladminV1beta4::InsertSslCertsResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::InsertSslCertsResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a new user in a Cloud SQL instance.
1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1676 def insert_user(project, instance, user_object = 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::SqladminV1beta4::User::Representation command.request_object = user_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListBackupRunsResponse
Lists all backup runs associated with a given instance and configuration in the reverse chronological order of the backup initiation time.
188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 188 def list_backup_runs(project, instance, max_results: nil, page_token: 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::SqladminV1beta4::ListBackupRunsResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListBackupRunsResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_databases(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListDatabasesResponse
Lists databases in the specified Cloud SQL instance.
333 334 335 336 337 338 339 340 341 342 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 333 def list_databases(project, instance, 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::SqladminV1beta4::ListDatabasesResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListDatabasesResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListFlagsResponse
List all available database flags for Cloud SQL instances.
445 446 447 448 449 450 451 452 453 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 445 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::SqladminV1beta4::ListFlagsResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse command.query['databaseVersion'] = database_version unless database_version.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_instance_server_cas(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::InstancesListServerCasResponse
Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.
850 851 852 853 854 855 856 857 858 859 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 850 def list_instance_server_cas(project, instance, 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::SqladminV1beta4::InstancesListServerCasResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::InstancesListServerCasResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListInstancesResponse
Lists instances under a given project.
811 812 813 814 815 816 817 818 819 820 821 822 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 811 def list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances', ) command.response_representation = Google::Apis::SqladminV1beta4::ListInstancesResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListInstancesResponse command.params['project'] = project unless project.nil? command.query['filter'] = filter unless filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_operations(project, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListOperationsResponse
Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.
1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1272 def list_operations(project, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations', ) command.response_representation = Google::Apis::SqladminV1beta4::ListOperationsResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListOperationsResponse command.params['project'] = project unless project.nil? command.query['instance'] = instance unless instance.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_ssl_certs(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListSslCertsResponse
Lists all of the current SSL certificates for the instance.
1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1572 def list_ssl_certs(project, instance, 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::SqladminV1beta4::ListSslCertsResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListSslCertsResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_tiers(project, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListTiersResponse
Lists all available machine types (tiers) for Cloud SQL, for example, db-n1- standard-1. For related information, see Pricing.
1604 1605 1606 1607 1608 1609 1610 1611 1612 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1604 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::SqladminV1beta4::ListTiersResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListTiersResponse command.params['project'] = project unless project.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_users(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListUsersResponse
Lists users in the specified Cloud SQL instance.
1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1711 def list_users(project, instance, 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::SqladminV1beta4::ListUsersResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListUsersResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.
370 371 372 373 374 375 376 377 378 379 380 381 382 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 370 def patch_database(project, instance, database, database_object = 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::SqladminV1beta4::Database::Representation command.request_object = database_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates settings of a Cloud SQL instance. This method supports patch semantics.
884 885 886 887 888 889 890 891 892 893 894 895 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 884 def patch_instance(project, instance, database_instance_object = 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::SqladminV1beta4::DatabaseInstance::Representation command.request_object = database_instance_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#promote_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.
920 921 922 923 924 925 926 927 928 929 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 920 def promote_instance_replica(project, instance, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Reschedules the maintenance on the given instance.
1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1308 def reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = 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::SqladminV1beta4::SqlInstancesRescheduleMaintenanceRequestBody::Representation command.request_object = sql_instances_reschedule_maintenance_request_body_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes all client certificates and generates a new server SSL certificate for the instance.
954 955 956 957 958 959 960 961 962 963 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 954 def reset_instance_ssl_config(project, instance, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#restart_instance(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Restarts a Cloud SQL instance.
987 988 989 990 991 992 993 994 995 996 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 987 def restart_instance(project, instance, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1022 def restore_instance_backup(project, instance, restore_instances_backup_request_object = 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::SqladminV1beta4::RestoreInstancesBackupRequest::Representation command.request_object = restore_instances_backup_request_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.
1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1059 def rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = 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::SqladminV1beta4::InstancesRotateServerCaRequest::Representation command.request_object = instances_rotate_server_ca_request_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#start_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Starts the replication in the read replica instance.
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1094 def start_instance_replica(project, instance, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#start_project_instance_external_sync(project, instance, skip_verification: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Start External primary instance migration.
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1347 def start_project_instance_external_sync(project, instance, skip_verification: 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['skipVerification'] = skip_verification unless skip_verification.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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Stops the replication in the read replica instance.
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1127 def stop_instance_replica(project, instance, 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::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Truncate MySQL general and slow query log tables
1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1161 def truncate_instance_log(project, instance, instances_truncate_log_request_object = 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::SqladminV1beta4::InstancesTruncateLogRequest::Representation command.request_object = instances_truncate_log_request_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates a resource containing information about a database inside a Cloud SQL instance.
410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 410 def update_database(project, instance, database, database_object = 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::SqladminV1beta4::Database::Representation command.request_object = database_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.params['database'] = database unless database.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.
1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1198 def update_instance(project, instance, database_instance_object = 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::SqladminV1beta4::DatabaseInstance::Representation command.request_object = database_instance_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_user(project, instance, user_object = nil, host: nil, name: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates an existing user in a Cloud SQL instance.
1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1749 def update_user(project, instance, user_object = nil, host: nil, 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::SqladminV1beta4::User::Representation command.request_object = user_object command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation command.response_class = Google::Apis::SqladminV1beta4::Operation command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.nil? command.query['host'] = host unless host.nil? command.query['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#verify_project_instance_external_sync_settings(project, instance, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
Verify External primary instance external sync settings.
1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1386 def verify_project_instance_external_sync_settings(project, instance, 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::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse command.params['project'] = project unless project.nil? command.params['instance'] = instance unless instance.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 |