Backup for GKE V1 API - Class Google::Cloud::GkeBackup::V1::BackupForGKE::Client (v0.2.0)

Reference documentation and code samples for the Backup for GKE V1 API class Google::Cloud::GkeBackup::V1::BackupForGKE::Client.

Client for the BackupForGKE service.

BackupForGKE allows Kubernetes administrators to configure, execute, and manage backup and restore operations for their GKE clusters.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the BackupForGKE Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all BackupForGKE clients
::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the BackupForGKE 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.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#create_backup

def create_backup(request, options = nil) -> ::Gapic::Operation
def create_backup(parent: nil, backup: nil, backup_id: nil) -> ::Gapic::Operation

Creates a Backup for the given BackupPlan.

Overloads
def create_backup(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_backup via a request object, either of type CreateBackupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::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(parent: nil, backup: nil, backup_id: nil) -> ::Gapic::Operation
Pass arguments to create_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).
Parameters
  • parent (::String) — Required. The BackupPlan within which to create the Backup. Format: projects//locations//backupPlans/*
  • backup (::Google::Cloud::GkeBackup::V1::Backup, ::Hash) — The Backup resource to create.
  • backup_id (::String) —

    The client-provided short name for the Backup resource. This name must:

    • be between 1 and 63 characters long (inclusive)
    • consist of only lower-case ASCII letters, numbers, and dashes
    • start with a lower-case letter
    • end with a lower-case letter or number
    • be unique within the set of Backups in this BackupPlan
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new

# Call the create_backup method.
result = client.create_backup request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_backup_plan

def create_backup_plan(request, options = nil) -> ::Gapic::Operation
def create_backup_plan(parent: nil, backup_plan: nil, backup_plan_id: nil) -> ::Gapic::Operation

Creates a new BackupPlan in a given location.

Overloads
def create_backup_plan(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_backup_plan via a request object, either of type CreateBackupPlanRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::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: nil, backup_plan_id: nil) -> ::Gapic::Operation
Pass arguments to 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).
Parameters
  • parent (::String) — Required. The location within which to create the BackupPlan. Format: projects//locations/
  • backup_plan (::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash) — Required. The BackupPlan resource object to create.
  • backup_plan_id (::String) —

    Required. The client-provided short name for the BackupPlan resource. This name must:

    • be between 1 and 63 characters long (inclusive)
    • consist of only lower-case ASCII letters, numbers, and dashes
    • start with a lower-case letter
    • end with a lower-case letter or number
    • be unique within the set of BackupPlans in this location
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::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 this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_restore

def create_restore(request, options = nil) -> ::Gapic::Operation
def create_restore(parent: nil, restore: nil, restore_id: nil) -> ::Gapic::Operation

Creates a new Restore for the given RestorePlan.

Overloads
def create_restore(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_restore via a request object, either of type CreateRestoreRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, ::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_restore(parent: nil, restore: nil, restore_id: nil) -> ::Gapic::Operation
Pass arguments to create_restore 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).
Parameters
  • parent (::String) — Required. The RestorePlan within which to create the Restore. Format: projects//locations//restorePlans/*
  • restore (::Google::Cloud::GkeBackup::V1::Restore, ::Hash) — Required. The restore resource to create.
  • restore_id (::String) —

    Required. The client-provided short name for the Restore resource. This name must:

    • be between 1 and 63 characters long (inclusive)
    • consist of only lower-case ASCII letters, numbers, and dashes
    • start with a lower-case letter
    • end with a lower-case letter or number
    • be unique within the set of Restores in this RestorePlan.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new

# Call the create_restore method.
result = client.create_restore request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#create_restore_plan

def create_restore_plan(request, options = nil) -> ::Gapic::Operation
def create_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil) -> ::Gapic::Operation

Creates a new RestorePlan in a given location.

Overloads
def create_restore_plan(request, options = nil) -> ::Gapic::Operation
Pass arguments to create_restore_plan via a request object, either of type CreateRestorePlanRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::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_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil) -> ::Gapic::Operation
Pass arguments to create_restore_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).
Parameters
  • parent (::String) — Required. The location within which to create the RestorePlan. Format: projects//locations/
  • restore_plan (::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash) — Required. The RestorePlan resource object to create.
  • restore_plan_id (::String) —

    Required. The client-provided short name for the RestorePlan resource. This name must:

    • be between 1 and 63 characters long (inclusive)
    • consist of only lower-case ASCII letters, numbers, and dashes
    • start with a lower-case letter
    • end with a lower-case letter or number
    • be unique within the set of RestorePlans in this location
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new

# Call the create_restore_plan method.
result = client.create_restore_plan request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_backup

def delete_backup(request, options = nil) -> ::Gapic::Operation
def delete_backup(name: nil, etag: nil, force: nil) -> ::Gapic::Operation

Deletes an existing Backup.

Overloads
def delete_backup(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_backup via a request object, either of type DeleteBackupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::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, etag: nil, force: nil) -> ::Gapic::Operation
Pass arguments to 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).
Parameters
  • name (::String) — Required. Name of the Backup resource. Format: projects//locations//backupPlans//backups/
  • etag (::String) — If provided, this value must match the current value of the target Backup's etag field or the request is rejected.
  • force (::Boolean) — If set to true, any VolumeBackups below this Backup will also be deleted. Otherwise, the request will only succeed if the Backup has no VolumeBackups.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new

# Call the delete_backup method.
result = client.delete_backup request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_backup_plan

def delete_backup_plan(request, options = nil) -> ::Gapic::Operation
def delete_backup_plan(name: nil, etag: nil) -> ::Gapic::Operation

Deletes an existing BackupPlan.

Overloads
def delete_backup_plan(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_backup_plan via a request object, either of type DeleteBackupPlanRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::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, etag: nil) -> ::Gapic::Operation
Pass arguments to 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).
Parameters
  • name (::String) — Required. Fully qualified BackupPlan name. Format: projects//locations//backupPlans/*
  • etag (::String) — If provided, this value must match the current value of the target BackupPlan's etag field or the request is rejected.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::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 this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_restore

def delete_restore(request, options = nil) -> ::Gapic::Operation
def delete_restore(name: nil, etag: nil, force: nil) -> ::Gapic::Operation

Deletes an existing Restore.

Overloads
def delete_restore(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_restore via a request object, either of type DeleteRestoreRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, ::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_restore(name: nil, etag: nil, force: nil) -> ::Gapic::Operation
Pass arguments to delete_restore 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).
Parameters
  • name (::String) — Required. Full name of the Restore Format: projects//locations//restorePlans//restores/
  • etag (::String) — If provided, this value must match the current value of the target Restore's etag field or the request is rejected.
  • force (::Boolean) — If set to true, any VolumeRestores below this restore will also be deleted. Otherwise, the request will only succeed if the restore has no VolumeRestores.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new

# Call the delete_restore method.
result = client.delete_restore request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#delete_restore_plan

def delete_restore_plan(request, options = nil) -> ::Gapic::Operation
def delete_restore_plan(name: nil, etag: nil, force: nil) -> ::Gapic::Operation

Deletes an existing RestorePlan.

Overloads
def delete_restore_plan(request, options = nil) -> ::Gapic::Operation
Pass arguments to delete_restore_plan via a request object, either of type DeleteRestorePlanRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::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_restore_plan(name: nil, etag: nil, force: nil) -> ::Gapic::Operation
Pass arguments to delete_restore_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).
Parameters
  • name (::String) — Required. Fully qualified RestorePlan name. Format: projects//locations//restorePlans/*
  • etag (::String) — If provided, this value must match the current value of the target RestorePlan's etag field or the request is rejected.
  • force (::Boolean) — If set to true, any Restores below this RestorePlan will also be deleted. Otherwise, the request will only succeed if the RestorePlan has no Restores.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new

# Call the delete_restore_plan method.
result = client.delete_restore_plan request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#get_backup

def get_backup(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::Backup
def get_backup(name: nil) -> ::Google::Cloud::GkeBackup::V1::Backup

Retrieve the details of a single Backup.

Overloads
def get_backup(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::Backup
Pass arguments to get_backup via a request object, either of type GetBackupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::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) -> ::Google::Cloud::GkeBackup::V1::Backup
Pass arguments to 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).
Parameter
  • name (::String) — Required. Full name of the Backup resource. Format: projects//locations//backupPlans//backups/
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new

# Call the get_backup method.
result = client.get_backup request

# The returned object is of type Google::Cloud::GkeBackup::V1::Backup.
p result

#get_backup_plan

