Class BackupDRClient (0.13.0)

GitHub RepositoryProduct Reference

Service Description: The BackupDR Service

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ManagementServerName name =
       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
   ManagementServer response = backupDRClient.getManagementServer(name);
 }
 

Note: close() needs to be called on the BackupDRClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListManagementServers

Lists ManagementServers in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listManagementServers(ListManagementServersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listManagementServers(LocationName parent)

  • listManagementServers(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listManagementServersPagedCallable()

  • listManagementServersCallable()

GetManagementServer

Gets details of a single ManagementServer.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getManagementServer(GetManagementServerRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getManagementServer(ManagementServerName name)

  • getManagementServer(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getManagementServerCallable()

CreateManagementServer

Creates a new ManagementServer in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createManagementServerAsync(CreateManagementServerRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createManagementServerAsync(LocationName parent, ManagementServer managementServer, String managementServerId)

  • createManagementServerAsync(String parent, ManagementServer managementServer, String managementServerId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createManagementServerOperationCallable()

  • createManagementServerCallable()

DeleteManagementServer

Deletes a single ManagementServer.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteManagementServerAsync(DeleteManagementServerRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteManagementServerAsync(ManagementServerName name)

  • deleteManagementServerAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteManagementServerOperationCallable()

  • deleteManagementServerCallable()

CreateBackupVault

Creates a new BackupVault in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBackupVaultAsync(CreateBackupVaultRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createBackupVaultAsync(LocationName parent, BackupVault backupVault, String backupVaultId)

  • createBackupVaultAsync(String parent, BackupVault backupVault, String backupVaultId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBackupVaultOperationCallable()

  • createBackupVaultCallable()

ListBackupVaults

Lists BackupVaults in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackupVaults(ListBackupVaultsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackupVaults(LocationName parent)

  • listBackupVaults(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupVaultsPagedCallable()

  • listBackupVaultsCallable()

FetchUsableBackupVaults

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • fetchUsableBackupVaults(FetchUsableBackupVaultsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • fetchUsableBackupVaults(LocationName parent)

  • fetchUsableBackupVaults(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • fetchUsableBackupVaultsPagedCallable()

  • fetchUsableBackupVaultsCallable()

GetBackupVault

Gets details of a BackupVault.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackupVault(GetBackupVaultRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackupVault(BackupVaultName name)

  • getBackupVault(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupVaultCallable()

UpdateBackupVault

Updates the settings of a BackupVault.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateBackupVaultAsync(UpdateBackupVaultRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateBackupVaultAsync(BackupVault backupVault, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateBackupVaultOperationCallable()

  • updateBackupVaultCallable()

DeleteBackupVault

Deletes a BackupVault.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBackupVaultAsync(DeleteBackupVaultRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteBackupVaultAsync(BackupVaultName name)

  • deleteBackupVaultAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBackupVaultOperationCallable()

  • deleteBackupVaultCallable()

ListDataSources

Lists DataSources in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listDataSources(ListDataSourcesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listDataSources(BackupVaultName parent)

  • listDataSources(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listDataSourcesPagedCallable()

  • listDataSourcesCallable()

GetDataSource

Gets details of a DataSource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getDataSource(GetDataSourceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getDataSource(DataSourceName name)

  • getDataSource(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getDataSourceCallable()

UpdateDataSource

Updates the settings of a DataSource.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateDataSourceAsync(UpdateDataSourceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateDataSourceAsync(DataSource dataSource, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateDataSourceOperationCallable()

  • updateDataSourceCallable()

ListBackups

Lists Backups in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackups(ListBackupsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackups(DataSourceName parent)

  • listBackups(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupsPagedCallable()

  • listBackupsCallable()

GetBackup

Gets details of a Backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackup(GetBackupRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackup(BackupName name)

  • getBackup(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupCallable()

UpdateBackup

Updates the settings of a Backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateBackupAsync(UpdateBackupRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateBackupAsync(Backup backup, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateBackupOperationCallable()

  • updateBackupCallable()

DeleteBackup

Deletes a Backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBackupAsync(DeleteBackupRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteBackupAsync(BackupName name)

  • deleteBackupAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBackupOperationCallable()

  • deleteBackupCallable()

RestoreBackup

Restore from a Backup

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • restoreBackupAsync(RestoreBackupRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • restoreBackupAsync(BackupName name)

  • restoreBackupAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • restoreBackupOperationCallable()

  • restoreBackupCallable()

CreateBackupPlan

Create a BackupPlan

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBackupPlanAsync(CreateBackupPlanRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createBackupPlanAsync(LocationName parent, BackupPlan backupPlan, String backupPlanId)

  • createBackupPlanAsync(String parent, BackupPlan backupPlan, String backupPlanId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBackupPlanOperationCallable()

  • createBackupPlanCallable()

GetBackupPlan

Gets details of a single BackupPlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackupPlan(GetBackupPlanRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackupPlan(BackupPlanName name)

  • getBackupPlan(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupPlanCallable()

ListBackupPlans

Lists BackupPlans in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackupPlans(ListBackupPlansRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackupPlans(LocationName parent)

  • listBackupPlans(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupPlansPagedCallable()

  • listBackupPlansCallable()

DeleteBackupPlan

Deletes a single BackupPlan.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBackupPlanAsync(DeleteBackupPlanRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteBackupPlanAsync(BackupPlanName name)

  • deleteBackupPlanAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBackupPlanOperationCallable()

  • deleteBackupPlanCallable()

CreateBackupPlanAssociation

Create a BackupPlanAssociation

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createBackupPlanAssociationAsync(LocationName parent, BackupPlanAssociation backupPlanAssociation, String backupPlanAssociationId)

  • createBackupPlanAssociationAsync(String parent, BackupPlanAssociation backupPlanAssociation, String backupPlanAssociationId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createBackupPlanAssociationOperationCallable()

  • createBackupPlanAssociationCallable()

GetBackupPlanAssociation

Gets details of a single BackupPlanAssociation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackupPlanAssociation(GetBackupPlanAssociationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackupPlanAssociation(BackupPlanAssociationName name)

  • getBackupPlanAssociation(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupPlanAssociationCallable()

ListBackupPlanAssociations

Lists BackupPlanAssociations in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackupPlanAssociations(ListBackupPlanAssociationsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackupPlanAssociations(LocationName parent)

  • listBackupPlanAssociations(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupPlanAssociationsPagedCallable()

  • listBackupPlanAssociationsCallable()

DeleteBackupPlanAssociation

Deletes a single BackupPlanAssociation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteBackupPlanAssociationAsync(BackupPlanAssociationName name)

  • deleteBackupPlanAssociationAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBackupPlanAssociationOperationCallable()

  • deleteBackupPlanAssociationCallable()

TriggerBackup

Triggers a new Backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • triggerBackupAsync(TriggerBackupRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • triggerBackupAsync(BackupPlanAssociationName name, String ruleId)

  • triggerBackupAsync(String name, String ruleId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • triggerBackupOperationCallable()

  • triggerBackupCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of BackupDRSettings to create(). For example:

To customize credentials:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BackupDRSettings backupDRSettings =
     BackupDRSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings);
 

To customize the endpoint:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BackupDRSettings backupDRSettings =
     BackupDRSettings.newBuilder().setEndpoint(myEndpoint).build();
 BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 BackupDRSettings backupDRSettings = BackupDRSettings.newHttpJsonBuilder().build();
 BackupDRClient backupDRClient = BackupDRClient.create(backupDRSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > BackupDRClient

Static Methods

create()

public static final BackupDRClient create()

Constructs an instance of BackupDRClient with default settings.

Returns
Type Description
BackupDRClient
Exceptions
Type Description
IOException

create(BackupDRSettings settings)

public static final BackupDRClient create(BackupDRSettings settings)

Constructs an instance of BackupDRClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings BackupDRSettings
Returns
Type Description
BackupDRClient
Exceptions
Type Description
IOException

create(BackupDRStub stub)

public static final BackupDRClient create(BackupDRStub stub)

Constructs an instance of BackupDRClient, using the given stub for making calls. This is for advanced usage - prefer using create(BackupDRSettings).

Parameter
Name Description
stub BackupDRStub
Returns
Type Description
BackupDRClient

Constructors

BackupDRClient(BackupDRSettings settings)

protected BackupDRClient(BackupDRSettings settings)

Constructs an instance of BackupDRClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings BackupDRSettings

BackupDRClient(BackupDRStub stub)

protected BackupDRClient(BackupDRStub stub)
Parameter
Name Description
stub BackupDRStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest request)

public final OperationFuture<BackupPlanAssociation,OperationMetadata> createBackupPlanAssociationAsync(CreateBackupPlanAssociationRequest request)

Create a BackupPlanAssociation

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupPlanAssociationRequest request =
       CreateBackupPlanAssociationRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupPlanAssociationId("backupPlanAssociationId567762737")
           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   BackupPlanAssociation response =
       backupDRClient.createBackupPlanAssociationAsync(request).get();
 }
 
Parameter
Name Description
request CreateBackupPlanAssociationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<BackupPlanAssociation,OperationMetadata>

createBackupPlanAssociationAsync(LocationName parent, BackupPlanAssociation backupPlanAssociation, String backupPlanAssociationId)

public final OperationFuture<BackupPlanAssociation,OperationMetadata> createBackupPlanAssociationAsync(LocationName parent, BackupPlanAssociation backupPlanAssociation, String backupPlanAssociationId)

Create a BackupPlanAssociation

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build();
   String backupPlanAssociationId = "backupPlanAssociationId567762737";
   BackupPlanAssociation response =
       backupDRClient
           .createBackupPlanAssociationAsync(
               parent, backupPlanAssociation, backupPlanAssociationId)
           .get();
 }
 
Parameters
Name Description
parent LocationName

Required. The backup plan association project and location in the format projects/{project_id}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example **us-central1**.

backupPlanAssociation BackupPlanAssociation

Required. The resource being created

backupPlanAssociationId String

Required. The name of the backup plan association to create. The name must be unique for the specified project and location.

Returns
Type Description
OperationFuture<BackupPlanAssociation,OperationMetadata>

createBackupPlanAssociationAsync(String parent, BackupPlanAssociation backupPlanAssociation, String backupPlanAssociationId)

public final OperationFuture<BackupPlanAssociation,OperationMetadata> createBackupPlanAssociationAsync(String parent, BackupPlanAssociation backupPlanAssociation, String backupPlanAssociationId)

Create a BackupPlanAssociation

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   BackupPlanAssociation backupPlanAssociation = BackupPlanAssociation.newBuilder().build();
   String backupPlanAssociationId = "backupPlanAssociationId567762737";
   BackupPlanAssociation response =
       backupDRClient
           .createBackupPlanAssociationAsync(
               parent, backupPlanAssociation, backupPlanAssociationId)
           .get();
 }
 
Parameters
Name Description
parent String

Required. The backup plan association project and location in the format projects/{project_id}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example **us-central1**.

backupPlanAssociation BackupPlanAssociation

Required. The resource being created

backupPlanAssociationId String

Required. The name of the backup plan association to create. The name must be unique for the specified project and location.

Returns
Type Description
OperationFuture<BackupPlanAssociation,OperationMetadata>

createBackupPlanAssociationCallable()

public final UnaryCallable<CreateBackupPlanAssociationRequest,Operation> createBackupPlanAssociationCallable()

Create a BackupPlanAssociation

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupPlanAssociationRequest request =
       CreateBackupPlanAssociationRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupPlanAssociationId("backupPlanAssociationId567762737")
           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       backupDRClient.createBackupPlanAssociationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateBackupPlanAssociationRequest,Operation>

createBackupPlanAssociationOperationCallable()

public final OperationCallable<CreateBackupPlanAssociationRequest,BackupPlanAssociation,OperationMetadata> createBackupPlanAssociationOperationCallable()

Create a BackupPlanAssociation

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupPlanAssociationRequest request =
       CreateBackupPlanAssociationRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupPlanAssociationId("backupPlanAssociationId567762737")
           .setBackupPlanAssociation(BackupPlanAssociation.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<BackupPlanAssociation, OperationMetadata> future =
       backupDRClient.createBackupPlanAssociationOperationCallable().futureCall(request);
   // Do something.
   BackupPlanAssociation response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateBackupPlanAssociationRequest,BackupPlanAssociation,OperationMetadata>

createBackupPlanAsync(CreateBackupPlanRequest request)

public final OperationFuture<BackupPlan,OperationMetadata> createBackupPlanAsync(CreateBackupPlanRequest request)

Create a BackupPlan

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupPlanRequest request =
       CreateBackupPlanRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupPlanId("backupPlanId-84871546")
           .setBackupPlan(BackupPlan.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   BackupPlan response = backupDRClient.createBackupPlanAsync(request).get();
 }
 
Parameter
Name Description
request CreateBackupPlanRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<BackupPlan,OperationMetadata>

createBackupPlanAsync(LocationName parent, BackupPlan backupPlan, String backupPlanId)

public final OperationFuture<BackupPlan,OperationMetadata> createBackupPlanAsync(LocationName parent, BackupPlan backupPlan, String backupPlanId)

Create a BackupPlan

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   BackupPlan backupPlan = BackupPlan.newBuilder().build();
   String backupPlanId = "backupPlanId-84871546";
   BackupPlan response =
       backupDRClient.createBackupPlanAsync(parent, backupPlan, backupPlanId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The BackupPlan project and location in the format projects/{project}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example **us-central1**.

backupPlan BackupPlan

Required. The BackupPlan resource object to create.

backupPlanId String

Required. The name of the BackupPlan to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.

Returns
Type Description
OperationFuture<BackupPlan,OperationMetadata>

createBackupPlanAsync(String parent, BackupPlan backupPlan, String backupPlanId)

public final OperationFuture<BackupPlan,OperationMetadata> createBackupPlanAsync(String parent, BackupPlan backupPlan, String backupPlanId)

Create a BackupPlan

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   BackupPlan backupPlan = BackupPlan.newBuilder().build();
   String backupPlanId = "backupPlanId-84871546";
   BackupPlan response =
       backupDRClient.createBackupPlanAsync(parent, backupPlan, backupPlanId).get();
 }
 
Parameters
Name Description
parent String

Required. The BackupPlan project and location in the format projects/{project}/locations/{location}. In Cloud BackupDR locations map to GCP regions, for example **us-central1**.

backupPlan BackupPlan

Required. The BackupPlan resource object to create.

backupPlanId String

Required. The name of the BackupPlan to create. The name must be unique for the specified project and location.The name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens. Pattern, /a-z{,62}/.

Returns
Type Description
OperationFuture<BackupPlan,OperationMetadata>

createBackupPlanCallable()

public final UnaryCallable<CreateBackupPlanRequest,Operation> createBackupPlanCallable()

Create a BackupPlan

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupPlanRequest request =
       CreateBackupPlanRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupPlanId("backupPlanId-84871546")
           .setBackupPlan(BackupPlan.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = backupDRClient.createBackupPlanCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateBackupPlanRequest,Operation>

createBackupPlanOperationCallable()

public final OperationCallable<CreateBackupPlanRequest,BackupPlan,OperationMetadata> createBackupPlanOperationCallable()

Create a BackupPlan

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupPlanRequest request =
       CreateBackupPlanRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupPlanId("backupPlanId-84871546")
           .setBackupPlan(BackupPlan.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<BackupPlan, OperationMetadata> future =
       backupDRClient.createBackupPlanOperationCallable().futureCall(request);
   // Do something.
   BackupPlan response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateBackupPlanRequest,BackupPlan,OperationMetadata>

createBackupVaultAsync(CreateBackupVaultRequest request)

public final OperationFuture<BackupVault,OperationMetadata> createBackupVaultAsync(CreateBackupVaultRequest request)

Creates a new BackupVault in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupVaultRequest request =
       CreateBackupVaultRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupVaultId("backupVaultId-1897432373")
           .setBackupVault(BackupVault.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   BackupVault response = backupDRClient.createBackupVaultAsync(request).get();
 }
 
Parameter
Name Description
request CreateBackupVaultRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<BackupVault,OperationMetadata>

createBackupVaultAsync(LocationName parent, BackupVault backupVault, String backupVaultId)

public final OperationFuture<BackupVault,OperationMetadata> createBackupVaultAsync(LocationName parent, BackupVault backupVault, String backupVaultId)

Creates a new BackupVault in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   BackupVault backupVault = BackupVault.newBuilder().build();
   String backupVaultId = "backupVaultId-1897432373";
   BackupVault response =
       backupDRClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. Value for parent.

backupVault BackupVault

Required. The resource being created

backupVaultId String

Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC

Returns
Type Description
OperationFuture<BackupVault,OperationMetadata>

createBackupVaultAsync(String parent, BackupVault backupVault, String backupVaultId)

public final OperationFuture<BackupVault,OperationMetadata> createBackupVaultAsync(String parent, BackupVault backupVault, String backupVaultId)

Creates a new BackupVault in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   BackupVault backupVault = BackupVault.newBuilder().build();
   String backupVaultId = "backupVaultId-1897432373";
   BackupVault response =
       backupDRClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get();
 }
 
Parameters
Name Description
parent String

Required. Value for parent.

backupVault BackupVault

Required. The resource being created

backupVaultId String

Required. ID of the requesting object If auto-generating ID server-side, remove this field and backup_vault_id from the method_signature of Create RPC

Returns
Type Description
OperationFuture<BackupVault,OperationMetadata>

createBackupVaultCallable()

public final UnaryCallable<CreateBackupVaultRequest,Operation> createBackupVaultCallable()

Creates a new BackupVault in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupVaultRequest request =
       CreateBackupVaultRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupVaultId("backupVaultId-1897432373")
           .setBackupVault(BackupVault.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   ApiFuture<Operation> future = backupDRClient.createBackupVaultCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateBackupVaultRequest,Operation>

createBackupVaultOperationCallable()

public final OperationCallable<CreateBackupVaultRequest,BackupVault,OperationMetadata> createBackupVaultOperationCallable()

Creates a new BackupVault in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateBackupVaultRequest request =
       CreateBackupVaultRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setBackupVaultId("backupVaultId-1897432373")
           .setBackupVault(BackupVault.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .build();
   OperationFuture<BackupVault, OperationMetadata> future =
       backupDRClient.createBackupVaultOperationCallable().futureCall(request);
   // Do something.
   BackupVault response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateBackupVaultRequest,BackupVault,OperationMetadata>

createManagementServerAsync(CreateManagementServerRequest request)

public final OperationFuture<ManagementServer,OperationMetadata> createManagementServerAsync(CreateManagementServerRequest request)

Creates a new ManagementServer in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateManagementServerRequest request =
       CreateManagementServerRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setManagementServerId("managementServerId-1229628127")
           .setManagementServer(ManagementServer.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ManagementServer response = backupDRClient.createManagementServerAsync(request).get();
 }
 
Parameter
Name Description
request CreateManagementServerRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<ManagementServer,OperationMetadata>

createManagementServerAsync(LocationName parent, ManagementServer managementServer, String managementServerId)

public final OperationFuture<ManagementServer,OperationMetadata> createManagementServerAsync(LocationName parent, ManagementServer managementServer, String managementServerId)

Creates a new ManagementServer in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   ManagementServer managementServer = ManagementServer.newBuilder().build();
   String managementServerId = "managementServerId-1229628127";
   ManagementServer response =
       backupDRClient
           .createManagementServerAsync(parent, managementServer, managementServerId)
           .get();
 }
 
Parameters
Name Description
parent LocationName

Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example **us-central1**.

managementServer ManagementServer

Required. A management server resource

managementServerId String

Required. The name of the management server to create. The name must be unique for the specified project and location.

Returns
Type Description
OperationFuture<ManagementServer,OperationMetadata>

createManagementServerAsync(String parent, ManagementServer managementServer, String managementServerId)

public final OperationFuture<ManagementServer,OperationMetadata> createManagementServerAsync(String parent, ManagementServer managementServer, String managementServerId)

Creates a new ManagementServer in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   ManagementServer managementServer = ManagementServer.newBuilder().build();
   String managementServerId = "managementServerId-1229628127";
   ManagementServer response =
       backupDRClient
           .createManagementServerAsync(parent, managementServer, managementServerId)
           .get();
 }
 
Parameters
Name Description
parent String

Required. The management server project and location in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR locations map to Google Cloud regions, for example **us-central1**.

managementServer ManagementServer

Required. A management server resource

managementServerId String

Required. The name of the management server to create. The name must be unique for the specified project and location.

Returns
Type Description
OperationFuture<ManagementServer,OperationMetadata>

createManagementServerCallable()

public final UnaryCallable<CreateManagementServerRequest,Operation> createManagementServerCallable()

Creates a new ManagementServer in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateManagementServerRequest request =
       CreateManagementServerRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setManagementServerId("managementServerId-1229628127")
           .setManagementServer(ManagementServer.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       backupDRClient.createManagementServerCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateManagementServerRequest,Operation>

createManagementServerOperationCallable()

public final OperationCallable<CreateManagementServerRequest,ManagementServer,OperationMetadata> createManagementServerOperationCallable()

Creates a new ManagementServer in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   CreateManagementServerRequest request =
       CreateManagementServerRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setManagementServerId("managementServerId-1229628127")
           .setManagementServer(ManagementServer.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<ManagementServer, OperationMetadata> future =
       backupDRClient.createManagementServerOperationCallable().futureCall(request);
   // Do something.
   ManagementServer response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateManagementServerRequest,ManagementServer,OperationMetadata>

deleteBackupAsync(BackupName name)

public final OperationFuture<Backup,OperationMetadata> deleteBackupAsync(BackupName name)

Deletes a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupName name =
       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
   Backup response = backupDRClient.deleteBackupAsync(name).get();
 }
 
Parameter
Name Description
name BackupName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Backup,OperationMetadata>

deleteBackupAsync(DeleteBackupRequest request)

public final OperationFuture<Backup,OperationMetadata> deleteBackupAsync(DeleteBackupRequest request)

Deletes a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupRequest request =
       DeleteBackupRequest.newBuilder()
           .setName(
               BackupName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   Backup response = backupDRClient.deleteBackupAsync(request).get();
 }
 
Parameter
Name Description
request DeleteBackupRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Backup,OperationMetadata>

deleteBackupAsync(String name)

public final OperationFuture<Backup,OperationMetadata> deleteBackupAsync(String name)

Deletes a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
           .toString();
   Backup response = backupDRClient.deleteBackupAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<Backup,OperationMetadata>

deleteBackupCallable()

public final UnaryCallable<DeleteBackupRequest,Operation> deleteBackupCallable()

Deletes a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupRequest request =
       DeleteBackupRequest.newBuilder()
           .setName(
               BackupName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = backupDRClient.deleteBackupCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteBackupRequest,Operation>

deleteBackupOperationCallable()

public final OperationCallable<DeleteBackupRequest,Backup,OperationMetadata> deleteBackupOperationCallable()

Deletes a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupRequest request =
       DeleteBackupRequest.newBuilder()
           .setName(
               BackupName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Backup, OperationMetadata> future =
       backupDRClient.deleteBackupOperationCallable().futureCall(request);
   // Do something.
   Backup response = future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteBackupRequest,Backup,OperationMetadata>

deleteBackupPlanAssociationAsync(BackupPlanAssociationName name)

public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAssociationAsync(BackupPlanAssociationName name)

Deletes a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupPlanAssociationName name =
       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
   backupDRClient.deleteBackupPlanAssociationAsync(name).get();
 }
 
Parameter
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAssociationAsync(DeleteBackupPlanAssociationRequest request)

Deletes a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupPlanAssociationRequest request =
       DeleteBackupPlanAssociationRequest.newBuilder()
           .setName(
               BackupPlanAssociationName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   backupDRClient.deleteBackupPlanAssociationAsync(request).get();
 }
 
Parameter
Name Description
request DeleteBackupPlanAssociationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupPlanAssociationAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAssociationAsync(String name)

Deletes a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
           .toString();
   backupDRClient.deleteBackupPlanAssociationAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupPlanAssociationCallable()

public final UnaryCallable<DeleteBackupPlanAssociationRequest,Operation> deleteBackupPlanAssociationCallable()

Deletes a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupPlanAssociationRequest request =
       DeleteBackupPlanAssociationRequest.newBuilder()
           .setName(
               BackupPlanAssociationName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       backupDRClient.deleteBackupPlanAssociationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteBackupPlanAssociationRequest,Operation>

deleteBackupPlanAssociationOperationCallable()

public final OperationCallable<DeleteBackupPlanAssociationRequest,Empty,OperationMetadata> deleteBackupPlanAssociationOperationCallable()

Deletes a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupPlanAssociationRequest request =
       DeleteBackupPlanAssociationRequest.newBuilder()
           .setName(
               BackupPlanAssociationName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       backupDRClient.deleteBackupPlanAssociationOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteBackupPlanAssociationRequest,Empty,OperationMetadata>

deleteBackupPlanAsync(BackupPlanName name)

public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAsync(BackupPlanName name)

Deletes a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
   backupDRClient.deleteBackupPlanAsync(name).get();
 }
 
Parameter
Name Description
name BackupPlanName

Required. The resource name of the BackupPlan to delete.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupPlanAsync(DeleteBackupPlanRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAsync(DeleteBackupPlanRequest request)

Deletes a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupPlanRequest request =
       DeleteBackupPlanRequest.newBuilder()
           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
           .setRequestId("requestId693933066")
           .build();
   backupDRClient.deleteBackupPlanAsync(request).get();
 }
 
Parameter
Name Description
request DeleteBackupPlanRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupPlanAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAsync(String name)

Deletes a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
   backupDRClient.deleteBackupPlanAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The resource name of the BackupPlan to delete.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupPlanCallable()

public final UnaryCallable<DeleteBackupPlanRequest,Operation> deleteBackupPlanCallable()

Deletes a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupPlanRequest request =
       DeleteBackupPlanRequest.newBuilder()
           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = backupDRClient.deleteBackupPlanCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteBackupPlanRequest,Operation>

deleteBackupPlanOperationCallable()

public final OperationCallable<DeleteBackupPlanRequest,Empty,OperationMetadata> deleteBackupPlanOperationCallable()

Deletes a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupPlanRequest request =
       DeleteBackupPlanRequest.newBuilder()
           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       backupDRClient.deleteBackupPlanOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteBackupPlanRequest,Empty,OperationMetadata>

deleteBackupVaultAsync(BackupVaultName name)

public final OperationFuture<Empty,OperationMetadata> deleteBackupVaultAsync(BackupVaultName name)

Deletes a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
   backupDRClient.deleteBackupVaultAsync(name).get();
 }
 
Parameter
Name Description
name BackupVaultName

Required. Name of the resource.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupVaultAsync(DeleteBackupVaultRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteBackupVaultAsync(DeleteBackupVaultRequest request)

Deletes a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupVaultRequest request =
       DeleteBackupVaultRequest.newBuilder()
           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .setEtag("etag3123477")
           .setValidateOnly(true)
           .setAllowMissing(true)
           .build();
   backupDRClient.deleteBackupVaultAsync(request).get();
 }
 
Parameter
Name Description
request DeleteBackupVaultRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupVaultAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteBackupVaultAsync(String name)

Deletes a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString();
   backupDRClient.deleteBackupVaultAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the resource.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteBackupVaultCallable()

public final UnaryCallable<DeleteBackupVaultRequest,Operation> deleteBackupVaultCallable()

Deletes a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupVaultRequest request =
       DeleteBackupVaultRequest.newBuilder()
           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .setEtag("etag3123477")
           .setValidateOnly(true)
           .setAllowMissing(true)
           .build();
   ApiFuture<Operation> future = backupDRClient.deleteBackupVaultCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteBackupVaultRequest,Operation>

deleteBackupVaultOperationCallable()

public final OperationCallable<DeleteBackupVaultRequest,Empty,OperationMetadata> deleteBackupVaultOperationCallable()

Deletes a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteBackupVaultRequest request =
       DeleteBackupVaultRequest.newBuilder()
           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .setEtag("etag3123477")
           .setValidateOnly(true)
           .setAllowMissing(true)
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       backupDRClient.deleteBackupVaultOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteBackupVaultRequest,Empty,OperationMetadata>

deleteManagementServerAsync(DeleteManagementServerRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteManagementServerAsync(DeleteManagementServerRequest request)

Deletes a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteManagementServerRequest request =
       DeleteManagementServerRequest.newBuilder()
           .setName(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   backupDRClient.deleteManagementServerAsync(request).get();
 }
 
Parameter
Name Description
request DeleteManagementServerRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteManagementServerAsync(ManagementServerName name)

public final OperationFuture<Empty,OperationMetadata> deleteManagementServerAsync(ManagementServerName name)

Deletes a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ManagementServerName name =
       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
   backupDRClient.deleteManagementServerAsync(name).get();
 }
 
Parameter
Name Description
name ManagementServerName

Required. Name of the resource

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteManagementServerAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteManagementServerAsync(String name)

Deletes a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString();
   backupDRClient.deleteManagementServerAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Name of the resource

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteManagementServerCallable()

public final UnaryCallable<DeleteManagementServerRequest,Operation> deleteManagementServerCallable()

Deletes a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteManagementServerRequest request =
       DeleteManagementServerRequest.newBuilder()
           .setName(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       backupDRClient.deleteManagementServerCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteManagementServerRequest,Operation>

deleteManagementServerOperationCallable()

public final OperationCallable<DeleteManagementServerRequest,Empty,OperationMetadata> deleteManagementServerOperationCallable()

Deletes a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DeleteManagementServerRequest request =
       DeleteManagementServerRequest.newBuilder()
           .setName(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       backupDRClient.deleteManagementServerOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteManagementServerRequest,Empty,OperationMetadata>

fetchUsableBackupVaults(FetchUsableBackupVaultsRequest request)

public final BackupDRClient.FetchUsableBackupVaultsPagedResponse fetchUsableBackupVaults(FetchUsableBackupVaultsRequest request)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   FetchUsableBackupVaultsRequest request =
       FetchUsableBackupVaultsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (BackupVault element : backupDRClient.fetchUsableBackupVaults(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request FetchUsableBackupVaultsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupDRClient.FetchUsableBackupVaultsPagedResponse

fetchUsableBackupVaults(LocationName parent)

public final BackupDRClient.FetchUsableBackupVaultsPagedResponse fetchUsableBackupVaults(LocationName parent)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (BackupVault element : backupDRClient.fetchUsableBackupVaults(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example

  • *us-central1**. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.FetchUsableBackupVaultsPagedResponse

fetchUsableBackupVaults(String parent)

public final BackupDRClient.FetchUsableBackupVaultsPagedResponse fetchUsableBackupVaults(String parent)

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (BackupVault element : backupDRClient.fetchUsableBackupVaults(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example

  • *us-central1**. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.FetchUsableBackupVaultsPagedResponse

fetchUsableBackupVaultsCallable()

public final UnaryCallable<FetchUsableBackupVaultsRequest,FetchUsableBackupVaultsResponse> fetchUsableBackupVaultsCallable()

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   FetchUsableBackupVaultsRequest request =
       FetchUsableBackupVaultsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     FetchUsableBackupVaultsResponse response =
         backupDRClient.fetchUsableBackupVaultsCallable().call(request);
     for (BackupVault element : response.getBackupVaultsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<FetchUsableBackupVaultsRequest,FetchUsableBackupVaultsResponse>

fetchUsableBackupVaultsPagedCallable()

public final UnaryCallable<FetchUsableBackupVaultsRequest,BackupDRClient.FetchUsableBackupVaultsPagedResponse> fetchUsableBackupVaultsPagedCallable()

FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   FetchUsableBackupVaultsRequest request =
       FetchUsableBackupVaultsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<BackupVault> future =
       backupDRClient.fetchUsableBackupVaultsPagedCallable().futureCall(request);
   // Do something.
   for (BackupVault element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<FetchUsableBackupVaultsRequest,FetchUsableBackupVaultsPagedResponse>

getBackup(BackupName name)

public final Backup getBackup(BackupName name)

Gets details of a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupName name =
       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
   Backup response = backupDRClient.getBackup(name);
 }
 
Parameter
Name Description
name BackupName

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'

Returns
Type Description
Backup

getBackup(GetBackupRequest request)

public final Backup getBackup(GetBackupRequest request)

Gets details of a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetBackupRequest request =
       GetBackupRequest.newBuilder()
           .setName(
               BackupName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
                   .toString())
           .setView(BackupView.forNumber(0))
           .build();
   Backup response = backupDRClient.getBackup(request);
 }
 
Parameter
Name Description
request GetBackupRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Backup

getBackup(String name)

public final Backup getBackup(String name)

Gets details of a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
           .toString();
   Backup response = backupDRClient.getBackup(name);
 }
 
Parameter
Name Description
name String

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'

Returns
Type Description
Backup

getBackupCallable()

public final UnaryCallable<GetBackupRequest,Backup> getBackupCallable()

Gets details of a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetBackupRequest request =
       GetBackupRequest.newBuilder()
           .setName(
               BackupName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
                   .toString())
           .setView(BackupView.forNumber(0))
           .build();
   ApiFuture<Backup> future = backupDRClient.getBackupCallable().futureCall(request);
   // Do something.
   Backup response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetBackupRequest,Backup>

getBackupPlan(BackupPlanName name)

public final BackupPlan getBackupPlan(BackupPlanName name)

Gets details of a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
   BackupPlan response = backupDRClient.getBackupPlan(name);
 }
 
Parameter
Name Description
name BackupPlanName

Required. The resource name of the BackupPlan to retrieve.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

Returns
Type Description
BackupPlan

getBackupPlan(GetBackupPlanRequest request)

public final BackupPlan getBackupPlan(GetBackupPlanRequest request)

Gets details of a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetBackupPlanRequest request =
       GetBackupPlanRequest.newBuilder()
           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
           .build();
   BackupPlan response = backupDRClient.getBackupPlan(request);
 }
 
Parameter
Name Description
request GetBackupPlanRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupPlan

getBackupPlan(String name)

public final BackupPlan getBackupPlan(String name)

Gets details of a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
   BackupPlan response = backupDRClient.getBackupPlan(name);
 }
 
Parameter
Name Description
name String

Required. The resource name of the BackupPlan to retrieve.

Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}

Returns
Type Description
BackupPlan

getBackupPlanAssociation(BackupPlanAssociationName name)

public final BackupPlanAssociation getBackupPlanAssociation(BackupPlanAssociationName name)

Gets details of a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupPlanAssociationName name =
       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
   BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(name);
 }
 
Parameter
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

Returns
Type Description
BackupPlanAssociation

getBackupPlanAssociation(GetBackupPlanAssociationRequest request)

public final BackupPlanAssociation getBackupPlanAssociation(GetBackupPlanAssociationRequest request)

Gets details of a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetBackupPlanAssociationRequest request =
       GetBackupPlanAssociationRequest.newBuilder()
           .setName(
               BackupPlanAssociationName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
                   .toString())
           .build();
   BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(request);
 }
 
Parameter
Name Description
request GetBackupPlanAssociationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupPlanAssociation

getBackupPlanAssociation(String name)

public final BackupPlanAssociation getBackupPlanAssociation(String name)

Gets details of a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
           .toString();
   BackupPlanAssociation response = backupDRClient.getBackupPlanAssociation(name);
 }
 
Parameter
Name Description
name String

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

Returns
Type Description
BackupPlanAssociation

getBackupPlanAssociationCallable()

public final UnaryCallable<GetBackupPlanAssociationRequest,BackupPlanAssociation> getBackupPlanAssociationCallable()

Gets details of a single BackupPlanAssociation.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetBackupPlanAssociationRequest request =
       GetBackupPlanAssociationRequest.newBuilder()
           .setName(
               BackupPlanAssociationName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
                   .toString())
           .build();
   ApiFuture<BackupPlanAssociation> future =
       backupDRClient.getBackupPlanAssociationCallable().futureCall(request);
   // Do something.
   BackupPlanAssociation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetBackupPlanAssociationRequest,BackupPlanAssociation>

getBackupPlanCallable()

public final UnaryCallable<GetBackupPlanRequest,BackupPlan> getBackupPlanCallable()

Gets details of a single BackupPlan.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetBackupPlanRequest request =
       GetBackupPlanRequest.newBuilder()
           .setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
           .build();
   ApiFuture<BackupPlan> future = backupDRClient.getBackupPlanCallable().futureCall(request);
   // Do something.
   BackupPlan response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetBackupPlanRequest,BackupPlan>

getBackupVault(BackupVaultName name)

public final BackupVault getBackupVault(BackupVaultName name)

Gets details of a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
   BackupVault response = backupDRClient.getBackupVault(name);
 }
 
Parameter
Name Description
name BackupVaultName

Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'

Returns
Type Description
BackupVault

getBackupVault(GetBackupVaultRequest request)

public final BackupVault getBackupVault(GetBackupVaultRequest request)

Gets details of a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetBackupVaultRequest request =
       GetBackupVaultRequest.newBuilder()
           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
           .setView(BackupVaultView.forNumber(0))
           .build();
   BackupVault response = backupDRClient.getBackupVault(request);
 }
 
Parameter
Name Description
request GetBackupVaultRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupVault

getBackupVault(String name)

public final BackupVault getBackupVault(String name)

Gets details of a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString();
   BackupVault response = backupDRClient.getBackupVault(name);
 }
 
Parameter
Name Description
name String

Required. Name of the backupvault store resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'

Returns
Type Description
BackupVault

getBackupVaultCallable()

public final UnaryCallable<GetBackupVaultRequest,BackupVault> getBackupVaultCallable()

Gets details of a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetBackupVaultRequest request =
       GetBackupVaultRequest.newBuilder()
           .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
           .setView(BackupVaultView.forNumber(0))
           .build();
   ApiFuture<BackupVault> future = backupDRClient.getBackupVaultCallable().futureCall(request);
   // Do something.
   BackupVault response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetBackupVaultRequest,BackupVault>

getDataSource(DataSourceName name)

public final DataSource getDataSource(DataSourceName name)

Gets details of a DataSource.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DataSourceName name =
       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
   DataSource response = backupDRClient.getDataSource(name);
 }
 
Parameter
Name Description
name DataSourceName

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'

Returns
Type Description
DataSource

getDataSource(GetDataSourceRequest request)

public final DataSource getDataSource(GetDataSourceRequest request)

Gets details of a DataSource.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetDataSourceRequest request =
       GetDataSourceRequest.newBuilder()
           .setName(
               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
                   .toString())
           .build();
   DataSource response = backupDRClient.getDataSource(request);
 }
 
Parameter
Name Description
request GetDataSourceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
DataSource

getDataSource(String name)

public final DataSource getDataSource(String name)

Gets details of a DataSource.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
   DataSource response = backupDRClient.getDataSource(name);
 }
 
Parameter
Name Description
name String

Required. Name of the data source resource name, in the format 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'

Returns
Type Description
DataSource

getDataSourceCallable()

public final UnaryCallable<GetDataSourceRequest,DataSource> getDataSourceCallable()

Gets details of a DataSource.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetDataSourceRequest request =
       GetDataSourceRequest.newBuilder()
           .setName(
               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
                   .toString())
           .build();
   ApiFuture<DataSource> future = backupDRClient.getDataSourceCallable().futureCall(request);
   // Do something.
   DataSource response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetDataSourceRequest,DataSource>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getIamPolicy(GetIamPolicyRequest request)

public final Policy getIamPolicy(GetIamPolicyRequest request)

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   Policy response = backupDRClient.getIamPolicy(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.GetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.Policy

getIamPolicyCallable()

public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetIamPolicyRequest request =
       GetIamPolicyRequest.newBuilder()
           .setResource(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .setOptions(GetPolicyOptions.newBuilder().build())
           .build();
   ApiFuture<Policy> future = backupDRClient.getIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = backupDRClient.getLocation(request);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future = backupDRClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getManagementServer(GetManagementServerRequest request)

public final ManagementServer getManagementServer(GetManagementServerRequest request)

Gets details of a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetManagementServerRequest request =
       GetManagementServerRequest.newBuilder()
           .setName(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .build();
   ManagementServer response = backupDRClient.getManagementServer(request);
 }
 
Parameter
Name Description
request GetManagementServerRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
ManagementServer

getManagementServer(ManagementServerName name)

public final ManagementServer getManagementServer(ManagementServerName name)

Gets details of a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ManagementServerName name =
       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]");
   ManagementServer response = backupDRClient.getManagementServer(name);
 }
 
Parameter
Name Description
name ManagementServerName

Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'

Returns
Type Description
ManagementServer

getManagementServer(String name)

public final ManagementServer getManagementServer(String name)

Gets details of a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]").toString();
   ManagementServer response = backupDRClient.getManagementServer(name);
 }
 
Parameter
Name Description
name String

Required. Name of the management server resource name, in the format 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'

Returns
Type Description
ManagementServer

getManagementServerCallable()

public final UnaryCallable<GetManagementServerRequest,ManagementServer> getManagementServerCallable()

Gets details of a single ManagementServer.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   GetManagementServerRequest request =
       GetManagementServerRequest.newBuilder()
           .setName(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .build();
   ApiFuture<ManagementServer> future =
       backupDRClient.getManagementServerCallable().futureCall(request);
   // Do something.
   ManagementServer response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetManagementServerRequest,ManagementServer>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getSettings()

public final BackupDRSettings getSettings()
Returns
Type Description
BackupDRSettings

getStub()

public BackupDRStub getStub()
Returns
Type Description
BackupDRStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listBackupPlanAssociations(ListBackupPlanAssociationsRequest request)

public final BackupDRClient.ListBackupPlanAssociationsPagedResponse listBackupPlanAssociations(ListBackupPlanAssociationsRequest request)

Lists BackupPlanAssociations in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupPlanAssociationsRequest request =
       ListBackupPlanAssociationsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (BackupPlanAssociation element :
       backupDRClient.listBackupPlanAssociations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListBackupPlanAssociationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupDRClient.ListBackupPlanAssociationsPagedResponse

listBackupPlanAssociations(LocationName parent)

public final BackupDRClient.ListBackupPlanAssociationsPagedResponse listBackupPlanAssociations(LocationName parent)

Lists BackupPlanAssociations in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (BackupPlanAssociation element :
       backupDRClient.listBackupPlanAssociations(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location for which to retrieve backup Plan Associations information, in the format projects/{project_id}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for example **us-central1**. To retrieve backup plan associations for all locations, use "-" for the {location} value.

Returns
Type Description
BackupDRClient.ListBackupPlanAssociationsPagedResponse

listBackupPlanAssociations(String parent)

public final BackupDRClient.ListBackupPlanAssociationsPagedResponse listBackupPlanAssociations(String parent)

Lists BackupPlanAssociations in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (BackupPlanAssociation element :
       backupDRClient.listBackupPlanAssociations(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location for which to retrieve backup Plan Associations information, in the format projects/{project_id}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for example **us-central1**. To retrieve backup plan associations for all locations, use "-" for the {location} value.

Returns
Type Description
BackupDRClient.ListBackupPlanAssociationsPagedResponse

listBackupPlanAssociationsCallable()

public final UnaryCallable<ListBackupPlanAssociationsRequest,ListBackupPlanAssociationsResponse> listBackupPlanAssociationsCallable()

Lists BackupPlanAssociations in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupPlanAssociationsRequest request =
       ListBackupPlanAssociationsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListBackupPlanAssociationsResponse response =
         backupDRClient.listBackupPlanAssociationsCallable().call(request);
     for (BackupPlanAssociation element : response.getBackupPlanAssociationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupPlanAssociationsRequest,ListBackupPlanAssociationsResponse>

listBackupPlanAssociationsPagedCallable()

public final UnaryCallable<ListBackupPlanAssociationsRequest,BackupDRClient.ListBackupPlanAssociationsPagedResponse> listBackupPlanAssociationsPagedCallable()

Lists BackupPlanAssociations in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupPlanAssociationsRequest request =
       ListBackupPlanAssociationsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<BackupPlanAssociation> future =
       backupDRClient.listBackupPlanAssociationsPagedCallable().futureCall(request);
   // Do something.
   for (BackupPlanAssociation element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupPlanAssociationsRequest,ListBackupPlanAssociationsPagedResponse>

listBackupPlans(ListBackupPlansRequest request)

public final BackupDRClient.ListBackupPlansPagedResponse listBackupPlans(ListBackupPlansRequest request)

Lists BackupPlans in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupPlansRequest request =
       ListBackupPlansRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (BackupPlan element : backupDRClient.listBackupPlans(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListBackupPlansRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupDRClient.ListBackupPlansPagedResponse

listBackupPlans(LocationName parent)

public final BackupDRClient.ListBackupPlansPagedResponse listBackupPlans(LocationName parent)

Lists BackupPlans in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (BackupPlan element : backupDRClient.listBackupPlans(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location for which to retrieve BackupPlans information. Format: projects/{project}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. To retrieve backup plans for all locations, use "-" for the {location} value.

Returns
Type Description
BackupDRClient.ListBackupPlansPagedResponse

listBackupPlans(String parent)

public final BackupDRClient.ListBackupPlansPagedResponse listBackupPlans(String parent)

Lists BackupPlans in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (BackupPlan element : backupDRClient.listBackupPlans(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location for which to retrieve BackupPlans information. Format: projects/{project}/locations/{location}. In Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**. To retrieve backup plans for all locations, use "-" for the {location} value.

Returns
Type Description
BackupDRClient.ListBackupPlansPagedResponse

listBackupPlansCallable()

public final UnaryCallable<ListBackupPlansRequest,ListBackupPlansResponse> listBackupPlansCallable()

Lists BackupPlans in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupPlansRequest request =
       ListBackupPlansRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListBackupPlansResponse response = backupDRClient.listBackupPlansCallable().call(request);
     for (BackupPlan element : response.getBackupPlansList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupPlansRequest,ListBackupPlansResponse>

listBackupPlansPagedCallable()

public final UnaryCallable<ListBackupPlansRequest,BackupDRClient.ListBackupPlansPagedResponse> listBackupPlansPagedCallable()

Lists BackupPlans in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupPlansRequest request =
       ListBackupPlansRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<BackupPlan> future =
       backupDRClient.listBackupPlansPagedCallable().futureCall(request);
   // Do something.
   for (BackupPlan element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupPlansRequest,ListBackupPlansPagedResponse>

listBackupVaults(ListBackupVaultsRequest request)

public final BackupDRClient.ListBackupVaultsPagedResponse listBackupVaults(ListBackupVaultsRequest request)

Lists BackupVaults in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupVaultsRequest request =
       ListBackupVaultsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(BackupVaultView.forNumber(0))
           .build();
   for (BackupVault element : backupDRClient.listBackupVaults(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListBackupVaultsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupDRClient.ListBackupVaultsPagedResponse

listBackupVaults(LocationName parent)

public final BackupDRClient.ListBackupVaultsPagedResponse listBackupVaults(LocationName parent)

Lists BackupVaults in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (BackupVault element : backupDRClient.listBackupVaults(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example

  • *us-central1**. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.ListBackupVaultsPagedResponse

listBackupVaults(String parent)

public final BackupDRClient.ListBackupVaultsPagedResponse listBackupVaults(String parent)

Lists BackupVaults in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (BackupVault element : backupDRClient.listBackupVaults(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location for which to retrieve backupvault stores information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example

  • *us-central1**. To retrieve backupvault stores for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.ListBackupVaultsPagedResponse

listBackupVaultsCallable()

public final UnaryCallable<ListBackupVaultsRequest,ListBackupVaultsResponse> listBackupVaultsCallable()

Lists BackupVaults in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupVaultsRequest request =
       ListBackupVaultsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(BackupVaultView.forNumber(0))
           .build();
   while (true) {
     ListBackupVaultsResponse response = backupDRClient.listBackupVaultsCallable().call(request);
     for (BackupVault element : response.getBackupVaultsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupVaultsRequest,ListBackupVaultsResponse>

listBackupVaultsPagedCallable()

public final UnaryCallable<ListBackupVaultsRequest,BackupDRClient.ListBackupVaultsPagedResponse> listBackupVaultsPagedCallable()

Lists BackupVaults in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupVaultsRequest request =
       ListBackupVaultsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(BackupVaultView.forNumber(0))
           .build();
   ApiFuture<BackupVault> future =
       backupDRClient.listBackupVaultsPagedCallable().futureCall(request);
   // Do something.
   for (BackupVault element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupVaultsRequest,ListBackupVaultsPagedResponse>

listBackups(DataSourceName parent)

public final BackupDRClient.ListBackupsPagedResponse listBackups(DataSourceName parent)

Lists Backups in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DataSourceName parent =
       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
   for (Backup element : backupDRClient.listBackups(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent DataSourceName

Required. The project and location for which to retrieve backup information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. To retrieve data sources for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.ListBackupsPagedResponse

listBackups(ListBackupsRequest request)

public final BackupDRClient.ListBackupsPagedResponse listBackups(ListBackupsRequest request)

Lists Backups in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupsRequest request =
       ListBackupsRequest.newBuilder()
           .setParent(
               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(BackupView.forNumber(0))
           .build();
   for (Backup element : backupDRClient.listBackups(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListBackupsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupDRClient.ListBackupsPagedResponse

listBackups(String parent)

public final BackupDRClient.ListBackupsPagedResponse listBackups(String parent)

Lists Backups in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent =
       DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
   for (Backup element : backupDRClient.listBackups(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location for which to retrieve backup information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. To retrieve data sources for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.ListBackupsPagedResponse

listBackupsCallable()

public final UnaryCallable<ListBackupsRequest,ListBackupsResponse> listBackupsCallable()

Lists Backups in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupsRequest request =
       ListBackupsRequest.newBuilder()
           .setParent(
               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(BackupView.forNumber(0))
           .build();
   while (true) {
     ListBackupsResponse response = backupDRClient.listBackupsCallable().call(request);
     for (Backup element : response.getBackupsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupsRequest,ListBackupsResponse>

listBackupsPagedCallable()

public final UnaryCallable<ListBackupsRequest,BackupDRClient.ListBackupsPagedResponse> listBackupsPagedCallable()

Lists Backups in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListBackupsRequest request =
       ListBackupsRequest.newBuilder()
           .setParent(
               DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setView(BackupView.forNumber(0))
           .build();
   ApiFuture<Backup> future = backupDRClient.listBackupsPagedCallable().futureCall(request);
   // Do something.
   for (Backup element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupsRequest,ListBackupsPagedResponse>

listDataSources(BackupVaultName parent)

public final BackupDRClient.ListDataSourcesPagedResponse listDataSources(BackupVaultName parent)

Lists DataSources in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
   for (DataSource element : backupDRClient.listDataSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent BackupVaultName

Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. To retrieve data sources for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.ListDataSourcesPagedResponse

listDataSources(ListDataSourcesRequest request)

public final BackupDRClient.ListDataSourcesPagedResponse listDataSources(ListDataSourcesRequest request)

Lists DataSources in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListDataSourcesRequest request =
       ListDataSourcesRequest.newBuilder()
           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (DataSource element : backupDRClient.listDataSources(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListDataSourcesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupDRClient.ListDataSourcesPagedResponse

listDataSources(String parent)

public final BackupDRClient.ListDataSourcesPagedResponse listDataSources(String parent)

Lists DataSources in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString();
   for (DataSource element : backupDRClient.listDataSources(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location for which to retrieve data sources information, in the format 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR, locations map to Google Cloud regions, for example **us-central1**. To retrieve data sources for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.ListDataSourcesPagedResponse

listDataSourcesCallable()

public final UnaryCallable<ListDataSourcesRequest,ListDataSourcesResponse> listDataSourcesCallable()

Lists DataSources in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListDataSourcesRequest request =
       ListDataSourcesRequest.newBuilder()
           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListDataSourcesResponse response = backupDRClient.listDataSourcesCallable().call(request);
     for (DataSource element : response.getDataSourcesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListDataSourcesRequest,ListDataSourcesResponse>

listDataSourcesPagedCallable()

public final UnaryCallable<ListDataSourcesRequest,BackupDRClient.ListDataSourcesPagedResponse> listDataSourcesPagedCallable()

Lists DataSources in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListDataSourcesRequest request =
       ListDataSourcesRequest.newBuilder()
           .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<DataSource> future =
       backupDRClient.listDataSourcesPagedCallable().futureCall(request);
   // Do something.
   for (DataSource element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListDataSourcesRequest,ListDataSourcesPagedResponse>

listLocations(ListLocationsRequest request)

public final BackupDRClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : backupDRClient.listLocations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupDRClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response = backupDRClient.listLocationsCallable().call(request);
     for (Location element : response.getLocationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,BackupDRClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future = backupDRClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

listManagementServers(ListManagementServersRequest request)

public final BackupDRClient.ListManagementServersPagedResponse listManagementServers(ListManagementServersRequest request)

Lists ManagementServers in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListManagementServersRequest request =
       ListManagementServersRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (ManagementServer element : backupDRClient.listManagementServers(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListManagementServersRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupDRClient.ListManagementServersPagedResponse

listManagementServers(LocationName parent)

public final BackupDRClient.ListManagementServersPagedResponse listManagementServers(LocationName parent)

Lists ManagementServers in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (ManagementServer element : backupDRClient.listManagementServers(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The project and location for which to retrieve management servers information, in the format 'projects/{project_id}/locations/{location}'. In Cloud BackupDR, locations map to Google Cloud regions, for example

  • *us-central1**. To retrieve management servers for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.ListManagementServersPagedResponse

listManagementServers(String parent)

public final BackupDRClient.ListManagementServersPagedResponse listManagementServers(String parent)

Lists ManagementServers in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (ManagementServer element : backupDRClient.listManagementServers(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The project and location for which to retrieve management servers information, in the format 'projects/{project_id}/locations/{location}'. In Cloud BackupDR, locations map to Google Cloud regions, for example

  • *us-central1**. To retrieve management servers for all locations, use "-" for the '{location}' value.

Returns
Type Description
BackupDRClient.ListManagementServersPagedResponse

listManagementServersCallable()

public final UnaryCallable<ListManagementServersRequest,ListManagementServersResponse> listManagementServersCallable()

Lists ManagementServers in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListManagementServersRequest request =
       ListManagementServersRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListManagementServersResponse response =
         backupDRClient.listManagementServersCallable().call(request);
     for (ManagementServer element : response.getManagementServersList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListManagementServersRequest,ListManagementServersResponse>

listManagementServersPagedCallable()

public final UnaryCallable<ListManagementServersRequest,BackupDRClient.ListManagementServersPagedResponse> listManagementServersPagedCallable()

Lists ManagementServers in a given project and location.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   ListManagementServersRequest request =
       ListManagementServersRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<ManagementServer> future =
       backupDRClient.listManagementServersPagedCallable().futureCall(request);
   // Do something.
   for (ManagementServer element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListManagementServersRequest,ListManagementServersPagedResponse>

restoreBackupAsync(BackupName name)

public final OperationFuture<RestoreBackupResponse,OperationMetadata> restoreBackupAsync(BackupName name)

Restore from a Backup

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupName name =
       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]");
   RestoreBackupResponse response = backupDRClient.restoreBackupAsync(name).get();
 }
 
Parameter
Name Description
name BackupName

Required. The resource name of the Backup instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.

Returns
Type Description
OperationFuture<RestoreBackupResponse,OperationMetadata>

restoreBackupAsync(RestoreBackupRequest request)

public final OperationFuture<RestoreBackupResponse,OperationMetadata> restoreBackupAsync(RestoreBackupRequest request)

Restore from a Backup

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   RestoreBackupRequest request =
       RestoreBackupRequest.newBuilder()
           .setName(
               BackupName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   RestoreBackupResponse response = backupDRClient.restoreBackupAsync(request).get();
 }
 
Parameter
Name Description
request RestoreBackupRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<RestoreBackupResponse,OperationMetadata>

restoreBackupAsync(String name)

public final OperationFuture<RestoreBackupResponse,OperationMetadata> restoreBackupAsync(String name)

Restore from a Backup

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
           .toString();
   RestoreBackupResponse response = backupDRClient.restoreBackupAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The resource name of the Backup instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/*/backups/'.

Returns
Type Description
OperationFuture<RestoreBackupResponse,OperationMetadata>

restoreBackupCallable()

public final UnaryCallable<RestoreBackupRequest,Operation> restoreBackupCallable()

Restore from a Backup

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   RestoreBackupRequest request =
       RestoreBackupRequest.newBuilder()
           .setName(
               BackupName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = backupDRClient.restoreBackupCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<RestoreBackupRequest,Operation>

restoreBackupOperationCallable()

public final OperationCallable<RestoreBackupRequest,RestoreBackupResponse,OperationMetadata> restoreBackupOperationCallable()

Restore from a Backup

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   RestoreBackupRequest request =
       RestoreBackupRequest.newBuilder()
           .setName(
               BackupName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<RestoreBackupResponse, OperationMetadata> future =
       backupDRClient.restoreBackupOperationCallable().futureCall(request);
   // Do something.
   RestoreBackupResponse response = future.get();
 }
 
Returns
Type Description
OperationCallable<RestoreBackupRequest,RestoreBackupResponse,OperationMetadata>

setIamPolicy(SetIamPolicyRequest request)

public final Policy setIamPolicy(SetIamPolicyRequest request)

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Policy response = backupDRClient.setIamPolicy(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.SetIamPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.Policy

setIamPolicyCallable()

public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIEDerrors.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   SetIamPolicyRequest request =
       SetIamPolicyRequest.newBuilder()
           .setResource(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .setPolicy(Policy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Policy> future = backupDRClient.setIamPolicyCallable().futureCall(request);
   // Do something.
   Policy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

testIamPermissions(TestIamPermissionsRequest request)

public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   TestIamPermissionsResponse response = backupDRClient.testIamPermissions(request);
 }
 
Parameter
Name Description
request com.google.iam.v1.TestIamPermissionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.iam.v1.TestIamPermissionsResponse

testIamPermissionsCallable()

public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a NOT_FOUND error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   TestIamPermissionsRequest request =
       TestIamPermissionsRequest.newBuilder()
           .setResource(
               ManagementServerName.of("[PROJECT]", "[LOCATION]", "[MANAGEMENTSERVER]")
                   .toString())
           .addAllPermissions(new ArrayList<String>())
           .build();
   ApiFuture<TestIamPermissionsResponse> future =
       backupDRClient.testIamPermissionsCallable().futureCall(request);
   // Do something.
   TestIamPermissionsResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

triggerBackupAsync(BackupPlanAssociationName name, String ruleId)

public final OperationFuture<BackupPlanAssociation,OperationMetadata> triggerBackupAsync(BackupPlanAssociationName name, String ruleId)

Triggers a new Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupPlanAssociationName name =
       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]");
   String ruleId = "ruleId-919875273";
   BackupPlanAssociation response = backupDRClient.triggerBackupAsync(name, ruleId).get();
 }
 
Parameters
Name Description
name BackupPlanAssociationName

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

ruleId String

Required. backup rule_id for which a backup needs to be triggered.

Returns
Type Description
OperationFuture<BackupPlanAssociation,OperationMetadata>

triggerBackupAsync(TriggerBackupRequest request)

public final OperationFuture<BackupPlanAssociation,OperationMetadata> triggerBackupAsync(TriggerBackupRequest request)

Triggers a new Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   TriggerBackupRequest request =
       TriggerBackupRequest.newBuilder()
           .setName(
               BackupPlanAssociationName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
                   .toString())
           .setRuleId("ruleId-919875273")
           .setRequestId("requestId693933066")
           .build();
   BackupPlanAssociation response = backupDRClient.triggerBackupAsync(request).get();
 }
 
Parameter
Name Description
request TriggerBackupRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<BackupPlanAssociation,OperationMetadata>

triggerBackupAsync(String name, String ruleId)

public final OperationFuture<BackupPlanAssociation,OperationMetadata> triggerBackupAsync(String name, String ruleId)

Triggers a new Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   String name =
       BackupPlanAssociationName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
           .toString();
   String ruleId = "ruleId-919875273";
   BackupPlanAssociation response = backupDRClient.triggerBackupAsync(name, ruleId).get();
 }
 
Parameters
Name Description
name String

Required. Name of the backup plan association resource, in the format projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}

ruleId String

Required. backup rule_id for which a backup needs to be triggered.

Returns
Type Description
OperationFuture<BackupPlanAssociation,OperationMetadata>

triggerBackupCallable()

public final UnaryCallable<TriggerBackupRequest,Operation> triggerBackupCallable()

Triggers a new Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   TriggerBackupRequest request =
       TriggerBackupRequest.newBuilder()
           .setName(
               BackupPlanAssociationName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
                   .toString())
           .setRuleId("ruleId-919875273")
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = backupDRClient.triggerBackupCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<TriggerBackupRequest,Operation>

triggerBackupOperationCallable()

public final OperationCallable<TriggerBackupRequest,BackupPlanAssociation,OperationMetadata> triggerBackupOperationCallable()

Triggers a new Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   TriggerBackupRequest request =
       TriggerBackupRequest.newBuilder()
           .setName(
               BackupPlanAssociationName.of(
                       "[PROJECT]", "[LOCATION]", "[BACKUP_PLAN_ASSOCIATION]")
                   .toString())
           .setRuleId("ruleId-919875273")
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<BackupPlanAssociation, OperationMetadata> future =
       backupDRClient.triggerBackupOperationCallable().futureCall(request);
   // Do something.
   BackupPlanAssociation response = future.get();
 }
 
Returns
Type Description
OperationCallable<TriggerBackupRequest,BackupPlanAssociation,OperationMetadata>

updateBackupAsync(Backup backup, FieldMask updateMask)

public final OperationFuture<Backup,OperationMetadata> updateBackupAsync(Backup backup, FieldMask updateMask)

Updates the settings of a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   Backup backup = Backup.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Backup response = backupDRClient.updateBackupAsync(backup, updateMask).get();
 }
 
Parameters
Name Description
backup Backup

Required. The resource being updated

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<Backup,OperationMetadata>

updateBackupAsync(UpdateBackupRequest request)

public final OperationFuture<Backup,OperationMetadata> updateBackupAsync(UpdateBackupRequest request)

Updates the settings of a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateBackupRequest request =
       UpdateBackupRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setBackup(Backup.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Backup response = backupDRClient.updateBackupAsync(request).get();
 }
 
Parameter
Name Description
request UpdateBackupRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Backup,OperationMetadata>

updateBackupCallable()

public final UnaryCallable<UpdateBackupRequest,Operation> updateBackupCallable()

Updates the settings of a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateBackupRequest request =
       UpdateBackupRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setBackup(Backup.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = backupDRClient.updateBackupCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateBackupRequest,Operation>

updateBackupOperationCallable()

public final OperationCallable<UpdateBackupRequest,Backup,OperationMetadata> updateBackupOperationCallable()

Updates the settings of a Backup.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateBackupRequest request =
       UpdateBackupRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setBackup(Backup.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Backup, OperationMetadata> future =
       backupDRClient.updateBackupOperationCallable().futureCall(request);
   // Do something.
   Backup response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateBackupRequest,Backup,OperationMetadata>

updateBackupVaultAsync(BackupVault backupVault, FieldMask updateMask)

public final OperationFuture<BackupVault,OperationMetadata> updateBackupVaultAsync(BackupVault backupVault, FieldMask updateMask)

Updates the settings of a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   BackupVault backupVault = BackupVault.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   BackupVault response = backupDRClient.updateBackupVaultAsync(backupVault, updateMask).get();
 }
 
Parameters
Name Description
backupVault BackupVault

Required. The resource being updated

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<BackupVault,OperationMetadata>

updateBackupVaultAsync(UpdateBackupVaultRequest request)

public final OperationFuture<BackupVault,OperationMetadata> updateBackupVaultAsync(UpdateBackupVaultRequest request)

Updates the settings of a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateBackupVaultRequest request =
       UpdateBackupVaultRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setBackupVault(BackupVault.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   BackupVault response = backupDRClient.updateBackupVaultAsync(request).get();
 }
 
Parameter
Name Description
request UpdateBackupVaultRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<BackupVault,OperationMetadata>

updateBackupVaultCallable()

public final UnaryCallable<UpdateBackupVaultRequest,Operation> updateBackupVaultCallable()

Updates the settings of a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateBackupVaultRequest request =
       UpdateBackupVaultRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setBackupVault(BackupVault.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   ApiFuture<Operation> future = backupDRClient.updateBackupVaultCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateBackupVaultRequest,Operation>

updateBackupVaultOperationCallable()

public final OperationCallable<UpdateBackupVaultRequest,BackupVault,OperationMetadata> updateBackupVaultOperationCallable()

Updates the settings of a BackupVault.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateBackupVaultRequest request =
       UpdateBackupVaultRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setBackupVault(BackupVault.newBuilder().build())
           .setRequestId("requestId693933066")
           .setValidateOnly(true)
           .setForce(true)
           .build();
   OperationFuture<BackupVault, OperationMetadata> future =
       backupDRClient.updateBackupVaultOperationCallable().futureCall(request);
   // Do something.
   BackupVault response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateBackupVaultRequest,BackupVault,OperationMetadata>

updateDataSourceAsync(DataSource dataSource, FieldMask updateMask)

public final OperationFuture<DataSource,OperationMetadata> updateDataSourceAsync(DataSource dataSource, FieldMask updateMask)

Updates the settings of a DataSource.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   DataSource dataSource = DataSource.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   DataSource response = backupDRClient.updateDataSourceAsync(dataSource, updateMask).get();
 }
 
Parameters
Name Description
dataSource DataSource

Required. The resource being updated

updateMask FieldMask

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.

Returns
Type Description
OperationFuture<DataSource,OperationMetadata>

updateDataSourceAsync(UpdateDataSourceRequest request)

public final OperationFuture<DataSource,OperationMetadata> updateDataSourceAsync(UpdateDataSourceRequest request)

Updates the settings of a DataSource.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateDataSourceRequest request =
       UpdateDataSourceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setDataSource(DataSource.newBuilder().build())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .build();
   DataSource response = backupDRClient.updateDataSourceAsync(request).get();
 }
 
Parameter
Name Description
request UpdateDataSourceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<DataSource,OperationMetadata>

updateDataSourceCallable()

public final UnaryCallable<UpdateDataSourceRequest,Operation> updateDataSourceCallable()

Updates the settings of a DataSource.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateDataSourceRequest request =
       UpdateDataSourceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setDataSource(DataSource.newBuilder().build())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .build();
   ApiFuture<Operation> future = backupDRClient.updateDataSourceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateDataSourceRequest,Operation>

updateDataSourceOperationCallable()

public final OperationCallable<UpdateDataSourceRequest,DataSource,OperationMetadata> updateDataSourceOperationCallable()

Updates the settings of a DataSource.

Sample code:


 // 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://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (BackupDRClient backupDRClient = BackupDRClient.create()) {
   UpdateDataSourceRequest request =
       UpdateDataSourceRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setDataSource(DataSource.newBuilder().build())
           .setRequestId("requestId693933066")
           .setAllowMissing(true)
           .build();
   OperationFuture<DataSource, OperationMetadata> future =
       backupDRClient.updateDataSourceOperationCallable().futureCall(request);
   // Do something.
   DataSource response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateDataSourceRequest,DataSource,OperationMetadata>