2019-10-15 00:37:33 +00:00
|
|
|
# Copyright 2015 Google Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
require 'google/apis/core/base_service'
|
|
|
|
require 'google/apis/core/json_representation'
|
|
|
|
require 'google/apis/core/hashable'
|
|
|
|
require 'google/apis/errors'
|
|
|
|
|
|
|
|
module Google
|
|
|
|
module Apis
|
2020-09-18 00:39:13 +00:00
|
|
|
module SqladminV1beta4
|
2019-10-15 00:37:33 +00:00
|
|
|
# Cloud SQL Admin API
|
|
|
|
#
|
|
|
|
# API for Cloud SQL database instance management
|
|
|
|
#
|
|
|
|
# @example
|
2020-09-18 00:39:13 +00:00
|
|
|
# require 'google/apis/sqladmin_v1beta4'
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# Sqladmin = Google::Apis::SqladminV1beta4 # Alias the module
|
|
|
|
# service = Sqladmin::SQLAdminService.new
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @see https://developers.google.com/cloud-sql/
|
|
|
|
class SQLAdminService < Google::Apis::Core::BaseService
|
|
|
|
# @return [String]
|
|
|
|
# API key. Your API key identifies your project and provides you with API access,
|
|
|
|
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
|
|
|
attr_accessor :key
|
|
|
|
|
|
|
|
# @return [String]
|
|
|
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
|
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
|
|
attr_accessor :quota_user
|
|
|
|
|
|
|
|
def initialize
|
2020-08-07 00:38:13 +00:00
|
|
|
super('https://sqladmin.googleapis.com/', '')
|
|
|
|
@batch_path = 'batch'
|
2019-10-15 00:37:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Deletes the backup taken by a backup run.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [Fixnum] id
|
2020-08-14 00:38:12 +00:00
|
|
|
# The ID of the Backup Run to delete. To find a Backup Run ID, use the list
|
2019-10-15 00:37:33 +00:00
|
|
|
# method.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def delete_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Retrieves a resource containing information about a backup run.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [Fixnum] id
|
|
|
|
# The ID of this Backup Run.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::BackupRun] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::BackupRun]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def get_backup_run(project, instance, id, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::BackupRun
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Creates a new backup run on demand. This method is applicable only to Second
|
|
|
|
# Generation instances.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::BackupRun] backup_run_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = backup_run_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists all backup runs associated with a given instance and configuration in
|
|
|
|
# the reverse chronological order of the backup initiation time.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of backup runs per response.
|
|
|
|
# @param [String] page_token
|
|
|
|
# A previously-returned page token representing part of the larger set of
|
|
|
|
# results to view.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::ListBackupRunsResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::ListBackupRunsResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def list_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/backupRuns', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::ListBackupRunsResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::ListBackupRunsResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
command.params['project'] = project unless project.nil?
|
|
|
|
command.params['instance'] = instance unless instance.nil?
|
|
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
|
|
command.query['fields'] = fields unless fields.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Deletes a database from a Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
|
|
|
# @param [String] database
|
|
|
|
# Name of the database to be deleted in the instance.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def delete_database(project, instance, database, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Retrieves a resource containing information about a database inside a Cloud
|
|
|
|
# SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
|
|
|
# @param [String] database
|
|
|
|
# Name of the database in the instance.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Database] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Database]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def get_database(project, instance, database, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Database::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Database
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Inserts a resource containing information about a database inside a Cloud SQL
|
|
|
|
# instance.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::Database] database_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = database_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists databases in the specified Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::ListDatabasesResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::ListDatabasesResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def list_databases(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/databases', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::ListDatabasesResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::ListDatabasesResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Partially updates a resource containing information about a database inside a
|
|
|
|
# Cloud SQL instance. This method supports patch semantics.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
|
|
|
# @param [String] database
|
|
|
|
# Name of the database to be updated in the instance.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::Database] database_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:patch, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = database_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Updates a resource containing information about a database inside a Cloud SQL
|
|
|
|
# instance.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
|
|
|
# @param [String] database
|
|
|
|
# Name of the database to be updated in the instance.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::Database] database_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = database_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# List all available database flags for Cloud SQL instances.
|
|
|
|
# @param [String] database_version
|
|
|
|
# Database type and version you want to retrieve flags for. By default, this
|
|
|
|
# method returns flags for all database types and versions.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::ListFlagsResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::ListFlagsResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def list_flags(database_version: nil, fields: nil, quota_user: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/flags', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Add a new trusted Certificate Authority (CA) version for the specified
|
2020-08-14 00:38:12 +00:00
|
|
|
# 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.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def add_instance_server_ca(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/addServerCa', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-04-13 16:49:10 +00:00
|
|
|
# Creates a Cloud SQL instance as a clone of the source instance. Using this
|
|
|
|
# operation might cause your instance to restart.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the source as well as the clone Cloud SQL instance.
|
|
|
|
# @param [String] instance
|
2020-08-14 00:38:12 +00:00
|
|
|
# The ID of the Cloud SQL instance to be cloned (source). This does not include
|
|
|
|
# the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::CloneInstancesRequest] clone_instances_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-09-18 00:39:13 +00:00
|
|
|
def clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/clone', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
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
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Deletes a Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance to be deleted.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def delete_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Demotes the stand-alone instance to be a Cloud SQL read replica for an
|
|
|
|
# external database server.
|
|
|
|
# @param [String] project
|
|
|
|
# ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance name.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest] instances_demote_master_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = instances_demote_master_request_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump
|
|
|
|
# or CSV file.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance to be exported.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-09-18 00:39:13 +00:00
|
|
|
def export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/export', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
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
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Failover the instance to its failover replica instance. Using this operation
|
|
|
|
# might cause your instance to restart.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# ID of the project that contains the read replica.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::InstancesFailoverRequest] instances_failover_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/failover', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::InstancesFailoverRequest::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = instances_failover_request_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Retrieves a resource containing information about a Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::DatabaseInstance] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::DatabaseInstance]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def get_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::DatabaseInstance
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud
|
|
|
|
# Storage.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::ImportInstancesRequest] import_instances_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-09-18 00:39:13 +00:00
|
|
|
def import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/import', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
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
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Creates a new Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project to which the newly created Cloud SQL instances
|
|
|
|
# should belong.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = database_instance_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2019-12-24 00:37:20 +00:00
|
|
|
# Lists instances under a given project.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project for which to list Cloud SQL instances.
|
|
|
|
# @param [String] filter
|
2020-08-14 00:38:12 +00:00
|
|
|
# A filter expression that filters resources listed in the response. The
|
|
|
|
# expression is in the form of field:value. For example, 'instanceType:
|
|
|
|
# CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON
|
|
|
|
# representation, such as 'settings.userLabels.auto_start:true'. Multiple filter
|
|
|
|
# queries are space-separated. For example. 'state:RUNNABLE instanceType:
|
|
|
|
# CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However,
|
|
|
|
# you can include AND and OR expressions explicitly.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# The maximum number of results to return per response.
|
|
|
|
# @param [String] page_token
|
|
|
|
# A previously-returned page token representing part of the larger set of
|
|
|
|
# results to view.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::ListInstancesResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::ListInstancesResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::ListInstancesResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::ListInstancesResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# 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
|
2020-08-14 00:38:12 +00:00
|
|
|
# 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.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::InstancesListServerCasResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::InstancesListServerCasResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def list_instance_server_cas(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/listServerCas', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::InstancesListServerCasResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::InstancesListServerCasResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Updates settings of a Cloud SQL instance. This method supports patch semantics.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:patch, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = database_instance_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Promotes the read replica instance to be a stand-alone Cloud SQL instance.
|
2020-04-13 16:49:10 +00:00
|
|
|
# Using this operation might cause your instance to restart.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# ID of the project that contains the read replica.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL read replica instance name.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def promote_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Deletes all client certificates and generates a new server SSL certificate for
|
|
|
|
# the instance.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Restarts a Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance to be restarted.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def restart_instance(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restart', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-04-13 16:49:10 +00:00
|
|
|
# Restores a backup of a Cloud SQL instance. Using this operation might cause
|
|
|
|
# your instance to restart.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest] restore_instances_backup_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-09-18 00:39:13 +00:00
|
|
|
def restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
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
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Rotates the server certificate to one signed by the Certificate Authority (CA)
|
|
|
|
# version previously added with the addServerCA method.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::InstancesRotateServerCaRequest] instances_rotate_server_ca_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::InstancesRotateServerCaRequest::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = instances_rotate_server_ca_request_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Starts the replication in the read replica instance.
|
|
|
|
# @param [String] project
|
|
|
|
# ID of the project that contains the read replica.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL read replica instance name.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def start_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/startReplica', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Stops the replication in the read replica instance.
|
|
|
|
# @param [String] project
|
|
|
|
# ID of the project that contains the read replica.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL read replica instance name.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def stop_instance_replica(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/stopReplica', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.params['project'] = project unless project.nil?
|
|
|
|
command.params['instance'] = instance unless instance.nil?
|
|
|
|
command.query['fields'] = fields unless fields.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
|
|
|
# Truncate MySQL general and slow query log tables
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the Cloud SQL project.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest] instances_truncate_log_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/truncateLog', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = instances_truncate_log_request_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-04-13 16:49:10 +00:00
|
|
|
# Updates settings of a Cloud SQL instance. Using this operation might cause
|
|
|
|
# your instance to restart.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = database_instance_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Retrieves an instance operation that has been performed on an instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] operation
|
|
|
|
# Instance operation ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def get_operation(project, operation, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations/{operation}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Lists all instance operations that have been performed on the given Cloud SQL
|
|
|
|
# instance in the reverse chronological order of the start time.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [Fixnum] max_results
|
|
|
|
# Maximum number of operations per response.
|
|
|
|
# @param [String] page_token
|
|
|
|
# A previously-returned page token representing part of the larger set of
|
|
|
|
# results to view.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::ListOperationsResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::ListOperationsResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def list_operations(project, instance: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/operations', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::ListOperationsResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::ListOperationsResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
command.params['project'] = project unless project.nil?
|
|
|
|
command.query['instance'] = instance unless instance.nil?
|
|
|
|
command.query['maxResults'] = max_results unless max_results.nil?
|
|
|
|
command.query['pageToken'] = page_token unless page_token.nil?
|
|
|
|
command.query['fields'] = fields unless fields.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2019-12-17 00:37:11 +00:00
|
|
|
# Reschedules the maintenance on the given instance.
|
|
|
|
# @param [String] project
|
|
|
|
# ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::SqlInstancesRescheduleMaintenanceRequestBody] sql_instances_reschedule_maintenance_request_body_object
|
2019-12-17 00:37:11 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-12-17 00:37:11 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-12-17 00:37:11 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def reschedule_project_instance_maintenance(project, instance, sql_instances_reschedule_maintenance_request_body_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-12-17 00:37:11 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::SqlInstancesRescheduleMaintenanceRequestBody::Representation
|
2019-12-17 00:37:11 +00:00
|
|
|
command.request_object = sql_instances_reschedule_maintenance_request_body_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-12-17 00:37:11 +00:00
|
|
|
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
|
|
|
|
|
2020-09-18 00:39:13 +00:00
|
|
|
# Start External primary instance migration.
|
2020-02-11 00:37:43 +00:00
|
|
|
# @param [String] project
|
2020-08-07 00:38:13 +00:00
|
|
|
# ID of the project that contains the instance.
|
2020-02-11 00:37:43 +00:00
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
feat: Automated regeneration of sqladmin v1beta4 client (#1790)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-12-16 03:21:22,617 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-sqladmin-v1beta4
nothing to commit, working tree clean
2020-12-16 03:21:22,646 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sqladmin v1beta4
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sqladmin v1beta4
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.4.0
Installing json 2.4.0 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.52.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.1
Installing parallel 1.20.1
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.1
Installing redcarpet 3.5.1 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=sqladmin.v1beta4 --names-out=/workspace/api_names_out.yaml
Loading sqladmin, version v1beta4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sqladmin.v1beta4.json
conflict google/apis/sqladmin_v1beta4.rb
<qladmin_v1beta4.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/sqladmin_v1beta4.rb
conflict google/apis/sqladmin_v1beta4/service.rb
force google/apis/sqladmin_v1beta4/service.rb
conflict google/apis/sqladmin_v1beta4/classes.rb
force google/apis/sqladmin_v1beta4/classes.rb
identical google/apis/sqladmin_v1beta4/representations.rb
conflict /workspace/api_names_out.yaml
force /workspace/api_names_out.yaml
2020-12-16 03:21:48,060 synthtool [DEBUG] > Wrote metadata to generated/google/apis/sqladmin_v1beta4/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/sqladmin_v1beta4/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/8c2a23fc-c90e-4796-819a-bcc7e98db1cb/targets
- [ ] To automatically regenerate this PR, check this box.
2020-12-16 11:34:04 +00:00
|
|
|
# @param [Boolean] skip_verification
|
|
|
|
# Whether to skip the verification step (VESS).
|
2020-02-11 00:37:43 +00:00
|
|
|
# @param [String] sync_mode
|
feat: Automated regeneration of sqladmin v1beta4 client (#1638)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-12-04 03:07:45,310 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-sqladmin-v1beta4
nothing to commit, working tree clean
2020-12-04 03:07:45,335 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sqladmin v1beta4
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sqladmin v1beta4
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.3.1
Installing json 2.3.1 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.50.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.1
Installing parallel 1.20.1
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.0
Installing redcarpet 3.5.0 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=sqladmin.v1beta4 --names-out=/workspace/api_names_out.yaml
Loading sqladmin, version v1beta4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sqladmin.v1beta4.json
conflict google/apis/sqladmin_v1beta4.rb
<qladmin_v1beta4.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/sqladmin_v1beta4.rb
conflict google/apis/sqladmin_v1beta4/service.rb
force google/apis/sqladmin_v1beta4/service.rb
conflict google/apis/sqladmin_v1beta4/classes.rb
force google/apis/sqladmin_v1beta4/classes.rb
conflict google/apis/sqladmin_v1beta4/representations.rb
force google/apis/sqladmin_v1beta4/representations.rb
conflict /workspace/api_names_out.yaml
force /workspace/api_names_out.yaml
2020-12-04 03:08:08,018 synthtool [DEBUG] > Wrote metadata to generated/google/apis/sqladmin_v1beta4/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/sqladmin_v1beta4/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/2a4cd988-c01c-4f7a-8bf0-14d965cc9746/targets
- [ ] To automatically regenerate this PR, check this box.
2020-12-04 11:20:03 +00:00
|
|
|
# External sync mode.
|
2020-02-11 00:37:43 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2020-02-11 00:37:43 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2020-02-11 00:37:43 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
feat: Automated regeneration of sqladmin v1beta4 client (#1790)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-12-16 03:21:22,617 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-sqladmin-v1beta4
nothing to commit, working tree clean
2020-12-16 03:21:22,646 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sqladmin v1beta4
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sqladmin v1beta4
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.4.0
Installing json 2.4.0 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.52.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.1
Installing parallel 1.20.1
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.1
Installing redcarpet 3.5.1 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=sqladmin.v1beta4 --names-out=/workspace/api_names_out.yaml
Loading sqladmin, version v1beta4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sqladmin.v1beta4.json
conflict google/apis/sqladmin_v1beta4.rb
<qladmin_v1beta4.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/sqladmin_v1beta4.rb
conflict google/apis/sqladmin_v1beta4/service.rb
force google/apis/sqladmin_v1beta4/service.rb
conflict google/apis/sqladmin_v1beta4/classes.rb
force google/apis/sqladmin_v1beta4/classes.rb
identical google/apis/sqladmin_v1beta4/representations.rb
conflict /workspace/api_names_out.yaml
force /workspace/api_names_out.yaml
2020-12-16 03:21:48,060 synthtool [DEBUG] > Wrote metadata to generated/google/apis/sqladmin_v1beta4/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/sqladmin_v1beta4/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/8c2a23fc-c90e-4796-819a-bcc7e98db1cb/targets
- [ ] To automatically regenerate this PR, check this box.
2020-12-16 11:34:04 +00:00
|
|
|
def start_project_instance_external_sync(project, instance, skip_verification: nil, sync_mode: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2020-02-11 00:37:43 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2020-02-11 00:37:43 +00:00
|
|
|
command.params['project'] = project unless project.nil?
|
|
|
|
command.params['instance'] = instance unless instance.nil?
|
feat: Automated regeneration of sqladmin v1beta4 client (#1790)
This PR was generated using Autosynth. :rainbow:
<details><summary>Log from Synthtool</summary>
```
2020-12-16 03:21:22,617 synthtool [DEBUG] > Executing /home/kbuilder/.cache/synthtool/google-api-ruby-client/synth.py.
On branch autosynth-sqladmin-v1beta4
nothing to commit, working tree clean
2020-12-16 03:21:22,646 synthtool [DEBUG] > Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sqladmin v1beta4
DEBUG:synthtool:Running: docker run --rm -v/home/kbuilder/.cache/synthtool/google-api-ruby-client:/workspace -v/var/run/docker.sock:/var/run/docker.sock -w /workspace --entrypoint script/synth.rb gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/autosynth sqladmin v1beta4
bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
The dependency jruby-openssl (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for java. To add those platforms to the bundle, run `bundle lock --add-platform java`.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Fetching rake 11.3.0
Installing rake 11.3.0
Fetching concurrent-ruby 1.1.7
Installing concurrent-ruby 1.1.7
Fetching i18n 1.8.5
Installing i18n 1.8.5
Fetching minitest 5.14.2
Installing minitest 5.14.2
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.8
Installing tzinfo 1.2.8
Fetching activesupport 5.0.7.2
Installing activesupport 5.0.7.2
Fetching public_suffix 4.0.6
Installing public_suffix 4.0.6
Fetching addressable 2.7.0
Installing addressable 2.7.0
Fetching ast 2.4.1
Installing ast 2.4.1
Using bundler 2.1.4
Fetching byebug 11.1.3
Installing byebug 11.1.3 with native extensions
Fetching coderay 1.1.3
Installing coderay 1.1.3
Fetching json 2.4.0
Installing json 2.4.0 with native extensions
Fetching docile 1.3.2
Installing docile 1.3.2
Fetching simplecov-html 0.10.2
Installing simplecov-html 0.10.2
Fetching simplecov 0.16.1
Installing simplecov 0.16.1
Using sync 0.5.0
Fetching tins 1.26.0
Installing tins 1.26.0
Fetching term-ansicolor 1.7.1
Installing term-ansicolor 1.7.1
Fetching thor 0.20.3
Installing thor 0.20.3
Fetching coveralls 0.8.23
Installing coveralls 0.8.23
Fetching crack 0.4.4
Installing crack 0.4.4
Fetching declarative 0.0.20
Installing declarative 0.0.20
Fetching declarative-option 0.1.0
Installing declarative-option 0.1.0
Fetching diff-lcs 1.4.4
Installing diff-lcs 1.4.4
Fetching dotenv 2.7.6
Installing dotenv 2.7.6
Fetching fakefs 0.20.1
Installing fakefs 0.20.1
Fetching multipart-post 2.1.1
Installing multipart-post 2.1.1
Fetching ruby2_keywords 0.0.2
Installing ruby2_keywords 0.0.2
Fetching faraday 1.1.0
Installing faraday 1.1.0
Fetching gems 1.2.0
Installing gems 1.2.0
Fetching github-markup 1.7.0
Installing github-markup 1.7.0
Fetching jwt 2.2.2
Installing jwt 2.2.2
Fetching memoist 0.16.2
Installing memoist 0.16.2
Fetching multi_json 1.15.0
Installing multi_json 1.15.0
Fetching os 0.9.6
Installing os 0.9.6
Fetching signet 0.14.0
Installing signet 0.14.0
Fetching googleauth 0.14.0
Installing googleauth 0.14.0
Fetching httpclient 2.8.3
Installing httpclient 2.8.3
Fetching mini_mime 1.0.2
Installing mini_mime 1.0.2
Fetching uber 0.1.0
Installing uber 0.1.0
Fetching representable 3.0.4
Installing representable 3.0.4
Fetching retriable 3.1.2
Installing retriable 3.1.2
Fetching rexml 3.2.4
Installing rexml 3.2.4
Using google-api-client 0.52.0 from source at `.`
Fetching google-id-token 1.4.2
Installing google-id-token 1.4.2
Fetching hashdiff 1.0.1
Installing hashdiff 1.0.1
Fetching mime-types-data 3.2020.1104
Installing mime-types-data 3.2020.1104
Fetching mime-types 3.3.1
Installing mime-types 3.3.1
Fetching multi_xml 0.6.0
Installing multi_xml 0.6.0
Fetching httparty 0.18.1
Installing httparty 0.18.1
Fetching rspec-support 3.10.0
Installing rspec-support 3.10.0
Fetching rspec-core 3.10.0
Installing rspec-core 3.10.0
Fetching rspec-expectations 3.10.0
Installing rspec-expectations 3.10.0
Fetching rspec-mocks 3.10.0
Installing rspec-mocks 3.10.0
Fetching rspec 3.10.0
Installing rspec 3.10.0
Fetching json_spec 1.1.5
Installing json_spec 1.1.5
Fetching launchy 2.5.0
Installing launchy 2.5.0
Fetching little-plugger 1.1.4
Installing little-plugger 1.1.4
Fetching logging 2.3.0
Installing logging 2.3.0
Fetching method_source 1.0.0
Installing method_source 1.0.0
Fetching opencensus 0.5.0
Installing opencensus 0.5.0
Fetching parallel 1.20.1
Installing parallel 1.20.1
Fetching parser 2.7.2.0
Installing parser 2.7.2.0
Fetching powerpack 0.1.3
Installing powerpack 0.1.3
Fetching pry 0.13.1
Installing pry 0.13.1
Fetching pry-byebug 3.9.0
Installing pry-byebug 3.9.0
Fetching yard 0.9.25
Installing yard 0.9.25
Fetching pry-doc 0.13.5
Installing pry-doc 0.13.5
Fetching rainbow 2.2.2
Installing rainbow 2.2.2 with native extensions
Fetching redcarpet 3.5.1
Installing redcarpet 3.5.1 with native extensions
Fetching redis 3.3.5
Installing redis 3.3.5
Fetching rmail 1.1.4
Installing rmail 1.1.4
Fetching ruby-progressbar 1.10.1
Installing ruby-progressbar 1.10.1
Fetching unicode-display_width 1.7.0
Installing unicode-display_width 1.7.0
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Fetching webmock 2.3.2
Installing webmock 2.3.2
Bundle complete! 31 Gemfile dependencies, 78 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from i18n:
HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.
If you are upgrading your Rails application from an older version of Rails:
Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.
If you are starting a NEW Rails application, you can ignore this notice.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
Post-install message from httparty:
When you HTTParty, you must party hard!
echo a | bundle exec bin/generate-api gen generated --api=sqladmin.v1beta4 --names-out=/workspace/api_names_out.yaml
Loading sqladmin, version v1beta4 from https://raw.githubusercontent.com/googleapis/discovery-artifact-manager/master/discoveries/sqladmin.v1beta4.json
conflict google/apis/sqladmin_v1beta4.rb
<qladmin_v1beta4.rb? (enter "h" for help) [Ynaqdhm] a
force google/apis/sqladmin_v1beta4.rb
conflict google/apis/sqladmin_v1beta4/service.rb
force google/apis/sqladmin_v1beta4/service.rb
conflict google/apis/sqladmin_v1beta4/classes.rb
force google/apis/sqladmin_v1beta4/classes.rb
identical google/apis/sqladmin_v1beta4/representations.rb
conflict /workspace/api_names_out.yaml
force /workspace/api_names_out.yaml
2020-12-16 03:21:48,060 synthtool [DEBUG] > Wrote metadata to generated/google/apis/sqladmin_v1beta4/synth.metadata.
DEBUG:synthtool:Wrote metadata to generated/google/apis/sqladmin_v1beta4/synth.metadata.
```
</details>
Full log will be available here:
https://source.cloud.google.com/results/invocations/8c2a23fc-c90e-4796-819a-bcc7e98db1cb/targets
- [ ] To automatically regenerate this PR, check this box.
2020-12-16 11:34:04 +00:00
|
|
|
command.query['skipVerification'] = skip_verification unless skip_verification.nil?
|
2020-02-11 00:37:43 +00:00
|
|
|
command.query['syncMode'] = sync_mode unless sync_mode.nil?
|
|
|
|
command.query['fields'] = fields unless fields.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2020-09-18 00:39:13 +00:00
|
|
|
# Verify External primary instance external sync settings.
|
2020-02-11 00:37:43 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] sync_mode
|
|
|
|
# External sync mode
|
|
|
|
# @param [Boolean] verify_connection_only
|
|
|
|
# Flag to enable verifying connection only
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse] parsed result object
|
2020-02-11 00:37:43 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse]
|
2020-02-11 00:37:43 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def verify_project_instance_external_sync_settings(project, instance, sync_mode: nil, verify_connection_only: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2020-02-11 00:37:43 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::SqlInstancesVerifyExternalSyncSettingsResponse
|
2020-02-11 00:37:43 +00:00
|
|
|
command.params['project'] = project unless project.nil?
|
|
|
|
command.params['instance'] = instance unless instance.nil?
|
|
|
|
command.query['syncMode'] = sync_mode unless sync_mode.nil?
|
|
|
|
command.query['verifyConnectionOnly'] = verify_connection_only unless verify_connection_only.nil?
|
|
|
|
command.query['fields'] = fields unless fields.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
execute_or_queue_command(command, &block)
|
|
|
|
end
|
|
|
|
|
2019-10-15 00:37:33 +00:00
|
|
|
# Generates a short-lived X509 certificate containing the provided public key
|
2020-08-14 00:38:12 +00:00
|
|
|
# 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.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the Cloud SQL project.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest] ssl_certs_create_ephemeral_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::SslCert] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::SslCert]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = ssl_certs_create_ephemeral_request_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::SslCert
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Deletes the SSL certificate. For First Generation instances, the certificate
|
|
|
|
# remains valid until the instance is restarted.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] sha1_fingerprint
|
|
|
|
# Sha1 FingerPrint.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Retrieves a particular SSL certificate. Does not include the private key (
|
|
|
|
# required for usage). The private key must be saved from the response to
|
2019-10-15 00:37:33 +00:00
|
|
|
# initial creation.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] sha1_fingerprint
|
|
|
|
# Sha1 FingerPrint.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::SslCert] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::SslCert]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::SslCert
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Creates an SSL certificate and returns it along with the private key and
|
2020-08-14 00:38:12 +00:00
|
|
|
# server certificate authority. The new certificate will not be usable until the
|
|
|
|
# instance is restarted.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::InsertSslCertsRequest] insert_ssl_certs_request_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::InsertSslCertsResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::InsertSslCertsResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-09-18 00:39:13 +00:00
|
|
|
def insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
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
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists all of the current SSL certificates for the instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Cloud SQL instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::ListSslCertsResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::ListSslCertsResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def list_ssl_certs(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/sslCerts', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::ListSslCertsResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::ListSslCertsResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
2020-08-14 00:38:12 +00:00
|
|
|
# Lists all available machine types (tiers) for Cloud SQL, for example, db-n1-
|
|
|
|
# standard-1. For related information, see Pricing.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project for which to list tiers.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::ListTiersResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::ListTiersResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
|
|
def list_tiers(project, fields: nil, quota_user: nil, options: nil, &block)
|
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/tiers', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::ListTiersResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::ListTiersResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Deletes a user from a Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
|
|
|
# @param [String] host
|
|
|
|
# Host of the user in the instance.
|
|
|
|
# @param [String] name
|
|
|
|
# Name of the user in the instance.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def delete_user(project, instance, host: nil, name: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:delete, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Creates a new user in a Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::User] user_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:post, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::User::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = user_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Lists users in the specified Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::ListUsersResponse] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::ListUsersResponse]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def list_users(project, instance, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:get, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::ListUsersResponse::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::ListUsersResponse
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
# Updates an existing user in a Cloud SQL instance.
|
|
|
|
# @param [String] project
|
|
|
|
# Project ID of the project that contains the instance.
|
|
|
|
# @param [String] instance
|
|
|
|
# Database instance ID. This does not include the project ID.
|
2020-09-18 00:39:13 +00:00
|
|
|
# @param [Google::Apis::SqladminV1beta4::User] user_object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] host
|
2019-12-17 00:37:11 +00:00
|
|
|
# Optional. Host of the user in the instance.
|
2019-10-15 00:37:33 +00:00
|
|
|
# @param [String] name
|
|
|
|
# Name of the user in the instance.
|
|
|
|
# @param [String] fields
|
|
|
|
# Selector specifying which fields to include in a partial response.
|
|
|
|
# @param [String] quota_user
|
|
|
|
# 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.
|
|
|
|
# @param [Google::Apis::RequestOptions] options
|
|
|
|
# Request-specific options
|
|
|
|
#
|
|
|
|
# @yield [result, err] Result & error if block supplied
|
2020-09-18 00:39:13 +00:00
|
|
|
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
|
2019-10-15 00:37:33 +00:00
|
|
|
# @yieldparam err [StandardError] error object if request failed
|
|
|
|
#
|
2020-09-18 00:39:13 +00:00
|
|
|
# @return [Google::Apis::SqladminV1beta4::Operation]
|
2019-10-15 00:37:33 +00:00
|
|
|
#
|
|
|
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
|
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
|
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2020-04-13 16:49:10 +00:00
|
|
|
def update_user(project, instance, user_object = nil, host: nil, name: nil, fields: nil, quota_user: nil, options: nil, &block)
|
2019-10-15 00:37:33 +00:00
|
|
|
command = make_simple_command(:put, 'sql/v1beta4/projects/{project}/instances/{instance}/users', options)
|
2020-09-18 00:39:13 +00:00
|
|
|
command.request_representation = Google::Apis::SqladminV1beta4::User::Representation
|
2019-10-15 00:37:33 +00:00
|
|
|
command.request_object = user_object
|
2020-09-18 00:39:13 +00:00
|
|
|
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
|
|
|
|
command.response_class = Google::Apis::SqladminV1beta4::Operation
|
2019-10-15 00:37:33 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
|
|
def apply_command_defaults(command)
|
|
|
|
command.query['key'] = key unless key.nil?
|
|
|
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|