Reference documentation and code samples for the Cloud SQL Admin V1 API class Google::Cloud::Sql::V1::SqlBackupRunsService::Rest::Client.
REST client for the SqlBackupRunsService service.
Service for managing database backups.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the SqlBackupRunsService Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all SqlBackupRunsService clients ::Google::Cloud::Sql::V1::SqlBackupRunsService::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the SqlBackupRunsService Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#delete
def delete(request, options = nil) -> ::Google::Cloud::Sql::V1::Operation
def delete(id: nil, instance: nil, project: nil) -> ::Google::Cloud::Sql::V1::OperationDeletes the backup taken by a backup run.
def delete(request, options = nil) -> ::Google::Cloud::Sql::V1::Operationdelete via a request object, either of type
Google::Cloud::Sql::V1::SqlBackupRunsDeleteRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1::SqlBackupRunsDeleteRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def delete(id: nil, instance: nil, project: nil) -> ::Google::Cloud::Sql::V1::Operationdelete via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- id (::Integer) — The ID of the backup run to delete. To find a backup run ID, use the list method.
- instance (::String) — Cloud SQL instance ID. This does not include the project ID.
- project (::String) — Project ID of the project that contains the instance.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Sql::V1::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/sql/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1::SqlBackupRunsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1::SqlBackupRunsDeleteRequest.new # Call the delete method. result = client.delete request # The returned object is of type Google::Cloud::Sql::V1::Operation. p result
#get
def get(request, options = nil) -> ::Google::Cloud::Sql::V1::BackupRun
def get(id: nil, instance: nil, project: nil) -> ::Google::Cloud::Sql::V1::BackupRunRetrieves a resource containing information about a backup run.
def get(request, options = nil) -> ::Google::Cloud::Sql::V1::BackupRunget via a request object, either of type
Google::Cloud::Sql::V1::SqlBackupRunsGetRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1::SqlBackupRunsGetRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def get(id: nil, instance: nil, project: nil) -> ::Google::Cloud::Sql::V1::BackupRunget via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- id (::Integer) — The ID of this backup run.
- instance (::String) — Cloud SQL instance ID. This does not include the project ID.
- project (::String) — Project ID of the project that contains the instance.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Sql::V1::BackupRun)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/sql/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1::SqlBackupRunsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1::SqlBackupRunsGetRequest.new # Call the get method. result = client.get request # The returned object is of type Google::Cloud::Sql::V1::BackupRun. p result
#initialize
def initialize() { |config| ... } -> ClientCreate a new SqlBackupRunsService REST client object.
- (config) — Configure the SqlBackupRunsService client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Sql::V1::SqlBackupRunsService::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Sql::V1::SqlBackupRunsService::Rest::Client.new do |config| config.timeout = 10.0 end
#insert
def insert(request, options = nil) -> ::Google::Cloud::Sql::V1::Operation
def insert(instance: nil, project: nil, body: nil) -> ::Google::Cloud::Sql::V1::OperationCreates a new backup run on demand.
def insert(request, options = nil) -> ::Google::Cloud::Sql::V1::Operationinsert via a request object, either of type
Google::Cloud::Sql::V1::SqlBackupRunsInsertRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1::SqlBackupRunsInsertRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def insert(instance: nil, project: nil, body: nil) -> ::Google::Cloud::Sql::V1::Operationinsert via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- instance (::String) — Cloud SQL instance ID. This does not include the project ID.
- project (::String) — Project ID of the project that contains the instance.
- body (::Google::Cloud::Sql::V1::BackupRun, ::Hash)
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Sql::V1::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/sql/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1::SqlBackupRunsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1::SqlBackupRunsInsertRequest.new # Call the insert method. result = client.insert request # The returned object is of type Google::Cloud::Sql::V1::Operation. p result
#list
def list(request, options = nil) -> ::Google::Cloud::Sql::V1::BackupRunsListResponse
def list(instance: nil, max_results: nil, page_token: nil, project: nil) -> ::Google::Cloud::Sql::V1::BackupRunsListResponseLists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.
def list(request, options = nil) -> ::Google::Cloud::Sql::V1::BackupRunsListResponselist via a request object, either of type
Google::Cloud::Sql::V1::SqlBackupRunsListRequest or an equivalent Hash.
- request (::Google::Cloud::Sql::V1::SqlBackupRunsListRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
def list(instance: nil, max_results: nil, page_token: nil, project: nil) -> ::Google::Cloud::Sql::V1::BackupRunsListResponselist via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- instance (::String) — Cloud SQL instance ID, or "-" for all instances. This does not include the project ID.
- max_results (::Integer) — Maximum number of backup runs per response.
- page_token (::String) — A previously-returned page token representing part of the larger set of results to view.
- project (::String) — Project ID of the project that contains the instance.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::Sql::V1::BackupRunsListResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/sql/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Sql::V1::SqlBackupRunsService::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Sql::V1::SqlBackupRunsListRequest.new # Call the list method. result = client.list request # The returned object is of type Google::Cloud::Sql::V1::BackupRunsListResponse. p result
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::ClientGet the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#logger
def logger() -> LoggerThe logger used for request/response debug logging.
- (Logger)
#universe_domain
def universe_domain() -> StringThe effective universe domain
- (String)