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 Administration API
Creates and configures Cloud SQL instances, which provide fully-managed MySQL databases.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes the SSL certificate.
-
#delete_user(project, instance, host, name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a user from a Cloud SQL instance.
-
#export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
-
#failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
-
#initialize ⇒ SQLAdminService
constructor
A new instance of SQLAdminService.
-
#insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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, user_ip: 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 enqueued time.
-
#list_databases(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListDatabasesResponse
Lists databases in the specified Cloud SQL instance.
-
#list_flags(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListFlagsResponse
List all available database flags for Google Cloud SQL instances.
-
#list_instances(project, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListInstancesResponse
Lists instances under a given project in the alphabetical order of the instance name.
-
#list_operations(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListTiersResponse
Lists all available service tiers for Google Cloud SQL, for example D1, D2.
-
#list_users(project, instance, fields: nil, quota_user: nil, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Promotes the read replica instance to be a stand-alone Cloud SQL instance.
-
#reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, user_ip: 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, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Restores a backup of a Cloud SQL instance.
-
#start_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Starts the replication in the read replica instance.
-
#stop_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Stops the replication in the read replica instance.
-
#update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: 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, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates settings of a Cloud SQL instance.
-
#update_user(project, instance, host, name, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates an existing user in a Cloud SQL instance.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Constructor Details
#initialize ⇒ SQLAdminService
Returns a new instance of SQLAdminService.
52 53 54 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 52 def initialize super('https://www.googleapis.com/', 'sql/v1beta4/') 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.
39 40 41 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 39 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. Overrides userIp if both are provided.
45 46 47 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
50 51 52 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 50 def user_ip @user_ip end |
Instance Method Details
#clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a Cloud SQL instance as a clone of the source instance. The API is not ready for Second Generation instances yet.
541 542 543 544 545 546 547 548 549 550 551 552 553 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 541 def clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.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, user_ip: 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.
1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1271 def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes the backup taken by a backup run.
85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 85 def delete_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a database from a Cloud SQL instance.
255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 255 def delete_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a Cloud SQL instance.
581 582 583 584 585 586 587 588 589 590 591 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 581 def delete_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'projects/{project}/instances/{instance}', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes the SSL certificate. The change will not take effect until the instance is restarted.
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1314 def delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_user(project, instance, host, name, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes a user from a Cloud SQL instance.
1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1518 def delete_user(project, instance, host, name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as a MySQL dump file.
621 622 623 624 625 626 627 628 629 630 631 632 633 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 621 def export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Failover the instance to its failover replica instance.
662 663 664 665 666 667 668 669 670 671 672 673 674 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 662 def failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::BackupRun
Retrieves a resource containing information about a backup run.
126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 126 def get_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Database
Retrieves a resource containing information about a database inside a Cloud SQL instance.
297 298 299 300 301 302 303 304 305 306 307 308 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 297 def get_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::DatabaseInstance
Retrieves a resource containing information about a Cloud SQL instance.
702 703 704 705 706 707 708 709 710 711 712 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 702 def get_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{project}/instances/{instance}', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Retrieves an instance operation that has been performed on an instance.
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1184 def get_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::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.
1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1357 def get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Imports data into a Cloud SQL instance from a MySQL dump file in Google Cloud Storage.
742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 742 def import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, user_ip: 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.
167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 167 def insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Inserts a resource containing information about a database inside a Cloud SQL instance.
338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 338 def insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a new Cloud SQL instance.
782 783 784 785 786 787 788 789 790 791 792 793 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 782 def insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{project}/instances', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, user_ip: 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.
1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1400 def insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Creates a new user in a Cloud SQL instance.
1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1559 def insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: 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 enqueued time.
213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 213 def list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{project}/instances/{instance}/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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_databases(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListDatabasesResponse
Lists databases in the specified Cloud SQL instance.
378 379 380 381 382 383 384 385 386 387 388 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 378 def list_databases(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_flags(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListFlagsResponse
List all available database flags for Google Cloud SQL instances.
502 503 504 505 506 507 508 509 510 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 502 def list_flags(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'flags', ) command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_instances(project, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListInstancesResponse
Lists instances under a given project in the alphabetical order of the instance name.
825 826 827 828 829 830 831 832 833 834 835 836 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 825 def list_instances(project, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{project}/instances', ) command.response_representation = Google::Apis::SqladminV1beta4::ListInstancesResponse::Representation command.response_class = Google::Apis::SqladminV1beta4::ListInstancesResponse command.params['project'] = project unless project.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_operations(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::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.
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1228 def list_operations(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{project}/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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListSslCertsResponse
Lists all of the current SSL certificates for the instance.
1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1440 def list_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{project}/instances/{instance}/sslCerts', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_tiers(project, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListTiersResponse
Lists all available service tiers for Google Cloud SQL, for example D1, D2. For related information, see Pricing.
1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1477 def list_tiers(project, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_users(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::ListUsersResponse
Lists users in the specified Cloud SQL instance.
1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1599 def list_users(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.
420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 420 def patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.. This method supports patch semantics.
867 868 869 870 871 872 873 874 875 876 877 878 879 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 867 def patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'projects/{project}/instances/{instance}', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#promote_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Promotes the read replica instance to be a stand-alone Cloud SQL instance.
907 908 909 910 911 912 913 914 915 916 917 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 907 def promote_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{project}/instances/{instance}/promoteReplica', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Deletes all client certificates and generates a new server SSL certificate for the instance. The changes will not take effect until the instance is restarted. Existing instances without a server certificate will need to call this once to set a server certificate.
948 949 950 951 952 953 954 955 956 957 958 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 948 def reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{project}/instances/{instance}/resetSslConfig', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#restart_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Restarts a Cloud SQL instance.
986 987 988 989 990 991 992 993 994 995 996 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 986 def restart_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{project}/instances/{instance}/restart', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Restores a backup of a Cloud SQL instance.
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1025 def restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#start_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Starts the replication in the read replica instance.
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1065 def start_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#stop_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Stops the replication in the read replica instance.
1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1103 def stop_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates a resource containing information about a database inside a Cloud SQL instance.
465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 465 def update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates settings of a Cloud SQL instance. Caution: This is not a partial update, so you must include values for all the settings that you want to retain. For partial updates, use patch.
1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1144 def update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'projects/{project}/instances/{instance}', ) 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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_user(project, instance, host, name, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::SqladminV1beta4::Operation
Updates an existing user in a Cloud SQL instance.
1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 |
# File 'generated/google/apis/sqladmin_v1beta4/service.rb', line 1642 def update_user(project, instance, host, name, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, '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? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |