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

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

REST 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::Rest::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) — Optional. The Backup resource to create.
  • backup_id (::String) —

    Optional. 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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

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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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, 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) — Optional. If provided, this value must match the current value of the target Backup's etag field or the request is rejected.
  • force (::Boolean) — Optional. 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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, 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) — Optional. If provided, this value must match the current value of the target BackupPlan's etag field or the request is rejected.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_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) — Optional. If provided, this value must match the current value of the target Restore's etag field or the request is rejected.
  • force (::Boolean) — Optional. 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_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) — Optional. If provided, this value must match the current value of the target RestorePlan's etag field or the request is rejected.
  • force (::Boolean) — Optional. 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

#get_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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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_index_download_url

def get_backup_index_download_url(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse
def get_backup_index_download_url(backup: nil) -> ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse

Retrieve the link to the backupIndex.

Overloads
def get_backup_index_download_url(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse
Pass arguments to get_backup_index_download_url via a request object, either of type GetBackupIndexDownloadUrlRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, ::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_index_download_url(backup: nil) -> ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse
Pass arguments to get_backup_index_download_url 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
  • backup (::String) — Required. Full name of Backup resource. Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::Client.new

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

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

# The returned object is of type Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse.
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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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

#iam_policy_client

def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Rest::Client

Get the associated client for mix-in of the IAMPolicy.

Returns
  • (Google::Iam::V1::IAMPolicy::Rest::Client)

#initialize

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

Create a new BackupForGKE REST 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::Rest::Client.new

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

#list_backup_plans

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

Lists BackupPlans in a given location.

Overloads
def list_backup_plans(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse
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) -> ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse
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) — Optional. 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 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 to ListBackupPlans 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.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan.
  p item
end

#list_backups

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

Lists the Backups for a given BackupPlan.

Overloads
def list_backups(request, options = nil) -> ::Gapic::Rest::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::Rest::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) — Optional. 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 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 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) — Optional. Field match expression used to filter the results.
  • order_by (::String) — Optional. Field by which to sort the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup.
  p item
end

#list_restore_plans

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

Lists RestorePlans in a given location.

Overloads
def list_restore_plans(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse
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) -> ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse
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) — Optional. 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 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 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) — Optional. Field match expression used to filter the results.
  • order_by (::String) — Optional. Field by which to sort the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan.
  p item
end

#list_restores

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

Lists the Restores for a given RestorePlan.

Overloads
def list_restores(request, options = nil) -> ::Google::Cloud::GkeBackup::V1::ListRestoresResponse
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) -> ::Google::Cloud::GkeBackup::V1::ListRestoresResponse
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) — Optional. 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 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 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) — Optional. Field match expression used to filter the results.
  • order_by (::String) — Optional. Field by which to sort the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore.
  p item
end

#list_volume_backups

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

Lists the VolumeBackups for a given Backup.

Overloads
def list_volume_backups(request, options = nil) -> ::Gapic::Rest::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::Rest::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) — Optional. 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 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 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) — Optional. Field match expression used to filter the results.
  • order_by (::String) — Optional. Field by which to sort the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup.
  p item
end

#list_volume_restores

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

Lists the VolumeRestores for a given Restore.

Overloads
def list_volume_restores(request, options = nil) -> ::Gapic::Rest::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::Rest::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) — Optional. 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 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 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) — Optional. Field match expression used to filter the results.
  • order_by (::String) — Optional. Field by which to sort the results.
Yields
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore.
  p item
end

#location_client

def location_client() -> Google::Cloud::Location::Locations::Rest::Client

Get the associated client for mix-in of the Locations.

Returns
  • (Google::Cloud::Location::Locations::Rest::Client)

#operations_client

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

Get the associated client for long-running operations.

#universe_domain

def universe_domain() -> String

The effective universe domain

Returns
  • (String)

#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) — Optional. 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_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) — Optional. 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_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) — Optional. 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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_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) — Optional. 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
  • (result, operation) — Access the result along with the TransportOperation object
Yield Parameters
  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)
Returns
  • (::Gapic::Operation)
Raises
  • (::Google::Cloud::Error) — if the REST call 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::Rest::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 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