GitHub Repository | Product 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().
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteManagementServer |
Deletes a single ManagementServer. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackupVault |
Gets details of a BackupVault. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackupVault |
Deletes a BackupVault. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns the caller's permissions on a BackupVault resource. A caller is not required to have Google IAM permission to make this request. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDataSource |
Gets details of a DataSource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RemoveDataSource |
Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetInternalStatus |
Sets the internal status of a DataSource. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
InitiateBackup |
Internal only. Initiates a backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AbandonBackup |
Internal only. Abandons a backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
FinalizeBackup |
Internal only. Finalize a backup that was started by a call to InitiateBackup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
FetchAccessToken |
Internal only. Fetch access token for a given data source. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackup |
Gets details of a Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackup |
Deletes a Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RestoreBackup |
Restore from a Backup |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateBackupPlan |
Create a BackupPlan |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackupPlan |
Deletes a single BackupPlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateBackupPlanAssociation |
Create a BackupPlanAssociation |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackupPlanAssociation |
Deletes a single BackupPlanAssociation. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TriggerBackup |
Triggers a new Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
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
abandonBackupAsync(AbandonBackupRequest request)
public final OperationFuture<Empty,OperationMetadata> abandonBackupAsync(AbandonBackupRequest request)
Internal only. Abandons 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()) {
AbandonBackupRequest request =
AbandonBackupRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setRequestId("requestId693933066")
.build();
backupDRClient.abandonBackupAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
AbandonBackupRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
abandonBackupAsync(DataSourceName dataSource)
public final OperationFuture<Empty,OperationMetadata> abandonBackupAsync(DataSourceName dataSource)
Internal only. Abandons 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()) {
DataSourceName dataSource =
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
backupDRClient.abandonBackupAsync(dataSource).get();
}
Parameter | |
---|---|
Name | Description |
dataSource |
DataSourceName Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
abandonBackupAsync(String dataSource)
public final OperationFuture<Empty,OperationMetadata> abandonBackupAsync(String dataSource)
Internal only. Abandons 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 dataSource =
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
backupDRClient.abandonBackupAsync(dataSource).get();
}
Parameter | |
---|---|
Name | Description |
dataSource |
String Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
abandonBackupCallable()
public final UnaryCallable<AbandonBackupRequest,Operation> abandonBackupCallable()
Internal only. Abandons 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()) {
AbandonBackupRequest request =
AbandonBackupRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = backupDRClient.abandonBackupCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<AbandonBackupRequest,Operation> |
abandonBackupOperationCallable()
public final OperationCallable<AbandonBackupRequest,Empty,OperationMetadata> abandonBackupOperationCallable()
Internal only. Abandons 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()) {
AbandonBackupRequest request =
AbandonBackupRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
backupDRClient.abandonBackupOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<AbandonBackupRequest,Empty,OperationMetadata> |
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
|
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
|
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 |
BackupPlan Required. The |
backupPlanId |
String Required. The name of the |
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 |
BackupPlan Required. The |
backupPlanId |
String Required. The name of the |
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
|
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
|
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 Format: |
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 Format: |
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> |
fetchAccessToken(DataSourceName name)
public final FetchAccessTokenResponse fetchAccessToken(DataSourceName name)
Internal only. Fetch access token for a given data source.
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]");
FetchAccessTokenResponse response = backupDRClient.fetchAccessToken(name);
}
Parameter | |
---|---|
Name | Description |
name |
DataSourceName Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects/*/locations/*/backupVaults/*/dataSources'. |
Returns | |
---|---|
Type | Description |
FetchAccessTokenResponse |
fetchAccessToken(FetchAccessTokenRequest request)
public final FetchAccessTokenResponse fetchAccessToken(FetchAccessTokenRequest request)
Internal only. Fetch access token for a given data source.
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()) {
FetchAccessTokenRequest request =
FetchAccessTokenRequest.newBuilder()
.setName(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setGenerationId(1873220002)
.build();
FetchAccessTokenResponse response = backupDRClient.fetchAccessToken(request);
}
Parameter | |
---|---|
Name | Description |
request |
FetchAccessTokenRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
FetchAccessTokenResponse |
fetchAccessToken(String name)
public final FetchAccessTokenResponse fetchAccessToken(String name)
Internal only. Fetch access token for a given data source.
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();
FetchAccessTokenResponse response = backupDRClient.fetchAccessToken(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. The resource name for the location for which static IPs should be returned. Must be in the format 'projects/*/locations/*/backupVaults/*/dataSources'. |
Returns | |
---|---|
Type | Description |
FetchAccessTokenResponse |
fetchAccessTokenCallable()
public final UnaryCallable<FetchAccessTokenRequest,FetchAccessTokenResponse> fetchAccessTokenCallable()
Internal only. Fetch access token for a given data source.
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()) {
FetchAccessTokenRequest request =
FetchAccessTokenRequest.newBuilder()
.setName(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setGenerationId(1873220002)
.build();
ApiFuture<FetchAccessTokenResponse> future =
backupDRClient.fetchAccessTokenCallable().futureCall(request);
// Do something.
FetchAccessTokenResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<FetchAccessTokenRequest,FetchAccessTokenResponse> |
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
|
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
|
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> |
finalizeBackupAsync(DataSourceName dataSource)
public final OperationFuture<Backup,OperationMetadata> finalizeBackupAsync(DataSourceName dataSource)
Internal only. Finalize a backup that was started by a call to InitiateBackup.
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 dataSource =
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
Backup response = backupDRClient.finalizeBackupAsync(dataSource).get();
}
Parameter | |
---|---|
Name | Description |
dataSource |
DataSourceName Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. |
Returns | |
---|---|
Type | Description |
OperationFuture<Backup,OperationMetadata> |
finalizeBackupAsync(FinalizeBackupRequest request)
public final OperationFuture<Backup,OperationMetadata> finalizeBackupAsync(FinalizeBackupRequest request)
Internal only. Finalize a backup that was started by a call to InitiateBackup.
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()) {
FinalizeBackupRequest request =
FinalizeBackupRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setDescription("description-1724546052")
.setConsistencyTime(Timestamp.newBuilder().build())
.setRequestId("requestId693933066")
.setBackupId("backupId2121930365")
.setRecoveryRangeStartTime(Timestamp.newBuilder().build())
.setRecoveryRangeEndTime(Timestamp.newBuilder().build())
.setRetentionDuration(Duration.newBuilder().build())
.build();
Backup response = backupDRClient.finalizeBackupAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
FinalizeBackupRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Backup,OperationMetadata> |
finalizeBackupAsync(String dataSource)
public final OperationFuture<Backup,OperationMetadata> finalizeBackupAsync(String dataSource)
Internal only. Finalize a backup that was started by a call to InitiateBackup.
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 dataSource =
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
Backup response = backupDRClient.finalizeBackupAsync(dataSource).get();
}
Parameter | |
---|---|
Name | Description |
dataSource |
String Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. |
Returns | |
---|---|
Type | Description |
OperationFuture<Backup,OperationMetadata> |
finalizeBackupCallable()
public final UnaryCallable<FinalizeBackupRequest,Operation> finalizeBackupCallable()
Internal only. Finalize a backup that was started by a call to InitiateBackup.
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()) {
FinalizeBackupRequest request =
FinalizeBackupRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setDescription("description-1724546052")
.setConsistencyTime(Timestamp.newBuilder().build())
.setRequestId("requestId693933066")
.setBackupId("backupId2121930365")
.setRecoveryRangeStartTime(Timestamp.newBuilder().build())
.setRecoveryRangeEndTime(Timestamp.newBuilder().build())
.setRetentionDuration(Duration.newBuilder().build())
.build();
ApiFuture<Operation> future = backupDRClient.finalizeBackupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<FinalizeBackupRequest,Operation> |
finalizeBackupOperationCallable()
public final OperationCallable<FinalizeBackupRequest,Backup,OperationMetadata> finalizeBackupOperationCallable()
Internal only. Finalize a backup that was started by a call to InitiateBackup.
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()) {
FinalizeBackupRequest request =
FinalizeBackupRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setDescription("description-1724546052")
.setConsistencyTime(Timestamp.newBuilder().build())
.setRequestId("requestId693933066")
.setBackupId("backupId2121930365")
.setRecoveryRangeStartTime(Timestamp.newBuilder().build())
.setRecoveryRangeEndTime(Timestamp.newBuilder().build())
.setRetentionDuration(Duration.newBuilder().build())
.build();
OperationFuture<Backup, OperationMetadata> future =
backupDRClient.finalizeBackupOperationCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<FinalizeBackupRequest,Backup,OperationMetadata> |
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 Format: |
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 Format: |
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
|
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
|
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 |
initiateBackup(DataSourceName dataSource)
public final InitiateBackupResponse initiateBackup(DataSourceName dataSource)
Internal only. Initiates 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()) {
DataSourceName dataSource =
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
InitiateBackupResponse response = backupDRClient.initiateBackup(dataSource);
}
Parameter | |
---|---|
Name | Description |
dataSource |
DataSourceName Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. |
Returns | |
---|---|
Type | Description |
InitiateBackupResponse |
initiateBackup(InitiateBackupRequest request)
public final InitiateBackupResponse initiateBackup(InitiateBackupRequest request)
Internal only. Initiates 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()) {
InitiateBackupRequest request =
InitiateBackupRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setRequestId("requestId693933066")
.setBackupId("backupId2121930365")
.build();
InitiateBackupResponse response = backupDRClient.initiateBackup(request);
}
Parameter | |
---|---|
Name | Description |
request |
InitiateBackupRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
InitiateBackupResponse |
initiateBackup(String dataSource)
public final InitiateBackupResponse initiateBackup(String dataSource)
Internal only. Initiates 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 dataSource =
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
InitiateBackupResponse response = backupDRClient.initiateBackup(dataSource);
}
Parameter | |
---|---|
Name | Description |
dataSource |
String Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. |
Returns | |
---|---|
Type | Description |
InitiateBackupResponse |
initiateBackupCallable()
public final UnaryCallable<InitiateBackupRequest,InitiateBackupResponse> initiateBackupCallable()
Internal only. Initiates 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()) {
InitiateBackupRequest request =
InitiateBackupRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setRequestId("requestId693933066")
.setBackupId("backupId2121930365")
.build();
ApiFuture<InitiateBackupResponse> future =
backupDRClient.initiateBackupCallable().futureCall(request);
// Do something.
InitiateBackupResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<InitiateBackupRequest,InitiateBackupResponse> |
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 |
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 |
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 |
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 |
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
|
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
|
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
|
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
|
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> |
removeDataSourceAsync(DataSourceName name)
public final OperationFuture<Empty,OperationMetadata> removeDataSourceAsync(DataSourceName name)
Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.
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]");
backupDRClient.removeDataSourceAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
DataSourceName Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
removeDataSourceAsync(RemoveDataSourceRequest request)
public final OperationFuture<Empty,OperationMetadata> removeDataSourceAsync(RemoveDataSourceRequest request)
Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.
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()) {
RemoveDataSourceRequest request =
RemoveDataSourceRequest.newBuilder()
.setName(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setRequestId("requestId693933066")
.build();
backupDRClient.removeDataSourceAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
RemoveDataSourceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
removeDataSourceAsync(String name)
public final OperationFuture<Empty,OperationMetadata> removeDataSourceAsync(String name)
Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.
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();
backupDRClient.removeDataSourceAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Name of the resource. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
removeDataSourceCallable()
public final UnaryCallable<RemoveDataSourceRequest,Operation> removeDataSourceCallable()
Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.
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()) {
RemoveDataSourceRequest request =
RemoveDataSourceRequest.newBuilder()
.setName(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = backupDRClient.removeDataSourceCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<RemoveDataSourceRequest,Operation> |
removeDataSourceOperationCallable()
public final OperationCallable<RemoveDataSourceRequest,Empty,OperationMetadata> removeDataSourceOperationCallable()
Deletes a DataSource. This is a custom method instead of a standard delete method because external clients will not delete DataSources except for BackupDR backup appliances.
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()) {
RemoveDataSourceRequest request =
RemoveDataSourceRequest.newBuilder()
.setName(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
backupDRClient.removeDataSourceOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<RemoveDataSourceRequest,Empty,OperationMetadata> |
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_DENIED
errors.
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_DENIED
errors.
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> |
setInternalStatusAsync(DataSourceName dataSource)
public final OperationFuture<SetInternalStatusResponse,OperationMetadata> setInternalStatusAsync(DataSourceName dataSource)
Sets the internal status 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 dataSource =
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]");
SetInternalStatusResponse response = backupDRClient.setInternalStatusAsync(dataSource).get();
}
Parameter | |
---|---|
Name | Description |
dataSource |
DataSourceName Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. |
Returns | |
---|---|
Type | Description |
OperationFuture<SetInternalStatusResponse,OperationMetadata> |
setInternalStatusAsync(SetInternalStatusRequest request)
public final OperationFuture<SetInternalStatusResponse,OperationMetadata> setInternalStatusAsync(SetInternalStatusRequest request)
Sets the internal status 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()) {
SetInternalStatusRequest request =
SetInternalStatusRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setValue(ByteString.EMPTY)
.setBackupConfigState(BackupConfigState.forNumber(0))
.setRequestId("requestId693933066")
.build();
SetInternalStatusResponse response = backupDRClient.setInternalStatusAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
SetInternalStatusRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<SetInternalStatusResponse,OperationMetadata> |
setInternalStatusAsync(String dataSource)
public final OperationFuture<SetInternalStatusResponse,OperationMetadata> setInternalStatusAsync(String dataSource)
Sets the internal status 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 dataSource =
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]").toString();
SetInternalStatusResponse response = backupDRClient.setInternalStatusAsync(dataSource).get();
}
Parameter | |
---|---|
Name | Description |
dataSource |
String Required. The resource name of the instance, in the format 'projects/*/locations/*/backupVaults/*/dataSources/'. |
Returns | |
---|---|
Type | Description |
OperationFuture<SetInternalStatusResponse,OperationMetadata> |
setInternalStatusCallable()
public final UnaryCallable<SetInternalStatusRequest,Operation> setInternalStatusCallable()
Sets the internal status 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()) {
SetInternalStatusRequest request =
SetInternalStatusRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setValue(ByteString.EMPTY)
.setBackupConfigState(BackupConfigState.forNumber(0))
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = backupDRClient.setInternalStatusCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<SetInternalStatusRequest,Operation> |
setInternalStatusOperationCallable()
public final OperationCallable<SetInternalStatusRequest,SetInternalStatusResponse,OperationMetadata> setInternalStatusOperationCallable()
Sets the internal status 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()) {
SetInternalStatusRequest request =
SetInternalStatusRequest.newBuilder()
.setDataSource(
DataSourceName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]")
.toString())
.setValue(ByteString.EMPTY)
.setBackupConfigState(BackupConfigState.forNumber(0))
.setRequestId("requestId693933066")
.build();
OperationFuture<SetInternalStatusResponse, OperationMetadata> future =
backupDRClient.setInternalStatusOperationCallable().futureCall(request);
// Do something.
SetInternalStatusResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<SetInternalStatusRequest,SetInternalStatusResponse,OperationMetadata> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
testIamPermissions(ResourceName resource, List<String> permissions)
public final TestIamPermissionsResponse testIamPermissions(ResourceName resource, List<String> permissions)
Returns the caller's permissions on a BackupVault resource.
A caller is not required to have Google IAM permission to make this request.
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()) {
ResourceName resource = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]");
List<String> permissions = new ArrayList<>();
TestIamPermissionsResponse response =
backupDRClient.testIamPermissions(resource, permissions);
}
Parameters | |
---|---|
Name | Description |
resource |
com.google.api.resourcenames.ResourceName REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions |
List<String> The set of permissions to check for the |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(TestIamPermissionsRequest request)
public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
Returns the caller's permissions on a BackupVault resource.
A caller is not required to have Google IAM permission to make this request.
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(
BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").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 |
testIamPermissions(String resource, List<String> permissions)
public final TestIamPermissionsResponse testIamPermissions(String resource, List<String> permissions)
Returns the caller's permissions on a BackupVault resource.
A caller is not required to have Google IAM permission to make this request.
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 resource =
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]", "[DATASOURCE]", "[BACKUP]")
.toString();
List<String> permissions = new ArrayList<>();
TestIamPermissionsResponse response =
backupDRClient.testIamPermissions(resource, permissions);
}
Parameters | |
---|---|
Name | Description |
resource |
String REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field. |
permissions |
List<String> The set of permissions to check for the |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissionsCallable()
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
Returns the caller's permissions on a BackupVault resource.
A caller is not required to have Google IAM permission to make this request.
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(
BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUPVAULT]").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
|
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
|
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> |