Reference documentation and code samples for the Backup and DR Service V1 API class Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.
REST client for the BackupDR service.
The BackupDR Service
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the BackupDR Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all BackupDR clients ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the BackupDR 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)
#create_management_server
def create_management_server(request, options = nil) -> ::Gapic::Operation
def create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) -> ::Gapic::Operation
Creates a new ManagementServer in a given project and location.
def create_management_server(request, options = nil) -> ::Gapic::Operation
create_management_server
via a request object, either of type
CreateManagementServerRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::CreateManagementServerRequest, ::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 create_management_server(parent: nil, management_server_id: nil, management_server: nil, request_id: nil) -> ::Gapic::Operation
create_management_server
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).
-
parent (::String) — Required. The management server project and location in the format
projects/{project_id}/locations/{location}
. In Cloud Backup and DR locations map to GCP regions, for example us-central1. - management_server_id (::String) — Required. The name of the management server to create. The name must be unique for the specified project and location.
- management_server (::Google::Cloud::BackupDR::V1::ManagementServer, ::Hash) — Required. A [management server resource][google.cloud.backupdr.v1.ManagementServer]
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes since the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/backupdr/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::CreateManagementServerRequest.new # Call the create_management_server method. result = client.create_management_server request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#delete_management_server
def delete_management_server(request, options = nil) -> ::Gapic::Operation
def delete_management_server(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single ManagementServer.
def delete_management_server(request, options = nil) -> ::Gapic::Operation
delete_management_server
via a request object, either of type
DeleteManagementServerRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::DeleteManagementServerRequest, ::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_management_server(name: nil, request_id: nil) -> ::Gapic::Operation
delete_management_server
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).
- name (::String) — Required. Name of the resource
-
request_id (::String) — Optional. An optional request ID to identify requests. Specify a unique
request ID so that if you must retry your request, the server will know to
ignore the request if it has already been completed. The server will
guarantee that for at least 60 minutes after the first request.
For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- (result, operation) — Access the result along with the TransportOperation object
- result (::Gapic::Operation)
- operation (::Gapic::Rest::TransportOperation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/backupdr/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::DeleteManagementServerRequest.new # Call the delete_management_server method. result = client.delete_management_server request # The returned object is of type Gapic::Operation. You can use it to # check the status of an operation, cancel it, or wait for results. # Here is how to wait for a response. result.wait_until_done! timeout: 60 if result.response? p result.response else puts "No response received." end
#get_management_server
def get_management_server(request, options = nil) -> ::Google::Cloud::BackupDR::V1::ManagementServer
def get_management_server(name: nil) -> ::Google::Cloud::BackupDR::V1::ManagementServer
Gets details of a single ManagementServer.
def get_management_server(request, options = nil) -> ::Google::Cloud::BackupDR::V1::ManagementServer
get_management_server
via a request object, either of type
GetManagementServerRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::GetManagementServerRequest, ::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_management_server(name: nil) -> ::Google::Cloud::BackupDR::V1::ManagementServer
get_management_server
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).
-
name (::String) — Required. Name of the management server resource name, in the format
projects/{project_id}/locations/{location}/managementServers/{resource_name}
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BackupDR::V1::ManagementServer)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/backupdr/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::GetManagementServerRequest.new # Call the get_management_server method. result = client.get_management_server request # The returned object is of type Google::Cloud::BackupDR::V1::ManagementServer. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Rest::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new BackupDR REST client object.
- (config) — Configure the BackupDR client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new # Create a client using a custom configuration client = ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new do |config| config.timeout = 10.0 end
#list_management_servers
def list_management_servers(request, options = nil) -> ::Google::Cloud::BackupDR::V1::ListManagementServersResponse
def list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::BackupDR::V1::ListManagementServersResponse
Lists ManagementServers in a given project and location.
def list_management_servers(request, options = nil) -> ::Google::Cloud::BackupDR::V1::ListManagementServersResponse
list_management_servers
via a request object, either of type
ListManagementServersRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::ListManagementServersRequest, ::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_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Google::Cloud::BackupDR::V1::ListManagementServersResponse
list_management_servers
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).
-
parent (::String) — Required. The project and location for which to retrieve management servers
information, in the format
projects/{project_id}/locations/{location}
. In Cloud BackupDR, locations map to GCP regions, for example us-central1. To retrieve management servers for all locations, use "-" for the{location}
value. - page_size (::Integer) — Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
- page_token (::String) — Optional. A token identifying a page of results the server should return.
- filter (::String) — Optional. Filtering results.
- order_by (::String) — Optional. Hint for how to order the results.
- (result, operation) — Access the result along with the TransportOperation object
- result (::Google::Cloud::BackupDR::V1::ListManagementServersResponse)
- operation (::Gapic::Rest::TransportOperation)
- (::Google::Cloud::Error) — if the REST call is aborted.
Basic example
require "google/cloud/backupdr/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::BackupDR::V1::BackupDR::Rest::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::ListManagementServersRequest.new # Call the list_management_servers method. result = client.list_management_servers request # The returned object is of type Gapic::PagedEnumerable. You can iterate # over elements, and API calls will be issued to fetch pages as needed. result.each do |item| # Each element is of type ::Google::Cloud::BackupDR::V1::ManagementServer. p item end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Rest::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Rest::Client)
#operations_client
def operations_client() -> ::Google::Cloud::BackupDR::V1::BackupDR::Rest::Operations
Get the associated client for long-running operations.
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)