BackupForGKEAsyncClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.gke_backup_v1.services.backup_for_gke.transports.base.BackupForGKETransport] = 'grpc_asyncio', client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
BackupForGKE allows Kubernetes administrators to configure, execute, and manage backup and restore operations for their GKE clusters.
Properties
transport
Returns the transport used by the client instance.
Returns | |
---|---|
Type | Description |
BackupForGKETransport | The transport used by the client instance. |
Methods
BackupForGKEAsyncClient
BackupForGKEAsyncClient(*, credentials: Optional[google.auth.credentials.Credentials] = None, transport: Union[str, google.cloud.gke_backup_v1.services.backup_for_gke.transports.base.BackupForGKETransport] = 'grpc_asyncio', client_options: Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)
Instantiates the backup for gke client.
Parameters | |
---|---|
Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Union[str,
The transport to use. If set to None, a transport is chosen automatically. |
client_options |
ClientOptions
Custom options for the client. It won't take effect if a |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTlsChannelError | If mutual TLS transport creation failed for any reason. |
backup_path
backup_path(project: str, location: str, backup_plan: str, backup: str)
Returns a fully-qualified backup string.
backup_plan_path
backup_plan_path(project: str, location: str, backup_plan: str)
Returns a fully-qualified backup_plan string.
cluster_path
cluster_path(project: str, location: str, cluster: str)
Returns a fully-qualified cluster string.
common_billing_account_path
common_billing_account_path(billing_account: str)
Returns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str)
Returns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str)
Returns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str)
Returns a fully-qualified organization string.
common_project_path
common_project_path(project: str)
Returns a fully-qualified project string.
create_backup
create_backup(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.CreateBackupRequest, dict]] = None, *, parent: Optional[str] = None, backup: Optional[google.cloud.gke_backup_v1.types.backup.Backup] = None, backup_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Creates a Backup for the given BackupPlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_create_backup():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.CreateBackupRequest(
parent="parent_value",
)
# Make the request
operation = client.create_backup(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.CreateBackupRequest, dict]]
The request object. Request message for CreateBackup. |
parent |
Required. The BackupPlan within which to create the Backup. Format: |
backup |
Backup
The Backup resource to create. This corresponds to the |
backup_id |
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 This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be Backup Represents a request to perform a single point-in-time capture of some portion of the state of a GKE cluster, the record of the backup operation itself, and an anchor for the underlying artifacts that comprise the Backup (the config backup and VolumeBackups). Next id: 28 |
create_backup_plan
create_backup_plan(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.CreateBackupPlanRequest, dict]] = None, *, parent: Optional[str] = None, backup_plan: Optional[google.cloud.gke_backup_v1.types.backup_plan.BackupPlan] = None, backup_plan_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Creates a new BackupPlan in a given location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_create_backup_plan():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
backup_plan = gke_backup_v1.BackupPlan()
backup_plan.cluster = "cluster_value"
request = gke_backup_v1.CreateBackupPlanRequest(
parent="parent_value",
backup_plan=backup_plan,
backup_plan_id="backup_plan_id_value",
)
# Make the request
operation = client.create_backup_plan(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.CreateBackupPlanRequest, dict]]
The request object. Request message for CreateBackupPlan. |
parent |
Required. The location within which to create the BackupPlan. Format: |
backup_plan |
BackupPlan
Required. The BackupPlan resource object to create. This corresponds to the |
backup_plan_id |
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 This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be BackupPlan Defines the configuration and scheduling for a "line" of Backups. |
create_restore
create_restore(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.CreateRestoreRequest, dict]] = None, *, parent: Optional[str] = None, restore: Optional[google.cloud.gke_backup_v1.types.restore.Restore] = None, restore_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Creates a new Restore for the given RestorePlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_create_restore():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
restore = gke_backup_v1.Restore()
restore.backup = "backup_value"
request = gke_backup_v1.CreateRestoreRequest(
parent="parent_value",
restore=restore,
restore_id="restore_id_value",
)
# Make the request
operation = client.create_restore(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.CreateRestoreRequest, dict]]
The request object. Request message for CreateRestore. |
parent |
Required. The RestorePlan within which to create the Restore. Format: |
restore |
Restore
Required. The restore resource to create. This corresponds to the |
restore_id |
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. This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be Restore Represents both a request to Restore some portion of a Backup into a target GKE cluster and a record of the restore operation itself. Next id: 18 |
create_restore_plan
create_restore_plan(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.CreateRestorePlanRequest, dict]] = None, *, parent: Optional[str] = None, restore_plan: Optional[google.cloud.gke_backup_v1.types.restore_plan.RestorePlan] = None, restore_plan_id: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Creates a new RestorePlan in a given location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_create_restore_plan():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
restore_plan = gke_backup_v1.RestorePlan()
restore_plan.backup_plan = "backup_plan_value"
restore_plan.cluster = "cluster_value"
restore_plan.restore_config.all_namespaces = True
request = gke_backup_v1.CreateRestorePlanRequest(
parent="parent_value",
restore_plan=restore_plan,
restore_plan_id="restore_plan_id_value",
)
# Make the request
operation = client.create_restore_plan(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.CreateRestorePlanRequest, dict]]
The request object. Request message for CreateRestorePlan. |
parent |
Required. The location within which to create the RestorePlan. Format: |
restore_plan |
RestorePlan
Required. The RestorePlan resource object to create. This corresponds to the |
restore_plan_id |
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 This corresponds to the |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be RestorePlan The configuration of a potential series of Restore operations to be performed against Backups belong to a particular BackupPlan. Next id: 11 |
crypto_key_path
crypto_key_path(project: str, location: str, key_ring: str, crypto_key: str)
Returns a fully-qualified crypto_key string.
delete_backup
delete_backup(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.DeleteBackupRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Deletes an existing Backup.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_delete_backup():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.DeleteBackupRequest(
name="name_value",
)
# Make the request
operation = client.delete_backup(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.DeleteBackupRequest, dict]]
The request object. Request message for DeleteBackup. |
name |
Required. Name of the Backup resource. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_backup_plan
delete_backup_plan(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.DeleteBackupPlanRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Deletes an existing BackupPlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_delete_backup_plan():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.DeleteBackupPlanRequest(
name="name_value",
)
# Make the request
operation = client.delete_backup_plan(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.DeleteBackupPlanRequest, dict]]
The request object. Request message for DeleteBackupPlan. |
name |
Required. Fully qualified BackupPlan name. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_restore
delete_restore(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.DeleteRestoreRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Deletes an existing Restore.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_delete_restore():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.DeleteRestoreRequest(
name="name_value",
)
# Make the request
operation = client.delete_restore(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.DeleteRestoreRequest, dict]]
The request object. Request message for DeleteRestore. |
name |
Required. Full name of the Restore Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
delete_restore_plan
delete_restore_plan(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.DeleteRestorePlanRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Deletes an existing RestorePlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_delete_restore_plan():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.DeleteRestorePlanRequest(
name="name_value",
)
# Make the request
operation = client.delete_restore_plan(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.DeleteRestorePlanRequest, dict]]
The request object. Request message for DeleteRestorePlan. |
name |
Required. Fully qualified RestorePlan name. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be google.protobuf.empty_pb2.Empty A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
BackupForGKEAsyncClient | The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)
Creates an instance of this client using the provided credentials info.
Parameter | |
---|---|
Name | Description |
info |
dict
The service account private key info. |
Returns | |
---|---|
Type | Description |
BackupForGKEAsyncClient | The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials file.
Parameter | |
---|---|
Name | Description |
filename |
str
The path to the service account private key json file. |
Returns | |
---|---|
Type | Description |
BackupForGKEAsyncClient | The constructed client. |
get_backup
get_backup(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.GetBackupRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Retrieve the details of a single Backup.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_get_backup():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.GetBackupRequest(
name="name_value",
)
# Make the request
response = await client.get_backup(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.GetBackupRequest, dict]]
The request object. Request message for GetBackup. |
name |
Required. Full name of the Backup resource. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.types.Backup | Represents a request to perform a single point-in-time capture of some portion of the state of a GKE cluster, the record of the backup operation itself, and an anchor for the underlying artifacts that comprise the Backup (the config backup and VolumeBackups). Next id: 28 |
get_backup_plan
get_backup_plan(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.GetBackupPlanRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Retrieve the details of a single BackupPlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_get_backup_plan():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.GetBackupPlanRequest(
name="name_value",
)
# Make the request
response = await client.get_backup_plan(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.GetBackupPlanRequest, dict]]
The request object. Request message for GetBackupPlan. |
name |
Required. Fully qualified BackupPlan name. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.types.BackupPlan | Defines the configuration and scheduling for a "line" of Backups. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: Optional[google.api_core.client_options.ClientOptions] = None,
)
Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source
is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint
if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE
environment variable is "always", use the
default mTLS endpoint; if the environment variabel is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
Parameter | |
---|---|
Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
Exceptions | |
---|---|
Type | Description |
google.auth.exceptions.MutualTLSChannelError | If any errors happen. |
Returns | |
---|---|
Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] | returns the API endpoint and the client cert source to use. |
get_restore
get_restore(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.GetRestoreRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Retrieves the details of a single Restore.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_get_restore():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.GetRestoreRequest(
name="name_value",
)
# Make the request
response = await client.get_restore(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.GetRestoreRequest, dict]]
The request object. Request message for GetRestore. |
name |
Required. Name of the restore resource. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.types.Restore | Represents both a request to Restore some portion of a Backup into a target GKE cluster and a record of the restore operation itself. Next id: 18 |
get_restore_plan
get_restore_plan(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.GetRestorePlanRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Retrieve the details of a single RestorePlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_get_restore_plan():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.GetRestorePlanRequest(
name="name_value",
)
# Make the request
response = await client.get_restore_plan(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.GetRestorePlanRequest, dict]]
The request object. Request message for GetRestorePlan. |
name |
Required. Fully qualified RestorePlan name. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.types.RestorePlan | The configuration of a potential series of Restore operations to be performed against Backups belong to a particular BackupPlan. Next id: 11 |
get_transport_class
get_transport_class()
Returns an appropriate transport class.
get_volume_backup
get_volume_backup(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.GetVolumeBackupRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Retrieve the details of a single VolumeBackup.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_get_volume_backup():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.GetVolumeBackupRequest(
name="name_value",
)
# Make the request
response = await client.get_volume_backup(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.GetVolumeBackupRequest, dict]]
The request object. Request message for GetVolumeBackup. |
name |
Required. Full name of the VolumeBackup resource. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.types.VolumeBackup | Represents the backup of a specific persistent volume as a component of a Backup - both the record of the operation and a pointer to the underlying storage-specific artifacts. Next id: 14 |
get_volume_restore
get_volume_restore(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.GetVolumeRestoreRequest, dict]] = None, *, name: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Retrieve the details of a single VolumeRestore.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_get_volume_restore():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.GetVolumeRestoreRequest(
name="name_value",
)
# Make the request
response = await client.get_volume_restore(request=request)
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.GetVolumeRestoreRequest, dict]]
The request object. Request message for GetVolumeRestore. |
name |
Required. Full name of the VolumeRestore resource. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.types.VolumeRestore | Represents the operation of restoring a volume from a VolumeBackup. Next id: 13 |
list_backup_plans
list_backup_plans(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.ListBackupPlansRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists BackupPlans in a given location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_list_backup_plans():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.ListBackupPlansRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_backup_plans(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.ListBackupPlansRequest, dict]]
The request object. Request message for ListBackupPlans. |
parent |
Required. The location that contains the BackupPlans to list. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupPlansAsyncPager | Response message for ListBackupPlans. Iterating over this object will yield results and resolve additional pages automatically. |
list_backups
list_backups(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.ListBackupsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists the Backups for a given BackupPlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_list_backups():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.ListBackupsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_backups(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.ListBackupsRequest, dict]]
The request object. Request message for ListBackups. |
parent |
Required. The BackupPlan that contains the Backups to list. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListBackupsAsyncPager | Response message for ListBackups. Iterating over this object will yield results and resolve additional pages automatically. |
list_restore_plans
list_restore_plans(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.ListRestorePlansRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists RestorePlans in a given location.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_list_restore_plans():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.ListRestorePlansRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_restore_plans(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.ListRestorePlansRequest, dict]]
The request object. Request message for ListRestorePlans. |
parent |
Required. The location that contains the RestorePlans to list. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestorePlansAsyncPager | Response message for ListRestorePlans. Iterating over this object will yield results and resolve additional pages automatically. |
list_restores
list_restores(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.ListRestoresRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists the Restores for a given RestorePlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_list_restores():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.ListRestoresRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_restores(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.ListRestoresRequest, dict]]
The request object. Request message for ListRestores. |
parent |
Required. The RestorePlan that contains the Restores to list. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListRestoresAsyncPager | Response message for ListRestores. Iterating over this object will yield results and resolve additional pages automatically. |
list_volume_backups
list_volume_backups(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.ListVolumeBackupsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists the VolumeBackups for a given Backup.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_list_volume_backups():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.ListVolumeBackupsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_volume_backups(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.ListVolumeBackupsRequest, dict]]
The request object. Request message for ListVolumeBackups. |
parent |
Required. The Backup that contains the VolumeBackups to list. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeBackupsAsyncPager | Response message for ListVolumeBackups. Iterating over this object will yield results and resolve additional pages automatically. |
list_volume_restores
list_volume_restores(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.ListVolumeRestoresRequest, dict]] = None, *, parent: Optional[str] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Lists the VolumeRestores for a given Restore.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_list_volume_restores():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
request = gke_backup_v1.ListVolumeRestoresRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_volume_restores(request=request)
# Handle the response
async for response in page_result:
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.ListVolumeRestoresRequest, dict]]
The request object. Request message for ListVolumeRestores. |
parent |
Required. The Restore that contains the VolumeRestores to list. Format: |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.cloud.gke_backup_v1.services.backup_for_gke.pagers.ListVolumeRestoresAsyncPager | Response message for ListVolumeRestores. Iterating over this object will yield results and resolve additional pages automatically. |
parse_backup_path
parse_backup_path(path: str)
Parses a backup path into its component segments.
parse_backup_plan_path
parse_backup_plan_path(path: str)
Parses a backup_plan path into its component segments.
parse_cluster_path
parse_cluster_path(path: str)
Parses a cluster path into its component segments.
parse_common_billing_account_path
parse_common_billing_account_path(path: str)
Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str)
Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str)
Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str)
Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str)
Parse a project path into its component segments.
parse_crypto_key_path
parse_crypto_key_path(path: str)
Parses a crypto_key path into its component segments.
parse_restore_path
parse_restore_path(path: str)
Parses a restore path into its component segments.
parse_restore_plan_path
parse_restore_plan_path(path: str)
Parses a restore_plan path into its component segments.
parse_volume_backup_path
parse_volume_backup_path(path: str)
Parses a volume_backup path into its component segments.
parse_volume_restore_path
parse_volume_restore_path(path: str)
Parses a volume_restore path into its component segments.
restore_path
restore_path(project: str, location: str, restore_plan: str, restore: str)
Returns a fully-qualified restore string.
restore_plan_path
restore_plan_path(project: str, location: str, restore_plan: str)
Returns a fully-qualified restore_plan string.
update_backup
update_backup(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.UpdateBackupRequest, dict]] = None, *, backup: Optional[google.cloud.gke_backup_v1.types.backup.Backup] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Update a Backup.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_update_backup():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
backup = gke_backup_v1.Backup()
backup.all_namespaces = True
request = gke_backup_v1.UpdateBackupRequest(
backup=backup,
)
# Make the request
operation = client.update_backup(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.UpdateBackupRequest, dict]]
The request object. Request message for UpdateBackup. |
backup |
Backup
Required. A new version of the Backup resource that contains updated fields. This may be sparsely populated if an |
update_mask |
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 |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be Backup Represents a request to perform a single point-in-time capture of some portion of the state of a GKE cluster, the record of the backup operation itself, and an anchor for the underlying artifacts that comprise the Backup (the config backup and VolumeBackups). Next id: 28 |
update_backup_plan
update_backup_plan(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.UpdateBackupPlanRequest, dict]] = None, *, backup_plan: Optional[google.cloud.gke_backup_v1.types.backup_plan.BackupPlan] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Update a BackupPlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_update_backup_plan():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
backup_plan = gke_backup_v1.BackupPlan()
backup_plan.cluster = "cluster_value"
request = gke_backup_v1.UpdateBackupPlanRequest(
backup_plan=backup_plan,
)
# Make the request
operation = client.update_backup_plan(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.UpdateBackupPlanRequest, dict]]
The request object. Request message for UpdateBackupPlan. |
backup_plan |
BackupPlan
Required. A new version of the BackupPlan resource that contains updated fields. This may be sparsely populated if an |
update_mask |
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 |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be BackupPlan Defines the configuration and scheduling for a "line" of Backups. |
update_restore
update_restore(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.UpdateRestoreRequest, dict]] = None, *, restore: Optional[google.cloud.gke_backup_v1.types.restore.Restore] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Update a Restore.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_update_restore():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
restore = gke_backup_v1.Restore()
restore.backup = "backup_value"
request = gke_backup_v1.UpdateRestoreRequest(
restore=restore,
)
# Make the request
operation = client.update_restore(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.UpdateRestoreRequest, dict]]
The request object. Request message for UpdateRestore. |
restore |
Restore
Required. A new version of the Restore resource that contains updated fields. This may be sparsely populated if an |
update_mask |
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 |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be Restore Represents both a request to Restore some portion of a Backup into a target GKE cluster and a record of the restore operation itself. Next id: 18 |
update_restore_plan
update_restore_plan(request: Optional[Union[google.cloud.gke_backup_v1.types.gkebackup.UpdateRestorePlanRequest, dict]] = None, *, restore_plan: Optional[google.cloud.gke_backup_v1.types.restore_plan.RestorePlan] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Union[google.api_core.retry.Retry, google.api_core.gapic_v1.method._MethodDefault] = <_MethodDefault._DEFAULT_VALUE: <object object>>, timeout: Union[float, object] = <_MethodDefault._DEFAULT_VALUE: <object object>>, metadata: Sequence[Tuple[str, str]] = ())
Update a RestorePlan.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import gke_backup_v1
async def sample_update_restore_plan():
# Create a client
client = gke_backup_v1.BackupForGKEAsyncClient()
# Initialize request argument(s)
restore_plan = gke_backup_v1.RestorePlan()
restore_plan.backup_plan = "backup_plan_value"
restore_plan.cluster = "cluster_value"
restore_plan.restore_config.all_namespaces = True
request = gke_backup_v1.UpdateRestorePlanRequest(
restore_plan=restore_plan,
)
# Make the request
operation = client.update_restore_plan(request=request)
print("Waiting for operation to complete...")
response = (await operation).result()
# Handle the response
print(response)
Parameters | |
---|---|
Name | Description |
request |
Optional[Union[google.cloud.gke_backup_v1.types.UpdateRestorePlanRequest, dict]]
The request object. Request message for UpdateRestorePlan. |
restore_plan |
RestorePlan
Required. A new version of the RestorePlan resource that contains updated fields. This may be sparsely populated if an |
update_mask |
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 |
retry |
google.api_core.retry.Retry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, str]]
Strings which should be sent along with the request as metadata. |
Returns | |
---|---|
Type | Description |
google.api_core.operation_async.AsyncOperation | An object representing a long-running operation. The result type for the operation will be RestorePlan The configuration of a potential series of Restore operations to be performed against Backups belong to a particular BackupPlan. Next id: 11 |
volume_backup_path
volume_backup_path(
project: str, location: str, backup_plan: str, backup: str, volume_backup: str
)
Returns a fully-qualified volume_backup string.
volume_restore_path
volume_restore_path(
project: str, location: str, restore_plan: str, restore: str, volume_restore: str
)
Returns a fully-qualified volume_restore string.