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, 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, 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, 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, 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, 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, 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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::InstancesListResponse
Lists instances under a given project in the alphabetical order of the instance name.
-
#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, 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, 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.
-
#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.
-
#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, 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, 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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Updates an existing user in a Cloud SQL instance.
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.
513 514 515 516 517 518 519 520 521 522 523 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 513 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.
552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 552 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.
1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1418 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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Deletes the backup taken by a backup run.
76 77 78 79 80 81 82 83 84 85 86 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 76 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::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['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::SqlV1beta4::Operation
Deletes a database from a Cloud SQL instance.
240 241 242 243 244 245 246 247 248 249 250 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 240 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::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['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::SqlV1beta4::Operation
Deletes a Cloud SQL instance.
588 589 590 591 592 593 594 595 596 597 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 588 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::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['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::SqlV1beta4::Operation
Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.
1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1457 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::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['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::SqlV1beta4::Operation
Deletes a user from a Cloud SQL instance.
1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1649 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::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['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.
626 627 628 629 630 631 632 633 634 635 636 637 638 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 626 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.
667 668 669 670 671 672 673 674 675 676 677 678 679 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 667 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.
708 709 710 711 712 713 714 715 716 717 718 719 720 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 708 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.
117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 117 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.
282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 282 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.
747 748 749 750 751 752 753 754 755 756 757 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 747 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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::Operation
Retrieves an instance operation that has been performed on an instance.
1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1331 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::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['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.
1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1499 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.
786 787 788 789 790 791 792 793 794 795 796 797 798 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 786 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.
157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 157 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.
322 323 324 325 326 327 328 329 330 331 332 333 334 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 322 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.
825 826 827 828 829 830 831 832 833 834 835 836 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 825 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.
1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1540 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.
1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1688 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.
202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 202 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.
361 362 363 364 365 366 367 368 369 370 371 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 361 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.
474 475 476 477 478 479 480 481 482 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 474 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.
909 910 911 912 913 914 915 916 917 918 919 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 909 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, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqlV1beta4::InstancesListResponse
Lists instances under a given project in the alphabetical order of the instance name.
867 868 869 870 871 872 873 874 875 876 877 878 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 867 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::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['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.
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1375 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.
1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1579 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.
1613 1614 1615 1616 1617 1618 1619 1620 1621 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1613 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.
1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1727 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, 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.
399 400 401 402 403 404 405 406 407 408 409 410 411 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 399 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::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['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::SqlV1beta4::Operation
Updates settings of a Cloud SQL instance. This method supports patch semantics.
945 946 947 948 949 950 951 952 953 954 955 956 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 945 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::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['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.
983 984 985 986 987 988 989 990 991 992 993 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 983 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 |
#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.
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1021 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.
1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1058 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.
1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1097 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.
1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1138 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.
1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1178 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 |
#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.
1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1216 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
1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1254 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, 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.
439 440 441 442 443 444 445 446 447 448 449 450 451 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 439 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::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['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::SqlV1beta4::Operation
Updates settings of a Cloud SQL instance.
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1296 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::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['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::SqlV1beta4::Operation
Updates an existing user in a Cloud SQL instance.
1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 |
# File 'generated/google/apis/sql_v1beta4/service.rb', line 1767 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::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['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |