Reference documentation and code samples for the Backup and DR Service V1 API class Google::Cloud::BackupDR::V1::BackupDR::Client.
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::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_backup_plan
def create_backup_plan(request, options = nil) -> ::Gapic::Operation
def create_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) -> ::Gapic::Operation
Create a BackupPlan
def create_backup_plan(request, options = nil) -> ::Gapic::Operation
create_backup_plan
via a request object, either of type
CreateBackupPlanRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::CreateBackupPlanRequest, ::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_backup_plan(parent: nil, backup_plan_id: nil, backup_plan: nil, request_id: nil) -> ::Gapic::Operation
create_backup_plan
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
BackupPlan
project and location in the formatprojects/{project}/locations/{location}
. In Cloud BackupDR locations map to GCP regions, for example us-central1. -
backup_plan_id (::String) — Required. The name of the
BackupPlan
to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /[a-z][a-z0-9-]{,62}/. -
backup_plan (::Google::Cloud::BackupDR::V1::BackupPlan, ::Hash) — Required. The
BackupPlan
resource object to create. -
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 t he 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::CreateBackupPlanRequest.new # Call the create_backup_plan method. result = client.create_backup_plan 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
#create_backup_plan_association
def create_backup_plan_association(request, options = nil) -> ::Gapic::Operation
def create_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) -> ::Gapic::Operation
Create a BackupPlanAssociation
def create_backup_plan_association(request, options = nil) -> ::Gapic::Operation
create_backup_plan_association
via a request object, either of type
CreateBackupPlanAssociationRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest, ::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_backup_plan_association(parent: nil, backup_plan_association_id: nil, backup_plan_association: nil, request_id: nil) -> ::Gapic::Operation
create_backup_plan_association
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 backup plan association project and location in the format
projects/{project_id}/locations/{location}
. In Cloud BackupDR locations map to GCP regions, for example us-central1. - backup_plan_association_id (::String) — Required. The name of the backup plan association to create. The name must be unique for the specified project and location.
- backup_plan_association (::Google::Cloud::BackupDR::V1::BackupPlanAssociation, ::Hash) — Required. The resource being created
-
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 t he 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::CreateBackupPlanAssociationRequest.new # Call the create_backup_plan_association method. result = client.create_backup_plan_association 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
#create_backup_vault
def create_backup_vault(request, options = nil) -> ::Gapic::Operation
def create_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
Creates a new BackupVault in a given project and location.
def create_backup_vault(request, options = nil) -> ::Gapic::Operation
create_backup_vault
via a request object, either of type
CreateBackupVaultRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::CreateBackupVaultRequest, ::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_backup_vault(parent: nil, backup_vault_id: nil, backup_vault: nil, request_id: nil, validate_only: nil) -> ::Gapic::Operation
create_backup_vault
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. Value for parent.
- backup_vault_id (::String) — Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC
- backup_vault (::Google::Cloud::BackupDR::V1::BackupVault, ::Hash) — Required. The resource being created
-
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).
- validate_only (::Boolean) — Optional. Only validate the request, but do not perform mutations. The default is 'false'.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::CreateBackupVaultRequest.new # Call the create_backup_vault method. result = client.create_backup_vault 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
#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 Google Cloud 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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_backup
def delete_backup(request, options = nil) -> ::Gapic::Operation
def delete_backup(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a Backup.
def delete_backup(request, options = nil) -> ::Gapic::Operation
delete_backup
via a request object, either of type
DeleteBackupRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::DeleteBackupRequest, ::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_backup(name: nil, request_id: nil) -> ::Gapic::Operation
delete_backup
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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::DeleteBackupRequest.new # Call the delete_backup method. result = client.delete_backup 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_backup_plan
def delete_backup_plan(request, options = nil) -> ::Gapic::Operation
def delete_backup_plan(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single BackupPlan.
def delete_backup_plan(request, options = nil) -> ::Gapic::Operation
delete_backup_plan
via a request object, either of type
DeleteBackupPlanRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest, ::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_backup_plan(name: nil, request_id: nil) -> ::Gapic::Operation
delete_backup_plan
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. The resource name of the
BackupPlan
to delete.Format:
projects/{project}/locations/{location}/backupPlans/{backup_plan}
-
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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::DeleteBackupPlanRequest.new # Call the delete_backup_plan method. result = client.delete_backup_plan 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_backup_plan_association
def delete_backup_plan_association(request, options = nil) -> ::Gapic::Operation
def delete_backup_plan_association(name: nil, request_id: nil) -> ::Gapic::Operation
Deletes a single BackupPlanAssociation.
def delete_backup_plan_association(request, options = nil) -> ::Gapic::Operation
delete_backup_plan_association
via a request object, either of type
DeleteBackupPlanAssociationRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest, ::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_backup_plan_association(name: nil, request_id: nil) -> ::Gapic::Operation
delete_backup_plan_association
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 backup plan association resource, in the format
projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
-
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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::DeleteBackupPlanAssociationRequest.new # Call the delete_backup_plan_association method. result = client.delete_backup_plan_association 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_backup_vault
def delete_backup_vault(request, options = nil) -> ::Gapic::Operation
def delete_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
Deletes a BackupVault.
def delete_backup_vault(request, options = nil) -> ::Gapic::Operation
delete_backup_vault
via a request object, either of type
DeleteBackupVaultRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest, ::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_backup_vault(name: nil, request_id: nil, force: nil, etag: nil, validate_only: nil, allow_missing: nil) -> ::Gapic::Operation
delete_backup_vault
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).
- force (::Boolean) — Optional. If set to true, any data source from this backup vault will also be deleted.
- etag (::String) — The current etag of the backup vault. If an etag is provided and does not match the current etag of the connection, deletion will be blocked.
- validate_only (::Boolean) — Optional. Only validate the request, but do not perform mutations. The default is 'false'.
- allow_missing (::Boolean) — Optional. If true and the BackupVault is not found, the request will succeed but no action will be taken.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::DeleteBackupVaultRequest.new # Call the delete_backup_vault method. result = client.delete_backup_vault 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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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
#fetch_usable_backup_vaults
def fetch_usable_backup_vaults(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>
def fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>
FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.
def fetch_usable_backup_vaults(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>
fetch_usable_backup_vaults
via a request object, either of type
FetchUsableBackupVaultsRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest, ::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 fetch_usable_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>
fetch_usable_backup_vaults
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 backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::FetchUsableBackupVaultsRequest.new # Call the fetch_usable_backup_vaults method. result = client.fetch_usable_backup_vaults 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::BackupVault. p item end
#get_backup
def get_backup(request, options = nil) -> ::Google::Cloud::BackupDR::V1::Backup
def get_backup(name: nil, view: nil) -> ::Google::Cloud::BackupDR::V1::Backup
Gets details of a Backup.
def get_backup(request, options = nil) -> ::Google::Cloud::BackupDR::V1::Backup
get_backup
via a request object, either of type
GetBackupRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::GetBackupRequest, ::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_backup(name: nil, view: nil) -> ::Google::Cloud::BackupDR::V1::Backup
get_backup
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 data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
- view (::Google::Cloud::BackupDR::V1::BackupView) — Optional. Reserved for future use to provide a BASIC & FULL view of Backup resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BackupDR::V1::Backup)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::GetBackupRequest.new # Call the get_backup method. result = client.get_backup request # The returned object is of type Google::Cloud::BackupDR::V1::Backup. p result
#get_backup_plan
def get_backup_plan(request, options = nil) -> ::Google::Cloud::BackupDR::V1::BackupPlan
def get_backup_plan(name: nil) -> ::Google::Cloud::BackupDR::V1::BackupPlan
Gets details of a single BackupPlan.
def get_backup_plan(request, options = nil) -> ::Google::Cloud::BackupDR::V1::BackupPlan
get_backup_plan
via a request object, either of type
GetBackupPlanRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::GetBackupPlanRequest, ::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_backup_plan(name: nil) -> ::Google::Cloud::BackupDR::V1::BackupPlan
get_backup_plan
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. The resource name of the
BackupPlan
to retrieve.Format:
projects/{project}/locations/{location}/backupPlans/{backup_plan}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BackupDR::V1::BackupPlan)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::GetBackupPlanRequest.new # Call the get_backup_plan method. result = client.get_backup_plan request # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlan. p result
#get_backup_plan_association
def get_backup_plan_association(request, options = nil) -> ::Google::Cloud::BackupDR::V1::BackupPlanAssociation
def get_backup_plan_association(name: nil) -> ::Google::Cloud::BackupDR::V1::BackupPlanAssociation
Gets details of a single BackupPlanAssociation.
def get_backup_plan_association(request, options = nil) -> ::Google::Cloud::BackupDR::V1::BackupPlanAssociation
get_backup_plan_association
via a request object, either of type
GetBackupPlanAssociationRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest, ::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_backup_plan_association(name: nil) -> ::Google::Cloud::BackupDR::V1::BackupPlanAssociation
get_backup_plan_association
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 backup plan association resource, in the format
projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BackupDR::V1::BackupPlanAssociation)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::GetBackupPlanAssociationRequest.new # Call the get_backup_plan_association method. result = client.get_backup_plan_association request # The returned object is of type Google::Cloud::BackupDR::V1::BackupPlanAssociation. p result
#get_backup_vault
def get_backup_vault(request, options = nil) -> ::Google::Cloud::BackupDR::V1::BackupVault
def get_backup_vault(name: nil, view: nil) -> ::Google::Cloud::BackupDR::V1::BackupVault
Gets details of a BackupVault.
def get_backup_vault(request, options = nil) -> ::Google::Cloud::BackupDR::V1::BackupVault
get_backup_vault
via a request object, either of type
GetBackupVaultRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::GetBackupVaultRequest, ::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_backup_vault(name: nil, view: nil) -> ::Google::Cloud::BackupDR::V1::BackupVault
get_backup_vault
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 backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
- view (::Google::Cloud::BackupDR::V1::BackupVaultView) — Optional. Reserved for future use to provide a BASIC & FULL view of Backup Vault
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BackupDR::V1::BackupVault)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::GetBackupVaultRequest.new # Call the get_backup_vault method. result = client.get_backup_vault request # The returned object is of type Google::Cloud::BackupDR::V1::BackupVault. p result
#get_data_source
def get_data_source(request, options = nil) -> ::Google::Cloud::BackupDR::V1::DataSource
def get_data_source(name: nil) -> ::Google::Cloud::BackupDR::V1::DataSource
Gets details of a DataSource.
def get_data_source(request, options = nil) -> ::Google::Cloud::BackupDR::V1::DataSource
get_data_source
via a request object, either of type
GetDataSourceRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::GetDataSourceRequest, ::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_data_source(name: nil) -> ::Google::Cloud::BackupDR::V1::DataSource
get_data_source
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 data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BackupDR::V1::DataSource)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::GetDataSourceRequest.new # Call the get_data_source method. result = client.get_data_source request # The returned object is of type Google::Cloud::BackupDR::V1::DataSource. p result
#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}'
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::BackupDR::V1::ManagementServer)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC 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::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::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new BackupDR 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::Client.new # Create a client using a custom configuration client = ::Google::Cloud::BackupDR::V1::BackupDR::Client.new do |config| config.timeout = 10.0 end
#list_backup_plan_associations
def list_backup_plan_associations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>
def list_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>
Lists BackupPlanAssociations in a given project and location.
def list_backup_plan_associations(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>
list_backup_plan_associations
via a request object, either of type
ListBackupPlanAssociationsRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest, ::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_backup_plan_associations(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>
list_backup_plan_associations
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 backup Plan
Associations information, in the format
projects/{project_id}/locations/{location}
. In Cloud BackupDR, locations map to GCP regions, for example us-central1. To retrieve backup plan associations 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
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlanAssociation>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::ListBackupPlanAssociationsRequest.new # Call the list_backup_plan_associations method. result = client.list_backup_plan_associations 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::BackupPlanAssociation. p item end
#list_backup_plans
def list_backup_plans(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>
def list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>
Lists BackupPlans in a given project and location.
def list_backup_plans(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>
list_backup_plans
via a request object, either of type
ListBackupPlansRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::ListBackupPlansRequest, ::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_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>
list_backup_plans
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
BackupPlans
information. Format:projects/{project}/locations/{location}
. In Cloud BackupDR, locations map to GCP regions, for e.g. us-central1. To retrieve backup plans for all locations, use "-" for the{location}
value. -
page_size (::Integer) — Optional. The maximum number of
BackupPlans
to return in a single response. If not specified, a default value will be chosen by the service. Note that the response may include a partial list and a caller should only rely on the response's next_page_token to determine if there are more instances left to be queried. -
page_token (::String) — Optional. The value of
next_page_token
received from a previous
ListBackupPlans
call. Provide this to retrieve the subsequent page in a multi-page list of results. When paginating, all other parameters provided toListBackupPlans
must match the call that provided the page token. - filter (::String) — Optional. Field match expression used to filter the results.
- order_by (::String) — Optional. Field by which to sort the results.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupPlan>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::ListBackupPlansRequest.new # Call the list_backup_plans method. result = client.list_backup_plans 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::BackupPlan. p item end
#list_backup_vaults
def list_backup_vaults(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>
def list_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>
Lists BackupVaults in a given project and location.
def list_backup_vaults(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>
list_backup_vaults
via a request object, either of type
ListBackupVaultsRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::ListBackupVaultsRequest, ::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_backup_vaults(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>
list_backup_vaults
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 backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores 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.
- view (::Google::Cloud::BackupDR::V1::BackupVaultView) — Optional. Reserved for future use to provide a BASIC & FULL view of Backup Vault.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::BackupVault>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::ListBackupVaultsRequest.new # Call the list_backup_vaults method. result = client.list_backup_vaults 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::BackupVault. p item end
#list_backups
def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>
def list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>
Lists Backups in a given project and location.
def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>
list_backups
via a request object, either of type
ListBackupsRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::ListBackupsRequest, ::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_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, view: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>
list_backups
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 backup information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources 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.
- view (::Google::Cloud::BackupDR::V1::BackupView) — Optional. Reserved for future use to provide a BASIC & FULL view of Backup resource.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::Backup>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::ListBackupsRequest.new # Call the list_backups method. result = client.list_backups 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::Backup. p item end
#list_data_sources
def list_data_sources(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>
def list_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>
Lists DataSources in a given project and location.
def list_data_sources(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>
list_data_sources
via a request object, either of type
ListDataSourcesRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::ListDataSourcesRequest, ::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_data_sources(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>
list_data_sources
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 data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::DataSource>)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::ListDataSourcesRequest.new # Call the list_data_sources method. result = client.list_data_sources 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::DataSource. p item end
#list_management_servers
def list_management_servers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>
def list_management_servers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>
Lists ManagementServers in a given project and location.
def list_management_servers(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>
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) -> ::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>
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 Google Cloud 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.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::BackupDR::V1::ManagementServer>)
- (::Google::Cloud::Error) — if the RPC 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::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::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#operations_client
def operations_client() -> ::Google::Cloud::BackupDR::V1::BackupDR::Operations
Get the associated client for long-running operations.
#restore_backup
def restore_backup(request, options = nil) -> ::Gapic::Operation
def restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, compute_instance_restore_properties: nil) -> ::Gapic::Operation
Restore from a Backup
def restore_backup(request, options = nil) -> ::Gapic::Operation
restore_backup
via a request object, either of type
RestoreBackupRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::RestoreBackupRequest, ::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 restore_backup(name: nil, request_id: nil, compute_instance_target_environment: nil, compute_instance_restore_properties: nil) -> ::Gapic::Operation
restore_backup
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. The resource name of the Backup instance, in the format 'projects//locations//backupVaults//dataSources//backups/'.
-
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).
- compute_instance_target_environment (::Google::Cloud::BackupDR::V1::ComputeInstanceTargetEnvironment, ::Hash) — Compute Engine target environment to be used during restore.
- compute_instance_restore_properties (::Google::Cloud::BackupDR::V1::ComputeInstanceRestoreProperties, ::Hash) — Compute Engine instance properties to be overridden during restore.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::RestoreBackupRequest.new # Call the restore_backup method. result = client.restore_backup 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
#trigger_backup
def trigger_backup(request, options = nil) -> ::Gapic::Operation
def trigger_backup(name: nil, rule_id: nil, request_id: nil) -> ::Gapic::Operation
Triggers a new Backup.
def trigger_backup(request, options = nil) -> ::Gapic::Operation
trigger_backup
via a request object, either of type
TriggerBackupRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::TriggerBackupRequest, ::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 trigger_backup(name: nil, rule_id: nil, request_id: nil) -> ::Gapic::Operation
trigger_backup
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 backup plan association resource, in the format
projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
- rule_id (::String) — Required. backup rule_id for which a backup needs to be triggered.
-
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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::TriggerBackupRequest.new # Call the trigger_backup method. result = client.trigger_backup 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
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_backup
def update_backup(request, options = nil) -> ::Gapic::Operation
def update_backup(update_mask: nil, backup: nil, request_id: nil) -> ::Gapic::Operation
Updates the settings of a Backup.
def update_backup(request, options = nil) -> ::Gapic::Operation
update_backup
via a request object, either of type
UpdateBackupRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::UpdateBackupRequest, ::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 update_backup(update_mask: nil, backup: nil, request_id: nil) -> ::Gapic::Operation
update_backup
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.
- backup (::Google::Cloud::BackupDR::V1::Backup, ::Hash) — Required. The resource being updated
-
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).
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::UpdateBackupRequest.new # Call the update_backup method. result = client.update_backup 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
#update_backup_vault
def update_backup_vault(request, options = nil) -> ::Gapic::Operation
def update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil) -> ::Gapic::Operation
Updates the settings of a BackupVault.
def update_backup_vault(request, options = nil) -> ::Gapic::Operation
update_backup_vault
via a request object, either of type
UpdateBackupVaultRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest, ::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 update_backup_vault(update_mask: nil, backup_vault: nil, request_id: nil, validate_only: nil, force: nil) -> ::Gapic::Operation
update_backup_vault
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the BackupVault resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.
- backup_vault (::Google::Cloud::BackupDR::V1::BackupVault, ::Hash) — Required. The resource being updated
-
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).
- validate_only (::Boolean) — Optional. Only validate the request, but do not perform mutations. The default is 'false'.
- force (::Boolean) — Optional. If set to true, will not check plan duration against backup vault enforcement duration.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::UpdateBackupVaultRequest.new # Call the update_backup_vault method. result = client.update_backup_vault 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
#update_data_source
def update_data_source(request, options = nil) -> ::Gapic::Operation
def update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) -> ::Gapic::Operation
Updates the settings of a DataSource.
def update_data_source(request, options = nil) -> ::Gapic::Operation
update_data_source
via a request object, either of type
UpdateDataSourceRequest or an equivalent Hash.
- request (::Google::Cloud::BackupDR::V1::UpdateDataSourceRequest, ::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 update_data_source(update_mask: nil, data_source: nil, request_id: nil, allow_missing: nil) -> ::Gapic::Operation
update_data_source
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).
- update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Field mask is used to specify the fields to be overwritten in the DataSource resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail.
- data_source (::Google::Cloud::BackupDR::V1::DataSource, ::Hash) — Required. The resource being updated
-
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).
- allow_missing (::Boolean) — Optional. Enable upsert.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC 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::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::BackupDR::V1::UpdateDataSourceRequest.new # Call the update_data_source method. result = client.update_data_source 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