def get_backup_plan(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::BackupPlan
def get_backup_plan(name: nil) -> ::Google::Cloud::GkeBackup::V1::BackupPlan

Retrieve the details of a single BackupPlan.

Overloads
def get_backup_plan(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::BackupPlan
Pass arguments to get_backup_plan via a request object, either of type GetBackupPlanRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::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::GkeBackup::V1::BackupPlan
Pass arguments to 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).
Parameter
  • name (::String) — Required. Fully qualified BackupPlan name. Format: projects//locations//backupPlans/*
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new

# Call the get_backup_plan method.
result = client.get_backup_plan request

# The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlan.
p result

#get_restore

def get_restore(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::Restore
def get_restore(name: nil) -> ::Google::Cloud::GkeBackup::V1::Restore

Retrieves the details of a single Restore.

Overloads
def get_restore(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::Restore
Pass arguments to get_restore via a request object, either of type GetRestoreRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::GetRestoreRequest, ::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_restore(name: nil) -> ::Google::Cloud::GkeBackup::V1::Restore
Pass arguments to get_restore 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).
Parameter
  • name (::String) — Required. Name of the restore resource. Format: projects//locations//restorePlans//restores/
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::GetRestoreRequest.new

# Call the get_restore method.
result = client.get_restore request

# The returned object is of type Google::Cloud::GkeBackup::V1::Restore.
p result

#get_restore_plan

def get_restore_plan(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::RestorePlan
def get_restore_plan(name: nil) -> ::Google::Cloud::GkeBackup::V1::RestorePlan

Retrieve the details of a single RestorePlan.

Overloads
def get_restore_plan(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::RestorePlan
Pass arguments to get_restore_plan via a request object, either of type GetRestorePlanRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::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_restore_plan(name: nil) -> ::Google::Cloud::GkeBackup::V1::RestorePlan
Pass arguments to get_restore_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).
Parameter
  • name (::String) — Required. Fully qualified RestorePlan name. Format: projects//locations//restorePlans/*
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new

# Call the get_restore_plan method.
result = client.get_restore_plan request

# The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan.
p result

#get_volume_backup

def get_volume_backup(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::VolumeBackup
def get_volume_backup(name: nil) -> ::Google::Cloud::GkeBackup::V1::VolumeBackup

Retrieve the details of a single VolumeBackup.

Overloads
def get_volume_backup(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::VolumeBackup
Pass arguments to get_volume_backup via a request object, either of type GetVolumeBackupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::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_volume_backup(name: nil) -> ::Google::Cloud::GkeBackup::V1::VolumeBackup
Pass arguments to get_volume_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).
Parameter
  • name (::String) — Required. Full name of the VolumeBackup resource. Format: projects//locations//backupPlans//backups//volumeBackups/*
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new

# Call the get_volume_backup method.
result = client.get_volume_backup request

# The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup.
p result

#get_volume_restore

def get_volume_restore(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::VolumeRestore
def get_volume_restore(name: nil) -> ::Google::Cloud::GkeBackup::V1::VolumeRestore

Retrieve the details of a single VolumeRestore.

Overloads
def get_volume_restore(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::VolumeRestore
Pass arguments to get_volume_restore via a request object, either of type GetVolumeRestoreRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, ::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_volume_restore(name: nil) -> ::Google::Cloud::GkeBackup::V1::VolumeRestore
Pass arguments to get_volume_restore 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).
Parameter
  • name (::String) — Required. Full name of the VolumeRestore resource. Format: projects//locations//restorePlans//restores//volumeRestores/*
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new

# Call the get_volume_restore method.
result = client.get_volume_restore request

# The returned object is of type Google::Cloud::GkeBackup::V1::VolumeRestore.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new BackupForGKE client object.

Yields
  • (config) — Configure the BackupForGKE client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config|
  config.timeout = 10.0
end

#list_backup_plans

def list_backup_plans(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>
def list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>

Lists BackupPlans in a given location.

Overloads
def list_backup_plans(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>
Pass arguments to list_backup_plans via a request object, either of type ListBackupPlansRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::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::GkeBackup::V1::BackupPlan>
Pass arguments to 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).
Parameters
  • parent (::String) — Required. The location that contains the BackupPlans to list. Format: projects//locations/
  • page_size (::Integer) — The target number of results to return in a single response. If not specified, a default value will be chosen by the service. Note that the response may inclue 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) — 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 to ListBackupPlans must match the call that provided the page token.
  • filter (::String) — Field match expression used to filter the results.
  • order_by (::String) — Field by which to sort the results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::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 all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan.
  p response
end

#list_backups

def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>
def list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>

Lists the Backups for a given BackupPlan.

Overloads
def list_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>
Pass arguments to list_backups via a request object, either of type ListBackupsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::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) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>
Pass arguments to 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).
Parameters
  • parent (::String) — Required. The BackupPlan that contains the Backups to list. Format: projects//locations//backupPlans/*
  • page_size (::Integer) — The target number of results to return in a single response. If not specified, a default value will be chosen by the service. Note that the response may inclue 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) — The value of next_page_token received from a previous ListBackups call. Provide this to retrieve the subsequent page in a multi-page list of results. When paginating, all other parameters provided to ListBackups must match the call that provided the page token.
  • filter (::String) — Field match expression used to filter the results.
  • order_by (::String) — Field by which to sort the results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::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 all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup.
  p response
end

#list_restore_plans

def list_restore_plans(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>
def list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>

Lists RestorePlans in a given location.

Overloads
def list_restore_plans(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>
Pass arguments to list_restore_plans via a request object, either of type ListRestorePlansRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::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_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>
Pass arguments to list_restore_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).
Parameters
  • parent (::String) — Required. The location that contains the RestorePlans to list. Format: projects//locations/
  • page_size (::Integer) — The target number of results to return in a single response. If not specified, a default value will be chosen by the service. Note that the response may inclue 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) — The value of next_page_token received from a previous ListRestorePlans call. Provide this to retrieve the subsequent page in a multi-page list of results. When paginating, all other parameters provided to ListRestorePlans must match the call that provided the page token.
  • filter (::String) — Field match expression used to filter the results.
  • order_by (::String) — Field by which to sort the results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new

# Call the list_restore_plans method.
result = client.list_restore_plans request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan.
  p response
end

#list_restores

def list_restores(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>
def list_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>

Lists the Restores for a given RestorePlan.

Overloads
def list_restores(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>
Pass arguments to list_restores via a request object, either of type ListRestoresRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::ListRestoresRequest, ::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_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>
Pass arguments to list_restores 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).
Parameters
  • parent (::String) — Required. The RestorePlan that contains the Restores to list. Format: projects//locations//restorePlans/*
  • page_size (::Integer) — The target number of results to return in a single response. If not specified, a default value will be chosen by the service. Note that the response may inclue 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) — The value of next_page_token received from a previous ListRestores call. Provide this to retrieve the subsequent page in a multi-page list of results. When paginating, all other parameters provided to ListRestores must match the call that provided the page token.
  • filter (::String) — Field match expression used to filter the results.
  • order_by (::String) — Field by which to sort the results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::ListRestoresRequest.new

# Call the list_restores method.
result = client.list_restores request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore.
  p response
end

#list_volume_backups

def list_volume_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>
def list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>

Lists the VolumeBackups for a given Backup.

Overloads
def list_volume_backups(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>
Pass arguments to list_volume_backups via a request object, either of type ListVolumeBackupsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::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_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>
Pass arguments to list_volume_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).
Parameters
  • parent (::String) — Required. The Backup that contains the VolumeBackups to list. Format: projects//locations//backupPlans//backups/
  • page_size (::Integer) — The target number of results to return in a single response. If not specified, a default value will be chosen by the service. Note that the response may inclue 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) — The value of next_page_token received from a previous ListVolumeBackups call. Provide this to retrieve the subsequent page in a multi-page list of results. When paginating, all other parameters provided to ListVolumeBackups must match the call that provided the page token.
  • filter (::String) — Field match expression used to filter the results.
  • order_by (::String) — Field by which to sort the results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new

# Call the list_volume_backups method.
result = client.list_volume_backups request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup.
  p response
end

#list_volume_restores

def list_volume_restores(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>
def list_volume_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>

Lists the VolumeRestores for a given Restore.

Overloads
def list_volume_restores(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>
Pass arguments to list_volume_restores via a request object, either of type ListVolumeRestoresRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, ::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_volume_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>
Pass arguments to list_volume_restores 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).
Parameters
  • parent (::String) — Required. The Restore that contains the VolumeRestores to list. Format: projects//locations//restorePlans//restores/
  • page_size (::Integer) — The target number of results to return in a single response. If not specified, a default value will be chosen by the service. Note that the response may inclue 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) — The value of next_page_token received from a previous ListVolumeRestores call. Provide this to retrieve the subsequent page in a multi-page list of results. When paginating, all other parameters provided to ListVolumeRestores must match the call that provided the page token.
  • filter (::String) — Field match expression used to filter the results.
  • order_by (::String) — Field by which to sort the results.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.new

# Call the list_volume_restores method.
result = client.list_volume_restores request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore.
  p response
end

#operations_client

def operations_client() -> ::Google::Cloud::GkeBackup::V1::BackupForGKE::Operations

Get the associated client for long-running operations.

#update_backup

def update_backup(request, options = nil) -> ::Gapic::Operation
def update_backup(backup: nil, update_mask: nil) -> ::Gapic::Operation

Update a Backup.

Overloads
def update_backup(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_backup via a request object, either of type UpdateBackupRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::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(backup: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to 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).
Parameters
  • backup (::Google::Cloud::GkeBackup::V1::Backup, ::Hash) — Required. A new version of the Backup resource that contains updated fields. This may be sparsely populated if an update_mask is provided.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — This is used to specify the fields to be overwritten in the Backup targeted for update. The values for each of these updated fields will be taken from the backup_plan provided with this request. Field names are relative to the root of the resource. If no update_mask is provided, all fields in backup will be written to the target Backup resource. Note that OUTPUT_ONLY and IMMUTABLE fields in backup are ignored and are not used to update the target Backup.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new

# Call the update_backup method.
result = client.update_backup request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#update_backup_plan

def update_backup_plan(request, options = nil) -> ::Gapic::Operation
def update_backup_plan(backup_plan: nil, update_mask: nil) -> ::Gapic::Operation

Update a BackupPlan.

Overloads
def update_backup_plan(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_backup_plan via a request object, either of type UpdateBackupPlanRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, ::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_plan(backup_plan: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_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).
Parameters
  • backup_plan (::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash) — Required. A new version of the BackupPlan resource that contains updated fields. This may be sparsely populated if an update_mask is provided.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — This is used to specify the fields to be overwritten in the BackupPlan targeted for update. The values for each of these updated fields will be taken from the backup_plan provided with this request. Field names are relative to the root of the resource (e.g., description, backup_config.include_volume_data, etc.) If no update_mask is provided, all fields in backup_plan will be written to the target BackupPlan resource. Note that OUTPUT_ONLY and IMMUTABLE fields in backup_plan are ignored and are not used to update the target BackupPlan.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new

# Call the update_backup_plan method.
result = client.update_backup_plan request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#update_restore

def update_restore(request, options = nil) -> ::Gapic::Operation
def update_restore(restore: nil, update_mask: nil) -> ::Gapic::Operation

Update a Restore.

Overloads
def update_restore(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_restore via a request object, either of type UpdateRestoreRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, ::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_restore(restore: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_restore 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).
Parameters
  • restore (::Google::Cloud::GkeBackup::V1::Restore, ::Hash) — Required. A new version of the Restore resource that contains updated fields. This may be sparsely populated if an update_mask is provided.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — This is used to specify the fields to be overwritten in the Restore targeted for update. The values for each of these updated fields will be taken from the restore provided with this request. Field names are relative to the root of the resource. If no update_mask is provided, all fields in restore will be written to the target Restore resource. Note that OUTPUT_ONLY and IMMUTABLE fields in restore are ignored and are not used to update the target Restore.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new

# Call the update_restore method.
result = client.update_restore request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end

#update_restore_plan

def update_restore_plan(request, options = nil) -> ::Gapic::Operation
def update_restore_plan(restore_plan: nil, update_mask: nil) -> ::Gapic::Operation

Update a RestorePlan.

Overloads
def update_restore_plan(request, options = nil) -> ::Gapic::Operation
Pass arguments to update_restore_plan via a request object, either of type UpdateRestorePlanRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::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_restore_plan(restore_plan: nil, update_mask: nil) -> ::Gapic::Operation
Pass arguments to update_restore_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).
Parameters
  • restore_plan (::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash) — Required. A new version of the RestorePlan resource that contains updated fields. This may be sparsely populated if an update_mask is provided.
  • update_mask (::Google::Protobuf::FieldMask, ::Hash) — This is used to specify the fields to be overwritten in the RestorePlan targeted for update. The values for each of these updated fields will be taken from the restore_plan provided with this request. Field names are relative to the root of the resource. If no update_mask is provided, all fields in restore_plan will be written to the target RestorePlan resource. Note that OUTPUT_ONLY and IMMUTABLE fields in restore_plan are ignored and are not used to update the target RestorePlan.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
  • response (::Gapic::Operation)
  • operation (::GRPC::ActiveCall::Operation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/gke_backup/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new

# Call the update_restore_plan method.
result = client.update_restore_plan request

# The returned object is of type Gapic::Operation. You can use this
# object to check the status of an operation, cancel it, or wait
# for results. Here is how to block until completion:
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "Error!"
end