google-api-ruby-client/generated/google/apis/sqladmin_v1beta4/service.rb

1793 lines
105 KiB
Ruby
Raw Normal View History

2015-06-23 23:05:46 +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
module SqladminV1beta4
Autogenerated update (2018-08-22) Delete: - spectrum_v1explorer Update: - abusiveexperiencereport_v1 - adexchangebuyer2_v2beta1 - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - adexperiencereport_v1 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - analyticsreporting_v4 - androiddeviceprovisioning_v1 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appengine_v1 - appengine_v1beta - appsactivity_v1 - appsmarket_v2 - appstate_v1 - bigquery_v2 - bigquerydatatransfer_v1 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - chat_v1 - civicinfo_v2 - classroom_v1 - cloudbilling_v1 - cloudbuild_v1 - clouddebugger_v2 - clouderrorreporting_v1beta1 - cloudiot_v1 - cloudkms_v1 - cloudprofiler_v2 - cloudresourcemanager_v1 - cloudresourcemanager_v1beta1 - cloudresourcemanager_v2 - cloudresourcemanager_v2beta1 - cloudshell_v1alpha1 - cloudtasks_v2beta2 - cloudtrace_v1 - cloudtrace_v2 - composer_v1beta1 - compute_alpha - compute_beta - compute_v1 - container_v1 - container_v1beta1 - content_v2 - content_v2sandbox - customsearch_v1 - dataproc_v1beta2 - datastore_v1 - datastore_v1beta1 - datastore_v1beta3 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dialogflow_v2 - dialogflow_v2beta1 - discovery_v1 - dlp_v2 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - firestore_v1beta1 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - genomics_v1 - genomics_v1alpha2 - genomics_v2alpha1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - iam_v1 - iamcredentials_v1 - identitytoolkit_v3 - jobs_v2 - licensing_v1 - logging_v2 - logging_v2beta1 - mirror_v1 - ml_v1 - monitoring_v3 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - poly_v1 - pubsub_v1 - pubsub_v1beta2 - redis_v1beta1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - runtimeconfig_v1beta1 - script_v1 - servicebroker_v1 - servicebroker_v1alpha1 - servicebroker_v1beta1 - serviceconsumermanagement_v1 - servicecontrol_v1 - servicemanagement_v1 - serviceusage_v1 - serviceusage_v1beta1 - serviceuser_v1 - sheets_v4 - site_verification_v1 - slides_v1 - sourcerepo_v1 - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - testing_v1 - texttospeech_v1beta1 - toolresults_v1beta3 - tpu_v1 - tpu_v1alpha1 - urlshortener_v1 - vault_v1 - vision_v1 - vision_v1p1beta1 - vision_v1p2beta1 - webfonts_v1 - webmasters_v3 - websecurityscanner_v1alpha - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_partner_v1 - youtube_v3
2018-08-22 21:14:52 +00:00
# Cloud SQL Admin API
2015-06-23 23:05:46 +00:00
#
# Creates and manages Cloud SQL instances, which provide fully managed MySQL or
# PostgreSQL databases.
2015-06-23 23:05:46 +00:00
#
# @example
# require 'google/apis/sqladmin_v1beta4'
#
# Sqladmin = Google::Apis::SqladminV1beta4 # Alias the module
# service = Sqladmin::SQLAdminService.new
#
# @see https://cloud.google.com/sql/docs/reference/latest
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]
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
attr_accessor :quota_user
# @return [String]
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
attr_accessor :user_ip
def initialize
super('https://www.googleapis.com/', 'sql/v1beta4/')
@batch_path = 'batch/sqladmin/v1beta4'
2015-06-23 23:05:46 +00:00
end
2015-12-03 01:10:07 +00:00
# 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.
2017-04-03 20:18:48 +00:00
# @param [Fixnum] id
2015-12-03 01:10:07 +00:00
# The ID of the Backup Run to delete. To find a Backup Run ID, use the list
# method.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-12-03 01:10:07 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-12-03 01:10:07 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 delete_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/backupRuns/{id}', options)
2015-12-03 01:10:07 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2015-06-23 23:05:46 +00:00
# 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.
2017-04-03 20:18:48 +00:00
# @param [Fixnum] id
2015-06-23 23:05:46 +00:00
# The ID of this Backup Run.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::BackupRun] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::BackupRun]
#
# @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 get_backup_run(project, instance, id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}/backupRuns/{id}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation
command.response_class = Google::Apis::SqladminV1beta4::BackupRun
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.params['id'] = id unless id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Creates a new backup run on demand. This method is applicable only to Second
# Generation instances.
2016-08-08 20:25:38 +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 [Google::Apis::SqladminV1beta4::BackupRun] backup_run_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2016-08-08 20:25:38 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2016-08-08 20:25:38 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 insert_backup_run(project, instance, backup_run_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/backupRuns', options)
2016-08-08 20:25:38 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::BackupRun::Representation
command.request_object = backup_run_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2015-06-23 23:05:46 +00:00
# Lists all backup runs associated with a given instance and configuration in
# the reverse chronological order of the backup initiation time.
2015-06-23 23:05:46 +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 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::ListBackupRunsResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::ListBackupRunsResponse]
2015-06-23 23:05:46 +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_backup_runs(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}/backupRuns', options)
command.response_representation = Google::Apis::SqladminV1beta4::ListBackupRunsResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::ListBackupRunsResponse
2015-06-23 23:05:46 +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?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2016-02-25 23:16:53 +00:00
# Deletes a database from a Cloud SQL instance.
2015-06-23 23:05:46 +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 deleted in the instance.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 delete_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/databases/{database}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.params['database'] = database unless database.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Database] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Database]
#
# @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 get_database(project, instance, database, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}/databases/{database}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Database::Representation
command.response_class = Google::Apis::SqladminV1beta4::Database
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.params['database'] = database unless database.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Inserts 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 [Google::Apis::SqladminV1beta4::Database] database_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 insert_database(project, instance, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/databases', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
command.request_object = database_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists databases in the specified Cloud SQL instance.
# @param [String] project
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# Project ID of the project that contains the instance.
2015-06-23 23:05:46 +00:00
# @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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::ListDatabasesResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::ListDatabasesResponse]
2015-06-23 23:05:46 +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_databases(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}/databases', options)
command.response_representation = Google::Apis::SqladminV1beta4::ListDatabasesResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::ListDatabasesResponse
2015-06-23 23:05:46 +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?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates a resource containing information about a database inside a Cloud SQL
# instance. This method supports patch semantics.
# @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.
# @param [Google::Apis::SqladminV1beta4::Database] database_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 patch_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, 'projects/{project}/instances/{instance}/databases/{database}', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
command.request_object = database_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.params['database'] = database unless database.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Updates 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 to be updated in the instance.
# @param [Google::Apis::SqladminV1beta4::Database] database_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 update_database(project, instance, database, database_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, 'projects/{project}/instances/{instance}/databases/{database}', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::Database::Representation
command.request_object = database_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.params['database'] = database unless database.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
Autogenerated update (2018-08-22) Delete: - spectrum_v1explorer Update: - abusiveexperiencereport_v1 - adexchangebuyer2_v2beta1 - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - adexperiencereport_v1 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - analyticsreporting_v4 - androiddeviceprovisioning_v1 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appengine_v1 - appengine_v1beta - appsactivity_v1 - appsmarket_v2 - appstate_v1 - bigquery_v2 - bigquerydatatransfer_v1 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - chat_v1 - civicinfo_v2 - classroom_v1 - cloudbilling_v1 - cloudbuild_v1 - clouddebugger_v2 - clouderrorreporting_v1beta1 - cloudiot_v1 - cloudkms_v1 - cloudprofiler_v2 - cloudresourcemanager_v1 - cloudresourcemanager_v1beta1 - cloudresourcemanager_v2 - cloudresourcemanager_v2beta1 - cloudshell_v1alpha1 - cloudtasks_v2beta2 - cloudtrace_v1 - cloudtrace_v2 - composer_v1beta1 - compute_alpha - compute_beta - compute_v1 - container_v1 - container_v1beta1 - content_v2 - content_v2sandbox - customsearch_v1 - dataproc_v1beta2 - datastore_v1 - datastore_v1beta1 - datastore_v1beta3 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dialogflow_v2 - dialogflow_v2beta1 - discovery_v1 - dlp_v2 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - firestore_v1beta1 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - genomics_v1 - genomics_v1alpha2 - genomics_v2alpha1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - iam_v1 - iamcredentials_v1 - identitytoolkit_v3 - jobs_v2 - licensing_v1 - logging_v2 - logging_v2beta1 - mirror_v1 - ml_v1 - monitoring_v3 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - poly_v1 - pubsub_v1 - pubsub_v1beta2 - redis_v1beta1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - runtimeconfig_v1beta1 - script_v1 - servicebroker_v1 - servicebroker_v1alpha1 - servicebroker_v1beta1 - serviceconsumermanagement_v1 - servicecontrol_v1 - servicemanagement_v1 - serviceusage_v1 - serviceusage_v1beta1 - serviceuser_v1 - sheets_v4 - site_verification_v1 - slides_v1 - sourcerepo_v1 - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - testing_v1 - texttospeech_v1beta1 - toolresults_v1beta3 - tpu_v1 - tpu_v1alpha1 - urlshortener_v1 - vault_v1 - vision_v1 - vision_v1p1beta1 - vision_v1p2beta1 - webfonts_v1 - webmasters_v3 - websecurityscanner_v1alpha - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_partner_v1 - youtube_v3
2018-08-22 21:14:52 +00:00
# List all available database flags for Cloud SQL instances.
2017-03-10 21:11:09 +00:00
# @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.
2015-06-23 23:05:46 +00:00
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::ListFlagsResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::ListFlagsResponse]
2015-06-23 23:05:46 +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
2017-03-10 21:11:09 +00:00
def list_flags(database_version: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'flags', options)
command.response_representation = Google::Apis::SqladminV1beta4::ListFlagsResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::ListFlagsResponse
2017-03-10 21:11:09 +00:00
command.query['databaseVersion'] = database_version unless database_version.nil?
2015-06-23 23:05:46 +00:00
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Add a new trusted Certificate Authority (CA) version for the specified
# instance. Required to prepare for a certificate rotation. If a CA version was
# previously added but never used in a certificate rotation, this operation
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# replaces that version. There cannot be more than one CA version waiting to be
# rotated in.
# @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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 add_instance_server_ca(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/addServerCa', options)
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# Creates a Cloud SQL instance as a clone of the source instance.
2015-06-23 23:05:46 +00:00
# @param [String] project
# Project ID of the source as well as the clone Cloud SQL instance.
# @param [String] instance
# The ID of the Cloud SQL instance to be cloned (source). This does not include
# the project ID.
# @param [Google::Apis::SqladminV1beta4::CloneInstancesRequest] clone_instances_request_object
2015-06-23 23:05:46 +00:00
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 clone_instance(project, instance, clone_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/clone', options)
command.request_representation = Google::Apis::SqladminV1beta4::CloneInstancesRequest::Representation
command.request_object = clone_instances_request_object
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 delete_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, 'projects/{project}/instances/{instance}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# 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.
# @param [Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest] instances_demote_master_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 demote_instance_master(project, instance, instances_demote_master_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/demoteMaster', options)
command.request_representation = Google::Apis::SqladminV1beta4::InstancesDemoteMasterRequest::Representation
command.request_object = instances_demote_master_request_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
Autogenerated update (2018-08-22) Delete: - spectrum_v1explorer Update: - abusiveexperiencereport_v1 - adexchangebuyer2_v2beta1 - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - adexperiencereport_v1 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - analyticsreporting_v4 - androiddeviceprovisioning_v1 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appengine_v1 - appengine_v1beta - appsactivity_v1 - appsmarket_v2 - appstate_v1 - bigquery_v2 - bigquerydatatransfer_v1 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - chat_v1 - civicinfo_v2 - classroom_v1 - cloudbilling_v1 - cloudbuild_v1 - clouddebugger_v2 - clouderrorreporting_v1beta1 - cloudiot_v1 - cloudkms_v1 - cloudprofiler_v2 - cloudresourcemanager_v1 - cloudresourcemanager_v1beta1 - cloudresourcemanager_v2 - cloudresourcemanager_v2beta1 - cloudshell_v1alpha1 - cloudtasks_v2beta2 - cloudtrace_v1 - cloudtrace_v2 - composer_v1beta1 - compute_alpha - compute_beta - compute_v1 - container_v1 - container_v1beta1 - content_v2 - content_v2sandbox - customsearch_v1 - dataproc_v1beta2 - datastore_v1 - datastore_v1beta1 - datastore_v1beta3 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dialogflow_v2 - dialogflow_v2beta1 - discovery_v1 - dlp_v2 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - firestore_v1beta1 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - genomics_v1 - genomics_v1alpha2 - genomics_v2alpha1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - iam_v1 - iamcredentials_v1 - identitytoolkit_v3 - jobs_v2 - licensing_v1 - logging_v2 - logging_v2beta1 - mirror_v1 - ml_v1 - monitoring_v3 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - poly_v1 - pubsub_v1 - pubsub_v1beta2 - redis_v1beta1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - runtimeconfig_v1beta1 - script_v1 - servicebroker_v1 - servicebroker_v1alpha1 - servicebroker_v1beta1 - serviceconsumermanagement_v1 - servicecontrol_v1 - servicemanagement_v1 - serviceusage_v1 - serviceusage_v1beta1 - serviceuser_v1 - sheets_v4 - site_verification_v1 - slides_v1 - sourcerepo_v1 - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - testing_v1 - texttospeech_v1beta1 - toolresults_v1beta3 - tpu_v1 - tpu_v1alpha1 - urlshortener_v1 - vault_v1 - vision_v1 - vision_v1p1beta1 - vision_v1p2beta1 - webfonts_v1 - webmasters_v3 - websecurityscanner_v1alpha - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_partner_v1 - youtube_v3
2018-08-22 21:14:52 +00:00
# Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump
# or CSV file.
2015-06-23 23:05:46 +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.
# @param [Google::Apis::SqladminV1beta4::ExportInstancesRequest] export_instances_request_object
2015-06-23 23:05:46 +00:00
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 export_instance(project, instance, export_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/export', options)
command.request_representation = Google::Apis::SqladminV1beta4::ExportInstancesRequest::Representation
command.request_object = export_instances_request_object
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2015-12-03 01:10:07 +00:00
# Failover the instance to its failover replica instance.
# @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.
# @param [Google::Apis::SqladminV1beta4::InstancesFailoverRequest] instances_failover_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-12-03 01:10:07 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-12-03 01:10:07 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 failover_instance(project, instance, instances_failover_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/failover', options)
2015-12-03 01:10:07 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::InstancesFailoverRequest::Representation
command.request_object = instances_failover_request_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2015-06-23 23:05:46 +00:00
# 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::DatabaseInstance] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::DatabaseInstance]
#
# @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 get_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
command.response_class = Google::Apis::SqladminV1beta4::DatabaseInstance
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
Autogenerated update (2018-08-22) Delete: - spectrum_v1explorer Update: - abusiveexperiencereport_v1 - adexchangebuyer2_v2beta1 - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - adexperiencereport_v1 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - analyticsreporting_v4 - androiddeviceprovisioning_v1 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appengine_v1 - appengine_v1beta - appsactivity_v1 - appsmarket_v2 - appstate_v1 - bigquery_v2 - bigquerydatatransfer_v1 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - chat_v1 - civicinfo_v2 - classroom_v1 - cloudbilling_v1 - cloudbuild_v1 - clouddebugger_v2 - clouderrorreporting_v1beta1 - cloudiot_v1 - cloudkms_v1 - cloudprofiler_v2 - cloudresourcemanager_v1 - cloudresourcemanager_v1beta1 - cloudresourcemanager_v2 - cloudresourcemanager_v2beta1 - cloudshell_v1alpha1 - cloudtasks_v2beta2 - cloudtrace_v1 - cloudtrace_v2 - composer_v1beta1 - compute_alpha - compute_beta - compute_v1 - container_v1 - container_v1beta1 - content_v2 - content_v2sandbox - customsearch_v1 - dataproc_v1beta2 - datastore_v1 - datastore_v1beta1 - datastore_v1beta3 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dialogflow_v2 - dialogflow_v2beta1 - discovery_v1 - dlp_v2 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - firestore_v1beta1 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - genomics_v1 - genomics_v1alpha2 - genomics_v2alpha1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - iam_v1 - iamcredentials_v1 - identitytoolkit_v3 - jobs_v2 - licensing_v1 - logging_v2 - logging_v2beta1 - mirror_v1 - ml_v1 - monitoring_v3 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - poly_v1 - pubsub_v1 - pubsub_v1beta2 - redis_v1beta1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - runtimeconfig_v1beta1 - script_v1 - servicebroker_v1 - servicebroker_v1alpha1 - servicebroker_v1beta1 - serviceconsumermanagement_v1 - servicecontrol_v1 - servicemanagement_v1 - serviceusage_v1 - serviceusage_v1beta1 - serviceuser_v1 - sheets_v4 - site_verification_v1 - slides_v1 - sourcerepo_v1 - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - testing_v1 - texttospeech_v1beta1 - toolresults_v1beta3 - tpu_v1 - tpu_v1alpha1 - urlshortener_v1 - vault_v1 - vision_v1 - vision_v1p1beta1 - vision_v1p2beta1 - webfonts_v1 - webmasters_v3 - websecurityscanner_v1alpha - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_partner_v1 - youtube_v3
2018-08-22 21:14:52 +00:00
# Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud
2015-06-23 23:05:46 +00:00
# Storage.
# @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 [Google::Apis::SqladminV1beta4::ImportInstancesRequest] import_instances_request_object
2015-06-23 23:05:46 +00:00
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 import_instance(project, instance, import_instances_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/import', options)
command.request_representation = Google::Apis::SqladminV1beta4::ImportInstancesRequest::Representation
command.request_object = import_instances_request_object
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Creates a new Cloud SQL instance.
# @param [String] project
# Project ID of the project to which the newly created Cloud SQL instances
# should belong.
# @param [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 insert_instance(project, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
command.request_object = database_instance_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists instances under a given project in the alphabetical order of the
# instance name.
# @param [String] project
# Project ID of the project for which to list Cloud SQL instances.
2017-03-10 21:11:09 +00:00
# @param [String] filter
# An expression for filtering the results of the request, such as by name or
# label.
2015-06-23 23:05:46 +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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::ListInstancesResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::ListInstancesResponse]
2015-06-23 23:05:46 +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
2017-03-10 21:11:09 +00:00
def list_instances(project, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances', options)
command.response_representation = Google::Apis::SqladminV1beta4::ListInstancesResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::ListInstancesResponse
2015-06-23 23:05:46 +00:00
command.params['project'] = project unless project.nil?
2017-03-10 21:11:09 +00:00
command.query['filter'] = filter unless filter.nil?
2015-06-23 23:05:46 +00:00
command.query['maxResults'] = max_results unless max_results.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists all of the trusted Certificate Authorities (CAs) for the specified
# instance. There can be up to three CAs listed: the CA that was used to sign
# the certificate that is currently in use, a CA that has been added but not yet
# used to sign a certificate, and a CA used to sign a certificate that has
# previously rotated out.
# @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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::InstancesListServerCasResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::InstancesListServerCasResponse]
#
# @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_instance_server_cas(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}/listServerCas', options)
command.response_representation = Google::Apis::SqladminV1beta4::InstancesListServerCasResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::InstancesListServerCasResponse
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2015-06-23 23:05:46 +00:00
# Updates settings of a Cloud SQL instance. Caution: This is not a partial
# update, so you must include values for all the settings that you want to
# retain. For partial updates, use patch.. This method supports patch semantics.
# @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 [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 patch_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:patch, 'projects/{project}/instances/{instance}', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
command.request_object = database_instance_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Promotes the read replica instance to be a stand-alone Cloud SQL 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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
2015-12-03 01:10:07 +00:00
def promote_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/promoteReplica', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Deletes all client certificates and generates a new server SSL certificate for
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# the instance.
2015-06-23 23:05:46 +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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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
2015-12-03 01:10:07 +00:00
def reset_instance_ssl_config(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/resetSslConfig', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 restart_instance(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/restart', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Restores a backup of a 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 [Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest] restore_instances_backup_request_object
2015-06-23 23:05:46 +00:00
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 restore_instance_backup(project, instance, restore_instances_backup_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/restoreBackup', options)
command.request_representation = Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest::Representation
command.request_object = restore_instances_backup_request_object
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Rotates the server certificate to one signed by the Certificate Authority (CA)
# version previously added with the addServerCA method.
# @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 [Google::Apis::SqladminV1beta4::InstancesRotateServerCaRequest] instances_rotate_server_ca_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 rotate_instance_server_ca(project, instance, instances_rotate_server_ca_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/rotateServerCa', options)
command.request_representation = Google::Apis::SqladminV1beta4::InstancesRotateServerCaRequest::Representation
command.request_object = instances_rotate_server_ca_request_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
2015-06-23 23:05:46 +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?
command.query['userIp'] = user_ip unless user_ip.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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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
2015-12-03 01:10:07 +00:00
def start_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/startReplica', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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
2015-12-03 01:10:07 +00:00
def stop_instance_replica(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/stopReplica', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2017-01-13 23:04:35 +00:00
# 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.
# @param [Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest] instances_truncate_log_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2017-01-13 23:04:35 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2017-01-13 23:04:35 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 truncate_instance_log(project, instance, instances_truncate_log_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/truncateLog', options)
2017-01-13 23:04:35 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::InstancesTruncateLogRequest::Representation
command.request_object = instances_truncate_log_request_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2015-06-23 23:05:46 +00:00
# Updates settings of a Cloud SQL instance. Caution: This is not a partial
# update, so you must include values for all the settings that you want to
# retain. For partial updates, use patch.
# @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 [Google::Apis::SqladminV1beta4::DatabaseInstance] database_instance_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 update_instance(project, instance, database_instance_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, 'projects/{project}/instances/{instance}', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::DatabaseInstance::Representation
command.request_object = database_instance_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 get_operation(project, operation, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/operations/{operation}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['operation'] = operation unless operation.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists all instance operations that have been performed on the given Cloud SQL
# instance in the reverse chronological order of the start 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 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::ListOperationsResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::ListOperationsResponse]
2015-06-23 23:05:46 +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
2015-07-31 00:05:47 +00:00
def list_operations(project, instance, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/operations', options)
command.response_representation = Google::Apis::SqladminV1beta4::ListOperationsResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::ListOperationsResponse
2015-06-23 23:05:46 +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?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
2015-12-03 01:10:07 +00:00
# Generates a short-lived X509 certificate containing the provided public key
# and signed by a private key specific to the target instance. Users may use the
# certificate to authenticate as themselves when connecting to the database.
# @param [String] project
# Project ID of the Cloud SQL project.
# @param [String] instance
# Cloud SQL instance ID. This does not include the project ID.
# @param [Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest] ssl_certs_create_ephemeral_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-12-03 01:10:07 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-12-03 01:10:07 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::SslCert] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::SslCert]
#
# @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 create_ssl_cert_ephemeral(project, instance, ssl_certs_create_ephemeral_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/createEphemeral', options)
2015-12-03 01:10:07 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest::Representation
command.request_object = ssl_certs_create_ephemeral_request_object
command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation
command.response_class = Google::Apis::SqladminV1beta4::SslCert
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# Deletes the SSL certificate. For First Generation instances, the certificate
# remains valid until the instance is restarted.
2015-06-23 23:05:46 +00:00
# @param [String] project
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# Project ID of the project that contains the instance.
2015-06-23 23:05:46 +00:00
# @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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 delete_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a particular SSL certificate. Does not include the private key (
# required for usage). The private key must be saved from the response to
# initial creation.
# @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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::SslCert] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::SslCert]
#
# @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 get_ssl_cert(project, instance, sha1_fingerprint, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::SslCert::Representation
command.response_class = Google::Apis::SqladminV1beta4::SslCert
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.params['sha1Fingerprint'] = sha1_fingerprint unless sha1_fingerprint.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Creates an SSL certificate and returns it along with the private key and
# server certificate authority. The new certificate will not be usable until the
# instance is restarted.
# @param [String] project
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# Project ID of the project that contains the instance.
2015-06-23 23:05:46 +00:00
# @param [String] instance
# Cloud SQL instance ID. This does not include the project ID.
# @param [Google::Apis::SqladminV1beta4::InsertSslCertsRequest] insert_ssl_certs_request_object
2015-06-23 23:05:46 +00:00
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::InsertSslCertsResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::InsertSslCertsResponse]
2015-06-23 23:05:46 +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 insert_ssl_cert(project, instance, insert_ssl_certs_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/sslCerts', options)
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
2015-06-23 23:05:46 +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?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# Lists all of the current SSL certificates for the instance.
# @param [String] project
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# Project ID of the project that contains the instance.
2015-06-23 23:05:46 +00:00
# @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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::ListSslCertsResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::ListSslCertsResponse]
2015-06-23 23:05:46 +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_ssl_certs(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}/sslCerts', options)
command.response_representation = Google::Apis::SqladminV1beta4::ListSslCertsResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::ListSslCertsResponse
2015-06-23 23:05:46 +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?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
Autogenerated update (2018-07-10) Update: - adexchangebuyer_v1_2 - adexchangebuyer_v1_3 - adexchangebuyer_v1_4 - adexchangeseller_v1 - adexchangeseller_v1_1 - adexchangeseller_v2_0 - admin_datatransfer_v1 - admin_directory_v1 - admin_reports_v1 - adsense_v1_4 - adsensehost_v4_1 - analytics_v2_4 - analytics_v3 - androidenterprise_v1 - androidmanagement_v1 - androidpublisher_v1 - androidpublisher_v1_1 - androidpublisher_v2 - androidpublisher_v3 - appsactivity_v1 - appstate_v1 - bigquery_v2 - blogger_v2 - blogger_v3 - books_v1 - calendar_v3 - civicinfo_v2 - cloudiot_v1 - compute_alpha - compute_beta - compute_v1 - content_v2sandbox - customsearch_v1 - deploymentmanager_alpha - deploymentmanager_v2 - deploymentmanager_v2beta - dfareporting_v2_8 - dfareporting_v3_0 - dfareporting_v3_1 - dns_v1 - dns_v1beta2 - dns_v2beta1 - doubleclickbidmanager_v1 - doubleclicksearch_v2 - drive_v2 - drive_v3 - fitness_v1 - fusiontables_v1 - fusiontables_v2 - games_configuration_v1configuration - games_management_v1management - games_v1 - gmail_v1 - groupsmigration_v1 - groupssettings_v1 - identitytoolkit_v3 - licensing_v1 - mirror_v1 - oauth2_v1 - oauth2_v2 - pagespeedonline_v1 - pagespeedonline_v2 - pagespeedonline_v4 - playcustomapp_v1 - plus_domains_v1 - plus_v1 - replicapool_v1beta1 - replicapoolupdater_v1beta1 - reseller_v1 - script_v1 - site_verification_v1 - slides_v1 - spectrum_v1explorer - sqladmin_v1beta4 - storage_v1 - storage_v1beta1 - storage_v1beta2 - surveys_v2 - tagmanager_v1 - tagmanager_v2 - tasks_v1 - toolresults_v1beta3 - urlshortener_v1 - webfonts_v1 - webmasters_v3 - youtube_analytics_v1 - youtube_analytics_v1beta1 - youtube_v3
2018-07-10 00:36:20 +00:00
# Lists all available machine types (tiers) for Cloud SQL, for example, db-n1-
# standard-1. For related information, see Pricing.
2015-06-23 23:05:46 +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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::ListTiersResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::ListTiersResponse]
2015-06-23 23:05:46 +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, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/tiers', options)
command.response_representation = Google::Apis::SqladminV1beta4::ListTiersResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::ListTiersResponse
2015-06-23 23:05:46 +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?
command.query['userIp'] = user_ip unless user_ip.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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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
2015-07-31 00:05:47 +00:00
def delete_user(project, instance, host, name, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:delete, 'projects/{project}/instances/{instance}/users', options)
2015-06-23 23:05:46 +00:00
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['host'] = host unless host.nil?
command.query['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# 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.
# @param [Google::Apis::SqladminV1beta4::User] user_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 insert_user(project, instance, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:post, 'projects/{project}/instances/{instance}/users', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::User::Representation
command.request_object = user_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
# 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
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::ListUsersResponse] parsed result object
2015-06-23 23:05:46 +00:00
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::ListUsersResponse]
2015-06-23 23:05:46 +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_users(project, instance, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:get, 'projects/{project}/instances/{instance}/users', options)
command.response_representation = Google::Apis::SqladminV1beta4::ListUsersResponse::Representation
command.response_class = Google::Apis::SqladminV1beta4::ListUsersResponse
2015-06-23 23:05:46 +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?
command.query['userIp'] = user_ip unless user_ip.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.
# @param [String] name
# Name of the user in the instance.
2015-07-31 00:05:47 +00:00
# @param [Google::Apis::SqladminV1beta4::User] user_object
# @param [String] host
# Host of the user in the instance.
2015-06-23 23:05:46 +00:00
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# An opaque string that represents a user for quota purposes. Must not exceed 40
# characters.
2015-06-23 23:05:46 +00:00
# @param [String] user_ip
# Deprecated. Please use quotaUser instead.
2015-06-23 23:05:46 +00:00
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::SqladminV1beta4::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::SqladminV1beta4::Operation]
#
# @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 update_user(project, instance, name, user_object = nil, host: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
command = make_simple_command(:put, 'projects/{project}/instances/{instance}/users', options)
2015-06-23 23:05:46 +00:00
command.request_representation = Google::Apis::SqladminV1beta4::User::Representation
command.request_object = user_object
command.response_representation = Google::Apis::SqladminV1beta4::Operation::Representation
command.response_class = Google::Apis::SqladminV1beta4::Operation
command.params['project'] = project unless project.nil?
command.params['instance'] = instance unless instance.nil?
command.query['host'] = host unless host.nil?
command.query['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
execute_or_queue_command(command, &block)
end
protected
def apply_command_defaults(command)
command.query['key'] = key unless key.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
command.query['userIp'] = user_ip unless user_ip.nil?
end
end
end
end
end