BackupDRAsyncClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.backupdr_v1beta.services.backup_dr.transports.base.BackupDRTransport,
typing.Callable[
[...],
google.cloud.backupdr_v1beta.services.backup_dr.transports.base.BackupDRTransport,
],
]
] = "grpc_asyncio",
client_options: typing.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
)The BackupDR Service
Properties
api_endpoint
Return the API endpoint used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The API endpoint used by the client instance. |
transport
Returns the transport used by the client instance.
| Returns | |
|---|---|
| Type | Description |
BackupDRTransport |
The transport used by the client instance. |
universe_domain
Return the universe domain used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The universe domain used by the client instance. |
Methods
BackupDRAsyncClient
BackupDRAsyncClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.backupdr_v1beta.services.backup_dr.transports.base.BackupDRTransport,
typing.Callable[
[...],
google.cloud.backupdr_v1beta.services.backup_dr.transports.base.BackupDRTransport,
],
]
] = "grpc_asyncio",
client_options: typing.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
)Instantiates the backup dr async 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 |
Optional[Union[str,BackupDRTransport,Callable[..., BackupDRTransport]]]
The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the BackupDRTransport constructor. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. 1. The |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTlsChannelError |
If mutual TLS transport creation failed for any reason. |
applied_auto_protection_policy_path
applied_auto_protection_policy_path(
project: str, location: str, applied_auto_protection_policy: str
) -> strReturns a fully-qualified applied_auto_protection_policy string.
auto_protection_policy_binding_path
auto_protection_policy_binding_path(
project: str, location: str, auto_protection_policy: str, binding: str
) -> strReturns a fully-qualified auto_protection_policy_binding string.
auto_protection_policy_path
auto_protection_policy_path(
project: str, location: str, auto_protection_policy: str
) -> strReturns a fully-qualified auto_protection_policy string.
backup_path
backup_path(
project: str, location: str, backupvault: str, datasource: str, backup: str
) -> strReturns a fully-qualified backup string.
backup_plan_association_path
backup_plan_association_path(
project: str, location: str, backup_plan_association: str
) -> strReturns a fully-qualified backup_plan_association string.
backup_plan_path
backup_plan_path(project: str, location: str, backup_plan: str) -> strReturns a fully-qualified backup_plan string.
backup_plan_revision_path
backup_plan_revision_path(
project: str, location: str, backup_plan: str, revision: str
) -> strReturns a fully-qualified backup_plan_revision string.
backup_vault_path
backup_vault_path(project: str, location: str, backupvault: str) -> strReturns a fully-qualified backup_vault string.
binding_matching_resource_path
binding_matching_resource_path(
project: str,
location: str,
auto_protection_policy: str,
binding: str,
matching_resource: str,
) -> strReturns a fully-qualified binding_matching_resource string.
cancel_operation
cancel_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.CancelOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NoneStarts asynchronous cancellation on a long-running operation.
The server makes a best effort to cancel the operation, but success
is not guaranteed. If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
cluster_path
cluster_path(project: str, location: str, cluster: str) -> strReturns a fully-qualified cluster string.
common_billing_account_path
common_billing_account_path(billing_account: str) -> strReturns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> strReturns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> strReturns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> strReturns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> strReturns a fully-qualified project string.
create_auto_protection_policy
create_auto_protection_policy(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicy.CreateAutoProtectionPolicyRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
auto_protection_policy: typing.Optional[
google.cloud.backupdr_v1beta.types.autoprotectionpolicy.AutoProtectionPolicy
] = None,
auto_protection_policy_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationCreates a new AutoProtectionPolicy in a given project and 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 backupdr_v1beta
async def sample_create_auto_protection_policy():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
auto_protection_policy = backupdr_v1beta.AutoProtectionPolicy()
auto_protection_policy.backup_plan_details.resource_type = "resource_type_value"
auto_protection_policy.backup_plan_details.backup_plan = "backup_plan_value"
auto_protection_policy.criteria.matching_conditions.label_condition.key = "key_value"
auto_protection_policy.criteria.matching_conditions.label_condition.values = ['values_value1', 'values_value2']
request = backupdr_v1beta.CreateAutoProtectionPolicyRequest(
parent="parent_value",
auto_protection_policy_id="auto_protection_policy_id_value",
auto_protection_policy=auto_protection_policy,
)
# Make the request
operation = await client.create_auto_protection_policy(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.backupdr_v1beta.types.CreateAutoProtectionPolicyRequest, dict]]
The request object. Request message for creating an AutoProtectionPolicy. |
parent |
Required. The parent resource where this policy will be created. Format: projects/{project}/locations/{location} This corresponds to the |
auto_protection_policy |
AutoProtectionPolicy
Required. The AutoProtectionPolicy resource to create. This corresponds to the |
auto_protection_policy_id |
Required. The ID to use for the policy. This will become the final component of the policy's resource name. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be AutoProtectionPolicy An AutoprotectionPolicy is a policy resource designed to automate backup management, moving from manual per-resource protection to a bulk approach. The policy dynamically discovers and applies a specified backup plan to all eligible resources that match its defined scope and criteria. |
create_auto_protection_policy_binding
create_auto_protection_policy_binding(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicybinding.CreateAutoProtectionPolicyBindingRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
auto_protection_policy_binding: typing.Optional[
google.cloud.backupdr_v1beta.types.autoprotectionpolicybinding.AutoProtectionPolicyBinding
] = None,
auto_protection_policy_binding_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationCreates a new AutoProtectionPolicyBinding in a given project and 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 backupdr_v1beta
async def sample_create_auto_protection_policy_binding():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
auto_protection_policy_binding = backupdr_v1beta.AutoProtectionPolicyBinding()
auto_protection_policy_binding.scope = "scope_value"
request = backupdr_v1beta.CreateAutoProtectionPolicyBindingRequest(
parent="parent_value",
auto_protection_policy_binding_id="auto_protection_policy_binding_id_value",
auto_protection_policy_binding=auto_protection_policy_binding,
)
# Make the request
operation = await client.create_auto_protection_policy_binding(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.backupdr_v1beta.types.CreateAutoProtectionPolicyBindingRequest, dict]]
The request object. Request message for creating an AutoProtectionPolicyBinding. |
parent |
Required. The parent resource where this binding will be created. Format: projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} This corresponds to the |
auto_protection_policy_binding |
AutoProtectionPolicyBinding
Required. The AutoProtectionPolicyBinding resource to create. This corresponds to the |
auto_protection_policy_binding_id |
Required. The ID to use for the binding. This will become the final component of the binding's resource name. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be AutoProtectionPolicyBinding An AutoprotectionPolicyBinding (APPA) acts as the bridge between an AutoprotectionPolicy and the scope (Project, Folder, or Organization) where the policy should be applied. |
create_backup_plan
create_backup_plan(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplan.CreateBackupPlanRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
backup_plan: typing.Optional[
google.cloud.backupdr_v1beta.types.backupplan.BackupPlan
] = None,
backup_plan_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationCreate 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 backupdr_v1beta
async def sample_create_backup_plan():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
backup_plan = backupdr_v1beta.BackupPlan()
backup_plan.resource_type = "resource_type_value"
backup_plan.backup_vault = "backup_vault_value"
request = backupdr_v1beta.CreateBackupPlanRequest(
parent="parent_value",
backup_plan_id="backup_plan_id_value",
backup_plan=backup_plan,
)
# Make the request
operation = await 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.backupdr_v1beta.types.CreateBackupPlanRequest, dict]]
The request object. The request message for creating a |
parent |
Required. The |
backup_plan |
BackupPlan
Required. The |
backup_plan_id |
Required. The name of the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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 A BackupPlan specifies some common fields, such as description as well as one or more BackupRule messages. Each BackupRule has a retention policy and defines a schedule by which the system is to perform backup workloads. |
create_backup_plan_association
create_backup_plan_association(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplanassociation.CreateBackupPlanAssociationRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
backup_plan_association: typing.Optional[
google.cloud.backupdr_v1beta.types.backupplanassociation.BackupPlanAssociation
] = None,
backup_plan_association_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationCreate a BackupPlanAssociation
# 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 backupdr_v1beta
async def sample_create_backup_plan_association():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
backup_plan_association = backupdr_v1beta.BackupPlanAssociation()
backup_plan_association.resource_type = "resource_type_value"
backup_plan_association.resource = "resource_value"
backup_plan_association.backup_plan = "backup_plan_value"
request = backupdr_v1beta.CreateBackupPlanAssociationRequest(
parent="parent_value",
backup_plan_association_id="backup_plan_association_id_value",
backup_plan_association=backup_plan_association,
)
# Make the request
operation = await client.create_backup_plan_association(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.backupdr_v1beta.types.CreateBackupPlanAssociationRequest, dict]]
The request object. Request message for creating a backup plan. |
parent |
Required. The backup plan association project and location in the format |
backup_plan_association |
BackupPlanAssociation
Required. The resource being created This corresponds to the |
backup_plan_association_id |
Required. The name of the backup plan association to create. The name must be unique for the specified project and location. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be BackupPlanAssociation A BackupPlanAssociation represents a single BackupPlanAssociation which contains details like workload, backup plan etc |
create_backup_vault
create_backup_vault(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.CreateBackupVaultRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
backup_vault: typing.Optional[
google.cloud.backupdr_v1beta.types.backupvault.BackupVault
] = None,
backup_vault_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationCreates a new BackupVault in a given project and 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 backupdr_v1beta
async def sample_create_backup_vault():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.CreateBackupVaultRequest(
parent="parent_value",
backup_vault_id="backup_vault_id_value",
)
# Make the request
operation = await client.create_backup_vault(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.backupdr_v1beta.types.CreateBackupVaultRequest, dict]]
The request object. Message for creating a BackupVault. |
parent |
Required. Value for parent. This corresponds to the |
backup_vault |
BackupVault
Required. The resource being created This corresponds to the |
backup_vault_id |
Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be BackupVault Message describing a BackupVault object. |
create_management_server
create_management_server(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupdr.CreateManagementServerRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
management_server: typing.Optional[
google.cloud.backupdr_v1beta.types.backupdr.ManagementServer
] = None,
management_server_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationCreates a new ManagementServer in a given project and 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 backupdr_v1beta
async def sample_create_management_server():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.CreateManagementServerRequest(
parent="parent_value",
management_server_id="management_server_id_value",
)
# Make the request
operation = await client.create_management_server(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.backupdr_v1beta.types.CreateManagementServerRequest, dict]]
The request object. Request message for creating a management server instance. |
parent |
Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR locations map to Google Cloud regions, for example us-central1. This corresponds to the |
management_server |
ManagementServer
Required. A [management server resource][google.cloud.backupdr.v1.ManagementServer] This corresponds to the |
management_server_id |
Required. The name of the management server to create. The name must be unique for the specified project and location. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be ManagementServer ManagementServer describes a single BackupDR ManagementServer instance. |
crypto_key_path
crypto_key_path(project: str, location: str, ring: str, key: str) -> strReturns a fully-qualified crypto_key string.
crypto_key_version_path
crypto_key_version_path(
project: str, location: str, key_ring: str, crypto_key: str, crypto_key_version: str
) -> strReturns a fully-qualified crypto_key_version string.
data_source_path
data_source_path(
project: str, location: str, backupvault: str, datasource: str
) -> strReturns a fully-qualified data_source string.
data_source_reference_path
data_source_reference_path(
project: str, location: str, data_source_reference: str
) -> strReturns a fully-qualified data_source_reference string.
delete_auto_protection_policy
delete_auto_protection_policy(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicy.DeleteAutoProtectionPolicyRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationDeletes a single AutoProtectionPolicy.
# 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 backupdr_v1beta
async def sample_delete_auto_protection_policy():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.DeleteAutoProtectionPolicyRequest(
name="name_value",
)
# Make the request
operation = await client.delete_auto_protection_policy(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.backupdr_v1beta.types.DeleteAutoProtectionPolicyRequest, dict]]
The request object. Request message for deleting an AutoProtectionPolicy. |
name |
Required. The name of the policy to delete. Format: projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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
delete_backup(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.DeleteBackupRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationDeletes 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 backupdr_v1beta
async def sample_delete_backup():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.DeleteBackupRequest(
name="name_value",
)
# Make the request
operation = await 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.backupdr_v1beta.types.DeleteBackupRequest, dict]]
The request object. Message for deleting a Backup. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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 Message describing a Backup object. |
delete_backup_plan
delete_backup_plan(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplan.DeleteBackupPlanRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationDeletes 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 backupdr_v1beta
async def sample_delete_backup_plan():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.DeleteBackupPlanRequest(
name="name_value",
)
# Make the request
operation = await 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.backupdr_v1beta.types.DeleteBackupPlanRequest, dict]]
The request object. The request message for deleting a |
name |
Required. The resource name of the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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_association
delete_backup_plan_association(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplanassociation.DeleteBackupPlanAssociationRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationDeletes a single BackupPlanAssociation.
# 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 backupdr_v1beta
async def sample_delete_backup_plan_association():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.DeleteBackupPlanAssociationRequest(
name="name_value",
)
# Make the request
operation = await client.delete_backup_plan_association(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.backupdr_v1beta.types.DeleteBackupPlanAssociationRequest, dict]]
The request object. Request message for deleting a backup plan association. |
name |
Required. Name of the backup plan association resource, in the format |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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_vault
delete_backup_vault(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.DeleteBackupVaultRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationDeletes a BackupVault.
# 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 backupdr_v1beta
async def sample_delete_backup_vault():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.DeleteBackupVaultRequest(
name="name_value",
)
# Make the request
operation = await client.delete_backup_vault(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.backupdr_v1beta.types.DeleteBackupVaultRequest, dict]]
The request object. Message for deleting a BackupVault. |
name |
Required. Name of the resource. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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_management_server
delete_management_server(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupdr.DeleteManagementServerRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationDeletes a single ManagementServer.
# 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 backupdr_v1beta
async def sample_delete_management_server():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.DeleteManagementServerRequest(
name="name_value",
)
# Make the request
operation = await client.delete_management_server(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.backupdr_v1beta.types.DeleteManagementServerRequest, dict]]
The request object. Request message for deleting a management server instance. |
name |
Required. Name of the resource This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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_operation
delete_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.DeleteOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NoneDeletes a long-running operation.
This method indicates that the client is no longer interested
in the operation result. It does not cancel the operation.
If the server doesn't support this method, it returns
google.rpc.Code.UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
fetch_backup_plan_associations_for_resource_type
fetch_backup_plan_associations_for_resource_type(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplanassociation.FetchBackupPlanAssociationsForResourceTypeRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
resource_type: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.FetchBackupPlanAssociationsForResourceTypeAsyncPager
)List BackupPlanAssociations for a given resource type.
# 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 backupdr_v1beta
async def sample_fetch_backup_plan_associations_for_resource_type():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.FetchBackupPlanAssociationsForResourceTypeRequest(
parent="parent_value",
resource_type="resource_type_value",
)
# Make the request
page_result = client.fetch_backup_plan_associations_for_resource_type(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.FetchBackupPlanAssociationsForResourceTypeRequest, dict]]
The request object. Request for the FetchBackupPlanAssociationsForResourceType method. |
parent |
Required. The parent resource name. Format: projects/{project}/locations/{location} This corresponds to the |
resource_type |
Required. The type of the Google Cloud resource. Ex: sql.googleapis.com/Instance This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.FetchBackupPlanAssociationsForResourceTypeAsyncPager |
Response for the FetchBackupPlanAssociationsForResourceType method. Iterating over this object will yield results and resolve additional pages automatically. |
fetch_backups_for_resource_type
fetch_backups_for_resource_type(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.FetchBackupsForResourceTypeRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
resource_type: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.FetchBackupsForResourceTypeAsyncPager
)Fetch Backups for a given resource type.
# 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 backupdr_v1beta
async def sample_fetch_backups_for_resource_type():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.FetchBackupsForResourceTypeRequest(
parent="parent_value",
resource_type="resource_type_value",
)
# Make the request
page_result = client.fetch_backups_for_resource_type(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.FetchBackupsForResourceTypeRequest, dict]]
The request object. Request for the FetchBackupsForResourceType method. |
parent |
Required. Datasources are the parent resource for the backups. Format: projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId} This corresponds to the |
resource_type |
Required. The type of the GCP resource. Ex: sqladmin.googleapis.com/Instance This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.FetchBackupsForResourceTypeAsyncPager |
Response for the FetchBackupsForResourceType method. Iterating over this object will yield results and resolve additional pages automatically. |
fetch_data_source_references_for_resource_type
fetch_data_source_references_for_resource_type(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.datasourcereference.FetchDataSourceReferencesForResourceTypeRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
resource_type: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.FetchDataSourceReferencesForResourceTypeAsyncPager
)Fetch DataSourceReferences for a given project, location and resource type.
# 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 backupdr_v1beta
async def sample_fetch_data_source_references_for_resource_type():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.FetchDataSourceReferencesForResourceTypeRequest(
parent="parent_value",
resource_type="resource_type_value",
)
# Make the request
page_result = client.fetch_data_source_references_for_resource_type(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.FetchDataSourceReferencesForResourceTypeRequest, dict]]
The request object. Request for the FetchDataSourceReferencesForResourceType method. |
parent |
Required. The parent resource name. Format: projects/{project}/locations/{location} This corresponds to the |
resource_type |
Required. The type of the Google Cloud resource. Ex: sql.googleapis.com/Instance This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.FetchDataSourceReferencesForResourceTypeAsyncPager |
Response for the FetchDataSourceReferencesForResourceType method. Iterating over this object will yield results and resolve additional pages automatically. |
fetch_usable_backup_vaults
fetch_usable_backup_vaults(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.FetchUsableBackupVaultsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.FetchUsableBackupVaultsAsyncPager
)FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.
# 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 backupdr_v1beta
async def sample_fetch_usable_backup_vaults():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.FetchUsableBackupVaultsRequest(
parent="parent_value",
)
# Make the request
page_result = client.fetch_usable_backup_vaults(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.FetchUsableBackupVaultsRequest, dict]]
The request object. Request message for fetching usable BackupVaults. |
parent |
Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.FetchUsableBackupVaultsAsyncPager |
Response message for fetching usable BackupVaults. Iterating over this object will yield results and resolve additional pages automatically. |
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 |
BackupDRAsyncClient |
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 |
BackupDRAsyncClient |
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 |
BackupDRAsyncClient |
The constructed client. |
get_auto_protection_policy
get_auto_protection_policy(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicy.GetAutoProtectionPolicyRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.autoprotectionpolicy.AutoProtectionPolicyGets details of a single AutoProtectionPolicy.
# 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 backupdr_v1beta
async def sample_get_auto_protection_policy():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetAutoProtectionPolicyRequest(
name="name_value",
)
# Make the request
response = await client.get_auto_protection_policy(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetAutoProtectionPolicyRequest, dict]]
The request object. Request message for getting an AutoProtectionPolicy. |
name |
Required. The name of the policy to retrieve. Format: projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.AutoProtectionPolicy |
An AutoprotectionPolicy is a policy resource designed to automate backup management, moving from manual per-resource protection to a bulk approach. The policy dynamically discovers and applies a specified backup plan to all eligible resources that match its defined scope and criteria. |
get_auto_protection_policy_binding
get_auto_protection_policy_binding(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicybinding.GetAutoProtectionPolicyBindingRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.types.autoprotectionpolicybinding.AutoProtectionPolicyBinding
)Returns the auto protection policy binding read from the CCFE tables.
# 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 backupdr_v1beta
async def sample_get_auto_protection_policy_binding():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetAutoProtectionPolicyBindingRequest(
name="name_value",
)
# Make the request
response = await client.get_auto_protection_policy_binding(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetAutoProtectionPolicyBindingRequest, dict]]
The request object. Request message for getting an AutoProtectionPolicyBinding. |
name |
Required. The name of the binding to retrieve. Format: projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.AutoProtectionPolicyBinding |
An AutoprotectionPolicyBinding (APPA) acts as the bridge between an AutoprotectionPolicy and the scope (Project, Folder, or Organization) where the policy should be applied. |
get_backup
get_backup(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.GetBackupRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.backupvault.BackupGets details of 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 backupdr_v1beta
async def sample_get_backup():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.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.backupdr_v1beta.types.GetBackupRequest, dict]]
The request object. Request message for getting a Backup. |
name |
Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}' This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.Backup |
Message describing a Backup object. |
get_backup_plan
get_backup_plan(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplan.GetBackupPlanRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.backupplan.BackupPlanGets 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 backupdr_v1beta
async def sample_get_backup_plan():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.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.backupdr_v1beta.types.GetBackupPlanRequest, dict]]
The request object. The request message for getting a |
name |
Required. The resource name of the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.BackupPlan |
A BackupPlan specifies some common fields, such as description as well as one or more BackupRule messages. Each BackupRule has a retention policy and defines a schedule by which the system is to perform backup workloads. |
get_backup_plan_association
get_backup_plan_association(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplanassociation.GetBackupPlanAssociationRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.backupplanassociation.BackupPlanAssociationGets details of a single BackupPlanAssociation.
# 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 backupdr_v1beta
async def sample_get_backup_plan_association():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetBackupPlanAssociationRequest(
name="name_value",
)
# Make the request
response = await client.get_backup_plan_association(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetBackupPlanAssociationRequest, dict]]
The request object. Request message for getting a BackupPlanAssociation resource. |
name |
Required. Name of the backup plan association resource, in the format |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.BackupPlanAssociation |
A BackupPlanAssociation represents a single BackupPlanAssociation which contains details like workload, backup plan etc |
get_backup_plan_revision
get_backup_plan_revision(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplan.GetBackupPlanRevisionRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.backupplan.BackupPlanRevisionGets details of a single BackupPlanRevision.
# 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 backupdr_v1beta
async def sample_get_backup_plan_revision():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetBackupPlanRevisionRequest(
name="name_value",
)
# Make the request
response = await client.get_backup_plan_revision(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetBackupPlanRevisionRequest, dict]]
The request object. The request message for getting a |
name |
Required. The resource name of the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.BackupPlanRevision |
BackupPlanRevision represents a snapshot of a BackupPlan at a point in time. |
get_backup_vault
get_backup_vault(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.GetBackupVaultRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.backupvault.BackupVaultGets details of a BackupVault.
# 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 backupdr_v1beta
async def sample_get_backup_vault():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetBackupVaultRequest(
name="name_value",
)
# Make the request
response = await client.get_backup_vault(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetBackupVaultRequest, dict]]
The request object. Request message for getting a BackupVault. |
name |
Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}' This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.BackupVault |
Message describing a BackupVault object. |
get_binding_matching_resource
get_binding_matching_resource(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.bindingmatchingresource.GetBindingMatchingResourceRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.bindingmatchingresource.BindingMatchingResourceGets details of a single Binding Matching Resource.
# 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 backupdr_v1beta
async def sample_get_binding_matching_resource():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetBindingMatchingResourceRequest(
name="name_value",
)
# Make the request
response = await client.get_binding_matching_resource(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetBindingMatchingResourceRequest, dict]]
The request object. Request message for getting a BindingMatchingResource. |
name |
Required. The name of the matching resource to retrieve. Format: projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding}/matchingResources/{matching_resource} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.BindingMatchingResource |
BindingMatchingResource contains the details of a resource that matches the criteria of a binding. |
get_data_source
get_data_source(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.GetDataSourceRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.backupvault.DataSourceGets details of a DataSource.
# 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 backupdr_v1beta
async def sample_get_data_source():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetDataSourceRequest(
name="name_value",
)
# Make the request
response = await client.get_data_source(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetDataSourceRequest, dict]]
The request object. Request message for getting a DataSource instance. |
name |
Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}' This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.DataSource |
Message describing a DataSource object. Datasource object used to represent Datasource details for both admin and basic view. |
get_data_source_reference
get_data_source_reference(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.datasourcereference.GetDataSourceReferenceRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.datasourcereference.DataSourceReferenceGets details of a single DataSourceReference.
# 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 backupdr_v1beta
async def sample_get_data_source_reference():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetDataSourceReferenceRequest(
name="name_value",
)
# Make the request
response = await client.get_data_source_reference(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetDataSourceReferenceRequest, dict]]
The request object. Request for the GetDataSourceReference method. |
name |
Required. The name of the DataSourceReference to retrieve. Format: projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.DataSourceReference |
DataSourceReference is a reference to a DataSource resource. |
get_iam_policy
get_iam_policy(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.policy_pb2.PolicyGets the IAM access control policy for a function.
Returns an empty policy if the function exists and does not have a policy set.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:mike@example.com="" -="" group:admins@example.com="" -="" domain:google.com="" -="" serviceaccount:my-project-id@appspot.gserviceaccount.com="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:eve@example.com="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __. |
get_location
get_location(
request: typing.Optional[
typing.Union[google.cloud.location.locations_pb2.GetLocationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.LocationGets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Location object. |
get_management_server
get_management_server(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupdr.GetManagementServerRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.types.backupdr.ManagementServerGets details of a single ManagementServer.
# 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 backupdr_v1beta
async def sample_get_management_server():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.GetManagementServerRequest(
name="name_value",
)
# Make the request
response = await client.get_management_server(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.GetManagementServerRequest, dict]]
The request object. Request message for getting a management server instance. |
name |
Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}' This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.types.ManagementServer |
ManagementServer describes a single BackupDR ManagementServer instance. |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: typing.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 variable 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_operation
get_operation(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.GetOperationRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.OperationGets the latest state of a long-running operation.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
An Operation object. |
get_transport_class
get_transport_class(
label: typing.Optional[str] = None,
) -> typing.Type[
google.cloud.backupdr_v1beta.services.backup_dr.transports.base.BackupDRTransport
]Returns an appropriate transport class.
| Parameter | |
|---|---|
| Name | Description |
label |
typing.Optional[str]
The name of the desired transport. If none is provided, then the first transport in the registry is used. |
initialize_service
initialize_service(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupdr.InitializeServiceRequest, dict
]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationInitializes the service related config for a project.
# 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 backupdr_v1beta
async def sample_initialize_service():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
cloud_sql_instance_initialization_config = backupdr_v1beta.CloudSqlInstanceInitializationConfig()
cloud_sql_instance_initialization_config.edition = "ENTERPRISE_PLUS"
request = backupdr_v1beta.InitializeServiceRequest(
cloud_sql_instance_initialization_config=cloud_sql_instance_initialization_config,
name="name_value",
resource_type="resource_type_value",
)
# Make the request
operation = await client.initialize_service(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.backupdr_v1beta.types.InitializeServiceRequest, dict]]
The request object. Request message for initializing the service. |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be InitializeServiceResponse Response message for initializing the service. |
initiate_delete_auto_protection_policy_binding
initiate_delete_auto_protection_policy_binding(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicybinding.InitiateDeleteAutoProtectionPolicyBindingRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationInitiateDeleteAutoProtectionPolicyBinding initiates delete for AutoProtectionPolicy Binding
# 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 backupdr_v1beta
async def sample_initiate_delete_auto_protection_policy_binding():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.InitiateDeleteAutoProtectionPolicyBindingRequest(
name="name_value",
)
# Make the request
operation = await client.initiate_delete_auto_protection_policy_binding(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.backupdr_v1beta.types.InitiateDeleteAutoProtectionPolicyBindingRequest, dict]]
The request object. Request message for initiating delete of an AutoProtectionPolicyBinding. |
name |
Required. The name of the binding to delete. Format: projects/{project}/locations/{location}/autoProtectionPolicies/{auto_protection_policy}/bindings/{binding} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be AutoProtectionPolicyBinding An AutoprotectionPolicyBinding (APPA) acts as the bridge between an AutoprotectionPolicy and the scope (Project, Folder, or Organization) where the policy should be applied. |
instance_path
instance_path(project: str, instance: str) -> strReturns a fully-qualified instance string.
list_applied_auto_protection_policies
list_applied_auto_protection_policies(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.appliedautoprotectionpolicy.ListAppliedAutoProtectionPoliciesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListAppliedAutoProtectionPoliciesAsyncPager
)Lists AppliedAutoProtectionPolicies in a given project and 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 backupdr_v1beta
async def sample_list_applied_auto_protection_policies():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListAppliedAutoProtectionPoliciesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_applied_auto_protection_policies(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListAppliedAutoProtectionPoliciesRequest, dict]]
The request object. Request message for listing AppliedAutoProtectionPolicies. |
parent |
Required. The project and location for which to retrieve the list of applied policies. Format: projects/{project}/locations/{location} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListAppliedAutoProtectionPoliciesAsyncPager |
Response message for ListAppliedAutoProtectionPolicies. Iterating over this object will yield results and resolve additional pages automatically. |
list_auto_protection_policies
list_auto_protection_policies(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicy.ListAutoProtectionPoliciesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListAutoProtectionPoliciesAsyncPager
)Lists AutoProtectionPolicies for a given project and 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 backupdr_v1beta
async def sample_list_auto_protection_policies():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListAutoProtectionPoliciesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_auto_protection_policies(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListAutoProtectionPoliciesRequest, dict]]
The request object. Request message for ListAutoProtectionPolicies. |
parent |
Required. The project and location for which to retrieve the list of policies. Format: projects/{project}/locations/{location} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListAutoProtectionPoliciesAsyncPager |
Response message for ListAutoProtectionPolicies. Iterating over this object will yield results and resolve additional pages automatically. |
list_auto_protection_policy_bindings
list_auto_protection_policy_bindings(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicybinding.ListAutoProtectionPolicyBindingsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListAutoProtectionPolicyBindingsAsyncPager
)Returns the auto protection policy bindings read from the CCFE tables.
# 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 backupdr_v1beta
async def sample_list_auto_protection_policy_bindings():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListAutoProtectionPolicyBindingsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_auto_protection_policy_bindings(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListAutoProtectionPolicyBindingsRequest, dict]]
The request object. Request message for ListAutoProtectionPolicyBindings. |
parent |
Required. The project and location for which to retrieve the list of policies. Format: projects/{project}/locations/{location} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListAutoProtectionPolicyBindingsAsyncPager |
Response message for ListAutoProtectionPolicyBindings. Iterating over this object will yield results and resolve additional pages automatically. |
list_backup_plan_associations
list_backup_plan_associations(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplanassociation.ListBackupPlanAssociationsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupPlanAssociationsAsyncPager
)Lists BackupPlanAssociations in a given project and 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 backupdr_v1beta
async def sample_list_backup_plan_associations():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListBackupPlanAssociationsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_backup_plan_associations(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListBackupPlanAssociationsRequest, dict]]
The request object. Request message for List BackupPlanAssociation |
parent |
Required. The project and location for which to retrieve backup Plan Associations information, in the format |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupPlanAssociationsAsyncPager |
Response message for List BackupPlanAssociation Iterating over this object will yield results and resolve additional pages automatically. |
list_backup_plan_revisions
list_backup_plan_revisions(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplan.ListBackupPlanRevisionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupPlanRevisionsAsyncPager
)Lists BackupPlanRevisions in a given project and 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 backupdr_v1beta
async def sample_list_backup_plan_revisions():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListBackupPlanRevisionsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_backup_plan_revisions(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListBackupPlanRevisionsRequest, dict]]
The request object. The request message for getting a list of |
parent |
Required. The project and location for which to retrieve |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupPlanRevisionsAsyncPager |
The response message for getting a list of BackupPlanRevision. Iterating over this object will yield results and resolve additional pages automatically. |
list_backup_plans
list_backup_plans(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplan.ListBackupPlansRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupPlansAsyncPagerLists BackupPlans in a given project and 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 backupdr_v1beta
async def sample_list_backup_plans():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.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.backupdr_v1beta.types.ListBackupPlansRequest, dict]]
The request object. The request message for getting a list |
parent |
Required. The project and location for which to retrieve |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupPlansAsyncPager |
The response message for getting a list of BackupPlan. Iterating over this object will yield results and resolve additional pages automatically. |
list_backup_vaults
list_backup_vaults(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.ListBackupVaultsRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupVaultsAsyncPagerLists BackupVaults in a given project and 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 backupdr_v1beta
async def sample_list_backup_vaults():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListBackupVaultsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_backup_vaults(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListBackupVaultsRequest, dict]]
The request object. Request message for listing backupvault stores. |
parent |
Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve backupvault stores for all locations, use "-" for the '{location}' value. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupVaultsAsyncPager |
Response message for listing BackupVaults. Iterating over this object will yield results and resolve additional pages automatically. |
list_backups
list_backups(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.ListBackupsRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupsAsyncPagerLists Backups in a given project and 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 backupdr_v1beta
async def sample_list_backups():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.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.backupdr_v1beta.types.ListBackupsRequest, dict]]
The request object. Request message for listing Backups. |
parent |
Required. The project and location for which to retrieve backup information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBackupsAsyncPager |
Response message for listing Backups. Iterating over this object will yield results and resolve additional pages automatically. |
list_binding_matching_resources
list_binding_matching_resources(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.bindingmatchingresource.ListBindingMatchingResourcesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBindingMatchingResourcesAsyncPager
)Lists Binding Matching Resources for a given AutoProtectionPolicyBinding.
# 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 backupdr_v1beta
async def sample_list_binding_matching_resources():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListBindingMatchingResourcesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_binding_matching_resources(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListBindingMatchingResourcesRequest, dict]]
The request object. Request message for List BindingMatchingResources. |
parent |
Required. The project, location, auto protection policy and binding for which to retrieve |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListBindingMatchingResourcesAsyncPager |
The response message for getting a list of BindingMatchingResources. Iterating over this object will yield results and resolve additional pages automatically. |
list_data_source_references
list_data_source_references(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.datasourcereference.ListDataSourceReferencesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListDataSourceReferencesAsyncPager
)Lists DataSourceReferences for a given project and 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 backupdr_v1beta
async def sample_list_data_source_references():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListDataSourceReferencesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_data_source_references(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListDataSourceReferencesRequest, dict]]
The request object. Request for the ListDataSourceReferences method. |
parent |
Required. The parent resource name. Format: projects/{project}/locations/{location} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListDataSourceReferencesAsyncPager |
Response for the ListDataSourceReferences method. Iterating over this object will yield results and resolve additional pages automatically. |
list_data_sources
list_data_sources(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.ListDataSourcesRequest, dict
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListDataSourcesAsyncPagerLists DataSources in a given project and 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 backupdr_v1beta
async def sample_list_data_sources():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListDataSourcesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_data_sources(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListDataSourcesRequest, dict]]
The request object. Request message for listing DataSources. |
parent |
Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve data sources for all locations, use "-" for the '{location}' value. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListDataSourcesAsyncPager |
Response message for listing DataSources. Iterating over this object will yield results and resolve additional pages automatically. |
list_locations
list_locations(
request: typing.Optional[
typing.Union[google.cloud.location.locations_pb2.ListLocationsRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.location.locations_pb2.ListLocationsResponseLists information about the supported locations for this service.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Response message for ListLocations method. |
list_management_servers
list_management_servers(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupdr.ListManagementServersRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListManagementServersAsyncPager
)Lists ManagementServers in a given project and 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 backupdr_v1beta
async def sample_list_management_servers():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.ListManagementServersRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_management_servers(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.backupdr_v1beta.types.ListManagementServersRequest, dict]]
The request object. Request message for listing management servers. |
parent |
Required. The project and location for which to retrieve management servers information, in the format 'projects/{project_id}/locations/{location}'. In Google Cloud Backup and DR, locations map to Google Cloud regions, for example us-central1. To retrieve management servers for all locations, use "-" for the '{location}' value. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.backupdr_v1beta.services.backup_dr.pagers.ListManagementServersAsyncPager |
Response message for listing management servers. Iterating over this object will yield results and resolve additional pages automatically. |
list_operations
list_operations(
request: typing.Optional[
typing.Union[google.longrunning.operations_pb2.ListOperationsRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.longrunning.operations_pb2.ListOperationsResponseLists operations that match the specified filter in the request.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Response message for ListOperations method. |
management_server_path
management_server_path(project: str, location: str, managementserver: str) -> strReturns a fully-qualified management_server string.
parse_applied_auto_protection_policy_path
parse_applied_auto_protection_policy_path(path: str) -> typing.Dict[str, str]Parses a applied_auto_protection_policy path into its component segments.
parse_auto_protection_policy_binding_path
parse_auto_protection_policy_binding_path(path: str) -> typing.Dict[str, str]Parses a auto_protection_policy_binding path into its component segments.
parse_auto_protection_policy_path
parse_auto_protection_policy_path(path: str) -> typing.Dict[str, str]Parses a auto_protection_policy path into its component segments.
parse_backup_path
parse_backup_path(path: str) -> typing.Dict[str, str]Parses a backup path into its component segments.
parse_backup_plan_association_path
parse_backup_plan_association_path(path: str) -> typing.Dict[str, str]Parses a backup_plan_association path into its component segments.
parse_backup_plan_path
parse_backup_plan_path(path: str) -> typing.Dict[str, str]Parses a backup_plan path into its component segments.
parse_backup_plan_revision_path
parse_backup_plan_revision_path(path: str) -> typing.Dict[str, str]Parses a backup_plan_revision path into its component segments.
parse_backup_vault_path
parse_backup_vault_path(path: str) -> typing.Dict[str, str]Parses a backup_vault path into its component segments.
parse_binding_matching_resource_path
parse_binding_matching_resource_path(path: str) -> typing.Dict[str, str]Parses a binding_matching_resource path into its component segments.
parse_cluster_path
parse_cluster_path(path: str) -> typing.Dict[str, str]Parses a cluster path into its component segments.
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]Parse a project path into its component segments.
parse_crypto_key_path
parse_crypto_key_path(path: str) -> typing.Dict[str, str]Parses a crypto_key path into its component segments.
parse_crypto_key_version_path
parse_crypto_key_version_path(path: str) -> typing.Dict[str, str]Parses a crypto_key_version path into its component segments.
parse_data_source_path
parse_data_source_path(path: str) -> typing.Dict[str, str]Parses a data_source path into its component segments.
parse_data_source_reference_path
parse_data_source_reference_path(path: str) -> typing.Dict[str, str]Parses a data_source_reference path into its component segments.
parse_instance_path
parse_instance_path(path: str) -> typing.Dict[str, str]Parses a instance path into its component segments.
parse_management_server_path
parse_management_server_path(path: str) -> typing.Dict[str, str]Parses a management_server path into its component segments.
parse_storage_pool_path
parse_storage_pool_path(path: str) -> typing.Dict[str, str]Parses a storage_pool path into its component segments.
restore_backup
restore_backup(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.RestoreBackupRequest, dict
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationRestore from 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 backupdr_v1beta
async def sample_restore_backup():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
compute_instance_target_environment = backupdr_v1beta.ComputeInstanceTargetEnvironment()
compute_instance_target_environment.project = "project_value"
compute_instance_target_environment.zone = "zone_value"
request = backupdr_v1beta.RestoreBackupRequest(
compute_instance_target_environment=compute_instance_target_environment,
name="name_value",
)
# Make the request
operation = await client.restore_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.backupdr_v1beta.types.RestoreBackupRequest, dict]]
The request object. Request message for restoring from a Backup. |
name |
Required. The resource name of the Backup instance, in the format 'projects//locations//backupVaults//dataSources//backups/'. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be RestoreBackupResponse Response message for restoring from a Backup. |
set_iam_policy
set_iam_policy(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.policy_pb2.PolicySets the IAM access control policy on the specified function.
Replaces any existing policy.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource. **JSON Example** :: { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": ["user:eve@example.com"], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01t00:00:00.000z')",="" }="" }="" ]="" }="" **yaml="" example**="" ::="" bindings:="" -="" members:="" -="" user:mike@example.com="" -="" group:admins@example.com="" -="" domain:google.com="" -="" serviceaccount:my-project-id@appspot.gserviceaccount.com="" role:="" roles/resourcemanager.organizationadmin="" -="" members:="" -="" user:eve@example.com="" role:="" roles/resourcemanager.organizationviewer="" condition:="" title:="" expirable="" access="" description:="" does="" not="" grant="" access="" after="" sep="" 2020="" expression:="" request.time="">< timestamp('2020-10-01t00:00:00.000z')="" for="" a="" description="" of="" iam="" and="" its="" features,="" see="" the="">IAM developer's guide __. |
storage_pool_path
storage_pool_path(project: str, zone: str, storage_pool: str) -> strReturns a fully-qualified storage_pool string.
test_iam_permissions
test_iam_permissions(
request: typing.Optional[
typing.Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]
] = None,
*,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.iam.v1.iam_policy_pb2.TestIamPermissionsResponseTests the specified IAM permissions against the IAM access control policy for a function.
If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
| Parameters | |
|---|---|
| Name | Description |
request |
The request object. Request message for |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
|
Response message for TestIamPermissions method. |
trigger_backup
trigger_backup(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplanassociation.TriggerBackupRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
rule_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationTriggers a new 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 backupdr_v1beta
async def sample_trigger_backup():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.TriggerBackupRequest(
name="name_value",
)
# Make the request
operation = await client.trigger_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.backupdr_v1beta.types.TriggerBackupRequest, dict]]
The request object. Request message for triggering a backup. |
name |
Required. Name of the backup plan association resource, in the format |
rule_id |
Optional. backup rule_id for which a backup needs to be triggered. If not specified, on-demand backup with custom retention will be triggered. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be BackupPlanAssociation A BackupPlanAssociation represents a single BackupPlanAssociation which contains details like workload, backup plan etc |
update_auto_protection_policy
update_auto_protection_policy(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.autoprotectionpolicy.UpdateAutoProtectionPolicyRequest,
dict,
]
] = None,
*,
auto_protection_policy: typing.Optional[
google.cloud.backupdr_v1beta.types.autoprotectionpolicy.AutoProtectionPolicy
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationUpdates the parameters of a single AutoProtectionPolicy.
# 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 backupdr_v1beta
async def sample_update_auto_protection_policy():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
auto_protection_policy = backupdr_v1beta.AutoProtectionPolicy()
auto_protection_policy.backup_plan_details.resource_type = "resource_type_value"
auto_protection_policy.backup_plan_details.backup_plan = "backup_plan_value"
auto_protection_policy.criteria.matching_conditions.label_condition.key = "key_value"
auto_protection_policy.criteria.matching_conditions.label_condition.values = ['values_value1', 'values_value2']
request = backupdr_v1beta.UpdateAutoProtectionPolicyRequest(
auto_protection_policy=auto_protection_policy,
)
# Make the request
operation = await client.update_auto_protection_policy(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.backupdr_v1beta.types.UpdateAutoProtectionPolicyRequest, dict]]
The request object. Request message for updating an AutoProtectionPolicy. |
auto_protection_policy |
AutoProtectionPolicy
Required. The policy to update. This corresponds to the |
update_mask |
Required. Field mask is used to specify the fields to be overwritten in the AutoProtectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be AutoProtectionPolicy An AutoprotectionPolicy is a policy resource designed to automate backup management, moving from manual per-resource protection to a bulk approach. The policy dynamically discovers and applies a specified backup plan to all eligible resources that match its defined scope and criteria. |
update_backup
update_backup(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.UpdateBackupRequest, dict
]
] = None,
*,
backup: typing.Optional[
google.cloud.backupdr_v1beta.types.backupvault.Backup
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationUpdates the settings of 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 backupdr_v1beta
async def sample_update_backup():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.UpdateBackupRequest(
)
# Make the request
operation = await 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.backupdr_v1beta.types.UpdateBackupRequest, dict]]
The request object. Request message for updating a Backup. |
backup |
Backup
Required. The resource being updated This corresponds to the |
update_mask |
Required. Field mask is used to specify the fields to be overwritten in the Backup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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 Message describing a Backup object. |
update_backup_plan
update_backup_plan(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplan.UpdateBackupPlanRequest, dict
]
] = None,
*,
backup_plan: typing.Optional[
google.cloud.backupdr_v1beta.types.backupplan.BackupPlan
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationUpdate 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 backupdr_v1beta
async def sample_update_backup_plan():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
backup_plan = backupdr_v1beta.BackupPlan()
backup_plan.resource_type = "resource_type_value"
backup_plan.backup_vault = "backup_vault_value"
request = backupdr_v1beta.UpdateBackupPlanRequest(
backup_plan=backup_plan,
)
# Make the request
operation = await 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.backupdr_v1beta.types.UpdateBackupPlanRequest, dict]]
The request object. Request message for updating a backup plan. |
backup_plan |
BackupPlan
Required. The resource being updated This corresponds to the |
update_mask |
Required. The list of fields to update. Field mask is used to specify the fields to be overwritten in the BackupPlan resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail. Currently, these fields are supported in update: description, schedules, retention period, adding and removing Backup Rules. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| 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 A BackupPlan specifies some common fields, such as description as well as one or more BackupRule messages. Each BackupRule has a retention policy and defines a schedule by which the system is to perform backup workloads. |
update_backup_plan_association
update_backup_plan_association(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupplanassociation.UpdateBackupPlanAssociationRequest,
dict,
]
] = None,
*,
backup_plan_association: typing.Optional[
google.cloud.backupdr_v1beta.types.backupplanassociation.BackupPlanAssociation
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationUpdate a BackupPlanAssociation.
# 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 backupdr_v1beta
async def sample_update_backup_plan_association():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
backup_plan_association = backupdr_v1beta.BackupPlanAssociation()
backup_plan_association.resource_type = "resource_type_value"
backup_plan_association.resource = "resource_value"
backup_plan_association.backup_plan = "backup_plan_value"
request = backupdr_v1beta.UpdateBackupPlanAssociationRequest(
backup_plan_association=backup_plan_association,
)
# Make the request
operation = await client.update_backup_plan_association(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.backupdr_v1beta.types.UpdateBackupPlanAssociationRequest, dict]]
The request object. Request message for updating a backup plan association. |
backup_plan_association |
BackupPlanAssociation
Required. The resource being updated This corresponds to the |
update_mask |
Required. The list of fields to update. Field mask is used to specify the fields to be overwritten in the BackupPlanAssociation resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail. Currently backup_plan_association.backup_plan is the only supported field. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be BackupPlanAssociation A BackupPlanAssociation represents a single BackupPlanAssociation which contains details like workload, backup plan etc |
update_backup_vault
update_backup_vault(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.UpdateBackupVaultRequest,
dict,
]
] = None,
*,
backup_vault: typing.Optional[
google.cloud.backupdr_v1beta.types.backupvault.BackupVault
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationUpdates the settings of a BackupVault.
# 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 backupdr_v1beta
async def sample_update_backup_vault():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.UpdateBackupVaultRequest(
)
# Make the request
operation = await client.update_backup_vault(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.backupdr_v1beta.types.UpdateBackupVaultRequest, dict]]
The request object. Request message for updating a BackupVault. |
backup_vault |
BackupVault
Required. The resource being updated This corresponds to the |
update_mask |
Required. Field mask is used to specify the fields to be overwritten in the BackupVault resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be BackupVault Message describing a BackupVault object. |
update_data_source
update_data_source(
request: typing.Optional[
typing.Union[
google.cloud.backupdr_v1beta.types.backupvault.UpdateDataSourceRequest, dict
]
] = None,
*,
data_source: typing.Optional[
google.cloud.backupdr_v1beta.types.backupvault.DataSource
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.api_core.operation_async.AsyncOperationUpdates the settings of a DataSource.
# 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 backupdr_v1beta
async def sample_update_data_source():
# Create a client
client = backupdr_v1beta.BackupDRAsyncClient()
# Initialize request argument(s)
request = backupdr_v1beta.UpdateDataSourceRequest(
)
# Make the request
operation = await client.update_data_source(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.backupdr_v1beta.types.UpdateDataSourceRequest, dict]]
The request object. Request message for updating a data source instance. |
data_source |
DataSource
Required. The resource being updated This corresponds to the |
update_mask |
Required. Field mask is used to specify the fields to be overwritten in the DataSource resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then the request will fail. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.api_core.operation_async.AsyncOperation |
An object representing a long-running operation. The result type for the operation will be DataSource Message describing a DataSource object. Datasource object used to represent Datasource details for both admin and basic view. |