- 0.52.0 (latest)
- 0.51.0
- 0.50.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.6
- 0.1.0
public class BackupForGKEClient implements BackgroundResource
Service Description: BackupForGKE allows Kubernetes administrators to configure, execute, and manage backup and restore operations for their GKE clusters.
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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
BackupPlan response = backupForGKEClient.getBackupPlan(name);
}
Note: close() needs to be called on the BackupForGKEClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns 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 BackupForGKESettings 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
BackupForGKESettings backupForGKESettings =
BackupForGKESettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
BackupForGKEClient backupForGKEClient = BackupForGKEClient.create(backupForGKESettings);
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
BackupForGKESettings backupForGKESettings =
BackupForGKESettings.newBuilder().setEndpoint(myEndpoint).build();
BackupForGKEClient backupForGKEClient = BackupForGKEClient.create(backupForGKESettings);
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
BackupForGKESettings backupForGKESettings =
BackupForGKESettings.newBuilder()
.setTransportChannelProvider(
BackupForGKESettings.defaultHttpJsonTransportProviderBuilder().build())
.build();
BackupForGKEClient backupForGKEClient = BackupForGKEClient.create(backupForGKESettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final BackupForGKEClient create()
Constructs an instance of BackupForGKEClient with default settings.
Type | Description |
BackupForGKEClient |
Type | Description |
IOException |
create(BackupForGKESettings settings)
public static final BackupForGKEClient create(BackupForGKESettings settings)
Constructs an instance of BackupForGKEClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | BackupForGKESettings |
Type | Description |
BackupForGKEClient |
Type | Description |
IOException |
create(BackupForGKEStub stub)
public static final BackupForGKEClient create(BackupForGKEStub stub)
Constructs an instance of BackupForGKEClient, using the given stub for making calls. This is for advanced usage - prefer using create(BackupForGKESettings).
Name | Description |
stub | BackupForGKEStub |
Type | Description |
BackupForGKEClient |
Constructors
BackupForGKEClient(BackupForGKESettings settings)
protected BackupForGKEClient(BackupForGKESettings settings)
Constructs an instance of BackupForGKEClient, 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.
Name | Description |
settings | BackupForGKESettings |
BackupForGKEClient(BackupForGKEStub stub)
protected BackupForGKEClient(BackupForGKEStub stub)
Name | Description |
stub | BackupForGKEStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createBackupAsync(BackupPlanName parent, Backup backup, String backupId)
public final OperationFuture<Backup,OperationMetadata> createBackupAsync(BackupPlanName parent, Backup backup, String backupId)
Creates a Backup for the given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupPlanName parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
Backup backup = Backup.newBuilder().build();
String backupId = "backupId2121930365";
Backup response = backupForGKEClient.createBackupAsync(parent, backup, backupId).get();
}
Name | Description |
parent | BackupPlanName Required. The BackupPlan within which to create the Backup. Format: projects/*/locations/*/backupPlans/* |
backup | Backup The Backup resource to create. |
backupId | String The client-provided short name for the Backup resource. This name must: - be between 1 and 63 characters long (inclusive) - consist of only lower-case ASCII letters, numbers, and dashes - start with a lower-case letter - end with a lower-case letter or number - be unique within the set of Backups in this BackupPlan |
Type | Description |
OperationFuture<Backup,OperationMetadata> |
createBackupAsync(CreateBackupRequest request)
public final OperationFuture<Backup,OperationMetadata> createBackupAsync(CreateBackupRequest request)
Creates a Backup for the given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setBackup(Backup.newBuilder().build())
.setBackupId("backupId2121930365")
.build();
Backup response = backupForGKEClient.createBackupAsync(request).get();
}
Name | Description |
request | CreateBackupRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Backup,OperationMetadata> |
createBackupAsync(String parent, Backup backup, String backupId)
public final OperationFuture<Backup,OperationMetadata> createBackupAsync(String parent, Backup backup, String backupId)
Creates a Backup for the given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
Backup backup = Backup.newBuilder().build();
String backupId = "backupId2121930365";
Backup response = backupForGKEClient.createBackupAsync(parent, backup, backupId).get();
}
Name | Description |
parent | String Required. The BackupPlan within which to create the Backup. Format: projects/*/locations/*/backupPlans/* |
backup | Backup The Backup resource to create. |
backupId | String The client-provided short name for the Backup resource. This name must: - be between 1 and 63 characters long (inclusive) - consist of only lower-case ASCII letters, numbers, and dashes - start with a lower-case letter - end with a lower-case letter or number - be unique within the set of Backups in this BackupPlan |
Type | Description |
OperationFuture<Backup,OperationMetadata> |
createBackupCallable()
public final UnaryCallable<CreateBackupRequest,Operation> createBackupCallable()
Creates a Backup for the given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setBackup(Backup.newBuilder().build())
.setBackupId("backupId2121930365")
.build();
ApiFuture<Operation> future = backupForGKEClient.createBackupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateBackupRequest,Operation> |
createBackupOperationCallable()
public final OperationCallable<CreateBackupRequest,Backup,OperationMetadata> createBackupOperationCallable()
Creates a Backup for the given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setBackup(Backup.newBuilder().build())
.setBackupId("backupId2121930365")
.build();
OperationFuture<Backup, OperationMetadata> future =
backupForGKEClient.createBackupOperationCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
Type | Description |
OperationCallable<CreateBackupRequest,Backup,OperationMetadata> |
createBackupPlanAsync(CreateBackupPlanRequest request)
public final OperationFuture<BackupPlan,OperationMetadata> createBackupPlanAsync(CreateBackupPlanRequest request)
Creates a new BackupPlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateBackupPlanRequest request =
CreateBackupPlanRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackupPlan(BackupPlan.newBuilder().build())
.setBackupPlanId("backupPlanId-84871546")
.build();
BackupPlan response = backupForGKEClient.createBackupPlanAsync(request).get();
}
Name | Description |
request | CreateBackupPlanRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<BackupPlan,OperationMetadata> |
createBackupPlanAsync(LocationName parent, BackupPlan backupPlan, String backupPlanId)
public final OperationFuture<BackupPlan,OperationMetadata> createBackupPlanAsync(LocationName parent, BackupPlan backupPlan, String backupPlanId)
Creates a new BackupPlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
BackupPlan backupPlan = BackupPlan.newBuilder().build();
String backupPlanId = "backupPlanId-84871546";
BackupPlan response =
backupForGKEClient.createBackupPlanAsync(parent, backupPlan, backupPlanId).get();
}
Name | Description |
parent | LocationName Required. The location within which to create the BackupPlan. Format: projects/*/locations/* |
backupPlan | BackupPlan Required. The BackupPlan resource object to create. |
backupPlanId | String Required. The client-provided short name for the BackupPlan resource. This name must: - be between 1 and 63 characters long (inclusive) - consist of only lower-case ASCII letters, numbers, and dashes - start with a lower-case letter - end with a lower-case letter or number - be unique within the set of BackupPlans in this location |
Type | Description |
OperationFuture<BackupPlan,OperationMetadata> |
createBackupPlanAsync(String parent, BackupPlan backupPlan, String backupPlanId)
public final OperationFuture<BackupPlan,OperationMetadata> createBackupPlanAsync(String parent, BackupPlan backupPlan, String backupPlanId)
Creates a new BackupPlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
BackupPlan backupPlan = BackupPlan.newBuilder().build();
String backupPlanId = "backupPlanId-84871546";
BackupPlan response =
backupForGKEClient.createBackupPlanAsync(parent, backupPlan, backupPlanId).get();
}
Name | Description |
parent | String Required. The location within which to create the BackupPlan. Format: projects/*/locations/* |
backupPlan | BackupPlan Required. The BackupPlan resource object to create. |
backupPlanId | String Required. The client-provided short name for the BackupPlan resource. This name must: - be between 1 and 63 characters long (inclusive) - consist of only lower-case ASCII letters, numbers, and dashes - start with a lower-case letter - end with a lower-case letter or number - be unique within the set of BackupPlans in this location |
Type | Description |
OperationFuture<BackupPlan,OperationMetadata> |
createBackupPlanCallable()
public final UnaryCallable<CreateBackupPlanRequest,Operation> createBackupPlanCallable()
Creates a new BackupPlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateBackupPlanRequest request =
CreateBackupPlanRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackupPlan(BackupPlan.newBuilder().build())
.setBackupPlanId("backupPlanId-84871546")
.build();
ApiFuture<Operation> future =
backupForGKEClient.createBackupPlanCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateBackupPlanRequest,Operation> |
createBackupPlanOperationCallable()
public final OperationCallable<CreateBackupPlanRequest,BackupPlan,OperationMetadata> createBackupPlanOperationCallable()
Creates a new BackupPlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateBackupPlanRequest request =
CreateBackupPlanRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackupPlan(BackupPlan.newBuilder().build())
.setBackupPlanId("backupPlanId-84871546")
.build();
OperationFuture<BackupPlan, OperationMetadata> future =
backupForGKEClient.createBackupPlanOperationCallable().futureCall(request);
// Do something.
BackupPlan response = future.get();
}
Type | Description |
OperationCallable<CreateBackupPlanRequest,BackupPlan,OperationMetadata> |
createRestoreAsync(CreateRestoreRequest request)
public final OperationFuture<Restore,OperationMetadata> createRestoreAsync(CreateRestoreRequest request)
Creates a new Restore for the given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateRestoreRequest request =
CreateRestoreRequest.newBuilder()
.setParent(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setRestore(Restore.newBuilder().build())
.setRestoreId("restoreId-1845465015")
.build();
Restore response = backupForGKEClient.createRestoreAsync(request).get();
}
Name | Description |
request | CreateRestoreRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Restore,OperationMetadata> |
createRestoreAsync(RestorePlanName parent, Restore restore, String restoreId)
public final OperationFuture<Restore,OperationMetadata> createRestoreAsync(RestorePlanName parent, Restore restore, String restoreId)
Creates a new Restore for the given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
RestorePlanName parent = RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]");
Restore restore = Restore.newBuilder().build();
String restoreId = "restoreId-1845465015";
Restore response = backupForGKEClient.createRestoreAsync(parent, restore, restoreId).get();
}
Name | Description |
parent | RestorePlanName Required. The RestorePlan within which to create the Restore. Format: projects/*/locations/*/restorePlans/* |
restore | Restore Required. The restore resource to create. |
restoreId | String Required. The client-provided short name for the Restore resource. This name must: - be between 1 and 63 characters long (inclusive) - consist of only lower-case ASCII letters, numbers, and dashes - start with a lower-case letter - end with a lower-case letter or number - be unique within the set of Restores in this RestorePlan. |
Type | Description |
OperationFuture<Restore,OperationMetadata> |
createRestoreAsync(String parent, Restore restore, String restoreId)
public final OperationFuture<Restore,OperationMetadata> createRestoreAsync(String parent, Restore restore, String restoreId)
Creates a new Restore for the given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent = RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString();
Restore restore = Restore.newBuilder().build();
String restoreId = "restoreId-1845465015";
Restore response = backupForGKEClient.createRestoreAsync(parent, restore, restoreId).get();
}
Name | Description |
parent | String Required. The RestorePlan within which to create the Restore. Format: projects/*/locations/*/restorePlans/* |
restore | Restore Required. The restore resource to create. |
restoreId | String Required. The client-provided short name for the Restore resource. This name must: - be between 1 and 63 characters long (inclusive) - consist of only lower-case ASCII letters, numbers, and dashes - start with a lower-case letter - end with a lower-case letter or number - be unique within the set of Restores in this RestorePlan. |
Type | Description |
OperationFuture<Restore,OperationMetadata> |
createRestoreCallable()
public final UnaryCallable<CreateRestoreRequest,Operation> createRestoreCallable()
Creates a new Restore for the given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateRestoreRequest request =
CreateRestoreRequest.newBuilder()
.setParent(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setRestore(Restore.newBuilder().build())
.setRestoreId("restoreId-1845465015")
.build();
ApiFuture<Operation> future = backupForGKEClient.createRestoreCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateRestoreRequest,Operation> |
createRestoreOperationCallable()
public final OperationCallable<CreateRestoreRequest,Restore,OperationMetadata> createRestoreOperationCallable()
Creates a new Restore for the given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateRestoreRequest request =
CreateRestoreRequest.newBuilder()
.setParent(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setRestore(Restore.newBuilder().build())
.setRestoreId("restoreId-1845465015")
.build();
OperationFuture<Restore, OperationMetadata> future =
backupForGKEClient.createRestoreOperationCallable().futureCall(request);
// Do something.
Restore response = future.get();
}
Type | Description |
OperationCallable<CreateRestoreRequest,Restore,OperationMetadata> |
createRestorePlanAsync(CreateRestorePlanRequest request)
public final OperationFuture<RestorePlan,OperationMetadata> createRestorePlanAsync(CreateRestorePlanRequest request)
Creates a new RestorePlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateRestorePlanRequest request =
CreateRestorePlanRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setRestorePlan(RestorePlan.newBuilder().build())
.setRestorePlanId("restorePlanId-857896366")
.build();
RestorePlan response = backupForGKEClient.createRestorePlanAsync(request).get();
}
Name | Description |
request | CreateRestorePlanRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<RestorePlan,OperationMetadata> |
createRestorePlanAsync(LocationName parent, RestorePlan restorePlan, String restorePlanId)
public final OperationFuture<RestorePlan,OperationMetadata> createRestorePlanAsync(LocationName parent, RestorePlan restorePlan, String restorePlanId)
Creates a new RestorePlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
RestorePlan restorePlan = RestorePlan.newBuilder().build();
String restorePlanId = "restorePlanId-857896366";
RestorePlan response =
backupForGKEClient.createRestorePlanAsync(parent, restorePlan, restorePlanId).get();
}
Name | Description |
parent | LocationName Required. The location within which to create the RestorePlan. Format: projects/*/locations/* |
restorePlan | RestorePlan Required. The RestorePlan resource object to create. |
restorePlanId | String Required. The client-provided short name for the RestorePlan resource. This name must: - be between 1 and 63 characters long (inclusive) - consist of only lower-case ASCII letters, numbers, and dashes - start with a lower-case letter - end with a lower-case letter or number - be unique within the set of RestorePlans in this location |
Type | Description |
OperationFuture<RestorePlan,OperationMetadata> |
createRestorePlanAsync(String parent, RestorePlan restorePlan, String restorePlanId)
public final OperationFuture<RestorePlan,OperationMetadata> createRestorePlanAsync(String parent, RestorePlan restorePlan, String restorePlanId)
Creates a new RestorePlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
RestorePlan restorePlan = RestorePlan.newBuilder().build();
String restorePlanId = "restorePlanId-857896366";
RestorePlan response =
backupForGKEClient.createRestorePlanAsync(parent, restorePlan, restorePlanId).get();
}
Name | Description |
parent | String Required. The location within which to create the RestorePlan. Format: projects/*/locations/* |
restorePlan | RestorePlan Required. The RestorePlan resource object to create. |
restorePlanId | String Required. The client-provided short name for the RestorePlan resource. This name must: - be between 1 and 63 characters long (inclusive) - consist of only lower-case ASCII letters, numbers, and dashes - start with a lower-case letter - end with a lower-case letter or number - be unique within the set of RestorePlans in this location |
Type | Description |
OperationFuture<RestorePlan,OperationMetadata> |
createRestorePlanCallable()
public final UnaryCallable<CreateRestorePlanRequest,Operation> createRestorePlanCallable()
Creates a new RestorePlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateRestorePlanRequest request =
CreateRestorePlanRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setRestorePlan(RestorePlan.newBuilder().build())
.setRestorePlanId("restorePlanId-857896366")
.build();
ApiFuture<Operation> future =
backupForGKEClient.createRestorePlanCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateRestorePlanRequest,Operation> |
createRestorePlanOperationCallable()
public final OperationCallable<CreateRestorePlanRequest,RestorePlan,OperationMetadata> createRestorePlanOperationCallable()
Creates a new RestorePlan in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
CreateRestorePlanRequest request =
CreateRestorePlanRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setRestorePlan(RestorePlan.newBuilder().build())
.setRestorePlanId("restorePlanId-857896366")
.build();
OperationFuture<RestorePlan, OperationMetadata> future =
backupForGKEClient.createRestorePlanOperationCallable().futureCall(request);
// Do something.
RestorePlan response = future.get();
}
Type | Description |
OperationCallable<CreateRestorePlanRequest,RestorePlan,OperationMetadata> |
deleteBackupAsync(BackupName name)
public final OperationFuture<Empty,OperationMetadata> deleteBackupAsync(BackupName name)
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]");
backupForGKEClient.deleteBackupAsync(name).get();
}
Name | Description |
name | BackupName Required. Name of the Backup resource. Format: projects/*/locations/*/backupPlans/*/backups/* |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBackupAsync(DeleteBackupRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteBackupAsync(DeleteBackupRequest request)
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder()
.setName(
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString())
.setEtag("etag3123477")
.setForce(true)
.build();
backupForGKEClient.deleteBackupAsync(request).get();
}
Name | Description |
request | DeleteBackupRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBackupAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteBackupAsync(String name)
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name =
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString();
backupForGKEClient.deleteBackupAsync(name).get();
}
Name | Description |
name | String Required. Name of the Backup resource. Format: projects/*/locations/*/backupPlans/*/backups/* |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBackupCallable()
public final UnaryCallable<DeleteBackupRequest,Operation> deleteBackupCallable()
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder()
.setName(
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString())
.setEtag("etag3123477")
.setForce(true)
.build();
ApiFuture<Operation> future = backupForGKEClient.deleteBackupCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteBackupRequest,Operation> |
deleteBackupOperationCallable()
public final OperationCallable<DeleteBackupRequest,Empty,OperationMetadata> deleteBackupOperationCallable()
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder()
.setName(
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString())
.setEtag("etag3123477")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
backupForGKEClient.deleteBackupOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteBackupRequest,Empty,OperationMetadata> |
deleteBackupPlanAsync(BackupPlanName name)
public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAsync(BackupPlanName name)
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
backupForGKEClient.deleteBackupPlanAsync(name).get();
}
Name | Description |
name | BackupPlanName Required. Fully qualified BackupPlan name. Format: projects/*/locations/*/backupPlans/* |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBackupPlanAsync(DeleteBackupPlanRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAsync(DeleteBackupPlanRequest request)
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteBackupPlanRequest request =
DeleteBackupPlanRequest.newBuilder()
.setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setEtag("etag3123477")
.build();
backupForGKEClient.deleteBackupPlanAsync(request).get();
}
Name | Description |
request | DeleteBackupPlanRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBackupPlanAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteBackupPlanAsync(String name)
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
backupForGKEClient.deleteBackupPlanAsync(name).get();
}
Name | Description |
name | String Required. Fully qualified BackupPlan name. Format: projects/*/locations/*/backupPlans/* |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteBackupPlanCallable()
public final UnaryCallable<DeleteBackupPlanRequest,Operation> deleteBackupPlanCallable()
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteBackupPlanRequest request =
DeleteBackupPlanRequest.newBuilder()
.setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
backupForGKEClient.deleteBackupPlanCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteBackupPlanRequest,Operation> |
deleteBackupPlanOperationCallable()
public final OperationCallable<DeleteBackupPlanRequest,Empty,OperationMetadata> deleteBackupPlanOperationCallable()
Deletes an existing 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteBackupPlanRequest request =
DeleteBackupPlanRequest.newBuilder()
.setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
backupForGKEClient.deleteBackupPlanOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteBackupPlanRequest,Empty,OperationMetadata> |
deleteRestoreAsync(DeleteRestoreRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteRestoreAsync(DeleteRestoreRequest request)
Deletes an existing Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteRestoreRequest request =
DeleteRestoreRequest.newBuilder()
.setName(
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]")
.toString())
.setEtag("etag3123477")
.setForce(true)
.build();
backupForGKEClient.deleteRestoreAsync(request).get();
}
Name | Description |
request | DeleteRestoreRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRestoreAsync(RestoreName name)
public final OperationFuture<Empty,OperationMetadata> deleteRestoreAsync(RestoreName name)
Deletes an existing Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
RestoreName name = RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]");
backupForGKEClient.deleteRestoreAsync(name).get();
}
Name | Description |
name | RestoreName Required. Full name of the Restore Format: projects/*/locations/*/restorePlans/*/restores/* |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRestoreAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteRestoreAsync(String name)
Deletes an existing Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name =
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]").toString();
backupForGKEClient.deleteRestoreAsync(name).get();
}
Name | Description |
name | String Required. Full name of the Restore Format: projects/*/locations/*/restorePlans/*/restores/* |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRestoreCallable()
public final UnaryCallable<DeleteRestoreRequest,Operation> deleteRestoreCallable()
Deletes an existing Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteRestoreRequest request =
DeleteRestoreRequest.newBuilder()
.setName(
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]")
.toString())
.setEtag("etag3123477")
.setForce(true)
.build();
ApiFuture<Operation> future = backupForGKEClient.deleteRestoreCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteRestoreRequest,Operation> |
deleteRestoreOperationCallable()
public final OperationCallable<DeleteRestoreRequest,Empty,OperationMetadata> deleteRestoreOperationCallable()
Deletes an existing Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteRestoreRequest request =
DeleteRestoreRequest.newBuilder()
.setName(
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]")
.toString())
.setEtag("etag3123477")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
backupForGKEClient.deleteRestoreOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteRestoreRequest,Empty,OperationMetadata> |
deleteRestorePlanAsync(DeleteRestorePlanRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteRestorePlanAsync(DeleteRestorePlanRequest request)
Deletes an existing RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteRestorePlanRequest request =
DeleteRestorePlanRequest.newBuilder()
.setName(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setEtag("etag3123477")
.setForce(true)
.build();
backupForGKEClient.deleteRestorePlanAsync(request).get();
}
Name | Description |
request | DeleteRestorePlanRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRestorePlanAsync(RestorePlanName name)
public final OperationFuture<Empty,OperationMetadata> deleteRestorePlanAsync(RestorePlanName name)
Deletes an existing RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
RestorePlanName name = RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]");
backupForGKEClient.deleteRestorePlanAsync(name).get();
}
Name | Description |
name | RestorePlanName Required. Fully qualified RestorePlan name. Format: projects/*/locations/*/restorePlans/* |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRestorePlanAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteRestorePlanAsync(String name)
Deletes an existing RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name = RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString();
backupForGKEClient.deleteRestorePlanAsync(name).get();
}
Name | Description |
name | String Required. Fully qualified RestorePlan name. Format: projects/*/locations/*/restorePlans/* |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteRestorePlanCallable()
public final UnaryCallable<DeleteRestorePlanRequest,Operation> deleteRestorePlanCallable()
Deletes an existing RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteRestorePlanRequest request =
DeleteRestorePlanRequest.newBuilder()
.setName(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setEtag("etag3123477")
.setForce(true)
.build();
ApiFuture<Operation> future =
backupForGKEClient.deleteRestorePlanCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteRestorePlanRequest,Operation> |
deleteRestorePlanOperationCallable()
public final OperationCallable<DeleteRestorePlanRequest,Empty,OperationMetadata> deleteRestorePlanOperationCallable()
Deletes an existing RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
DeleteRestorePlanRequest request =
DeleteRestorePlanRequest.newBuilder()
.setName(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setEtag("etag3123477")
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
backupForGKEClient.deleteRestorePlanOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteRestorePlanRequest,Empty,OperationMetadata> |
getBackup(BackupName name)
public final Backup getBackup(BackupName name)
Retrieve the details of a single 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]");
Backup response = backupForGKEClient.getBackup(name);
}
Name | Description |
name | BackupName Required. Full name of the Backup resource. Format: projects/*/locations/*/backupPlans/*/backups/* |
Type | Description |
Backup |
getBackup(GetBackupRequest request)
public final Backup getBackup(GetBackupRequest request)
Retrieve the details of a single 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetBackupRequest request =
GetBackupRequest.newBuilder()
.setName(
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString())
.build();
Backup response = backupForGKEClient.getBackup(request);
}
Name | Description |
request | GetBackupRequest The request object containing all of the parameters for the API call. |
Type | Description |
Backup |
getBackup(String name)
public final Backup getBackup(String name)
Retrieve the details of a single 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name =
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString();
Backup response = backupForGKEClient.getBackup(name);
}
Name | Description |
name | String Required. Full name of the Backup resource. Format: projects/*/locations/*/backupPlans/*/backups/* |
Type | Description |
Backup |
getBackupCallable()
public final UnaryCallable<GetBackupRequest,Backup> getBackupCallable()
Retrieve the details of a single 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetBackupRequest request =
GetBackupRequest.newBuilder()
.setName(
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString())
.build();
ApiFuture<Backup> future = backupForGKEClient.getBackupCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
Type | Description |
UnaryCallable<GetBackupRequest,Backup> |
getBackupPlan(BackupPlanName name)
public final BackupPlan getBackupPlan(BackupPlanName name)
Retrieve the 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupPlanName name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
BackupPlan response = backupForGKEClient.getBackupPlan(name);
}
Name | Description |
name | BackupPlanName Required. Fully qualified BackupPlan name. Format: projects/*/locations/*/backupPlans/* |
Type | Description |
BackupPlan |
getBackupPlan(GetBackupPlanRequest request)
public final BackupPlan getBackupPlan(GetBackupPlanRequest request)
Retrieve the 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetBackupPlanRequest request =
GetBackupPlanRequest.newBuilder()
.setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.build();
BackupPlan response = backupForGKEClient.getBackupPlan(request);
}
Name | Description |
request | GetBackupPlanRequest The request object containing all of the parameters for the API call. |
Type | Description |
BackupPlan |
getBackupPlan(String name)
public final BackupPlan getBackupPlan(String name)
Retrieve the 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
BackupPlan response = backupForGKEClient.getBackupPlan(name);
}
Name | Description |
name | String Required. Fully qualified BackupPlan name. Format: projects/*/locations/*/backupPlans/* |
Type | Description |
BackupPlan |
getBackupPlanCallable()
public final UnaryCallable<GetBackupPlanRequest,BackupPlan> getBackupPlanCallable()
Retrieve the 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetBackupPlanRequest request =
GetBackupPlanRequest.newBuilder()
.setName(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.build();
ApiFuture<BackupPlan> future = backupForGKEClient.getBackupPlanCallable().futureCall(request);
// Do something.
BackupPlan response = future.get();
}
Type | Description |
UnaryCallable<GetBackupPlanRequest,BackupPlan> |
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.
Type | Description |
OperationsClient |
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.
Type | Description |
OperationsClient |
getRestore(GetRestoreRequest request)
public final Restore getRestore(GetRestoreRequest request)
Retrieves the details of a single Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetRestoreRequest request =
GetRestoreRequest.newBuilder()
.setName(
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]")
.toString())
.build();
Restore response = backupForGKEClient.getRestore(request);
}
Name | Description |
request | GetRestoreRequest The request object containing all of the parameters for the API call. |
Type | Description |
Restore |
getRestore(RestoreName name)
public final Restore getRestore(RestoreName name)
Retrieves the details of a single Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
RestoreName name = RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]");
Restore response = backupForGKEClient.getRestore(name);
}
Name | Description |
name | RestoreName Required. Name of the restore resource. Format: projects/*/locations/*/restorePlans/*/restores/* |
Type | Description |
Restore |
getRestore(String name)
public final Restore getRestore(String name)
Retrieves the details of a single Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name =
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]").toString();
Restore response = backupForGKEClient.getRestore(name);
}
Name | Description |
name | String Required. Name of the restore resource. Format: projects/*/locations/*/restorePlans/*/restores/* |
Type | Description |
Restore |
getRestoreCallable()
public final UnaryCallable<GetRestoreRequest,Restore> getRestoreCallable()
Retrieves the details of a single Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetRestoreRequest request =
GetRestoreRequest.newBuilder()
.setName(
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]")
.toString())
.build();
ApiFuture<Restore> future = backupForGKEClient.getRestoreCallable().futureCall(request);
// Do something.
Restore response = future.get();
}
Type | Description |
UnaryCallable<GetRestoreRequest,Restore> |
getRestorePlan(GetRestorePlanRequest request)
public final RestorePlan getRestorePlan(GetRestorePlanRequest request)
Retrieve the details of a single RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetRestorePlanRequest request =
GetRestorePlanRequest.newBuilder()
.setName(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.build();
RestorePlan response = backupForGKEClient.getRestorePlan(request);
}
Name | Description |
request | GetRestorePlanRequest The request object containing all of the parameters for the API call. |
Type | Description |
RestorePlan |
getRestorePlan(RestorePlanName name)
public final RestorePlan getRestorePlan(RestorePlanName name)
Retrieve the details of a single RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
RestorePlanName name = RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]");
RestorePlan response = backupForGKEClient.getRestorePlan(name);
}
Name | Description |
name | RestorePlanName Required. Fully qualified RestorePlan name. Format: projects/*/locations/*/restorePlans/* |
Type | Description |
RestorePlan |
getRestorePlan(String name)
public final RestorePlan getRestorePlan(String name)
Retrieve the details of a single RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name = RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString();
RestorePlan response = backupForGKEClient.getRestorePlan(name);
}
Name | Description |
name | String Required. Fully qualified RestorePlan name. Format: projects/*/locations/*/restorePlans/* |
Type | Description |
RestorePlan |
getRestorePlanCallable()
public final UnaryCallable<GetRestorePlanRequest,RestorePlan> getRestorePlanCallable()
Retrieve the details of a single RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetRestorePlanRequest request =
GetRestorePlanRequest.newBuilder()
.setName(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.build();
ApiFuture<RestorePlan> future =
backupForGKEClient.getRestorePlanCallable().futureCall(request);
// Do something.
RestorePlan response = future.get();
}
Type | Description |
UnaryCallable<GetRestorePlanRequest,RestorePlan> |
getSettings()
public final BackupForGKESettings getSettings()
Type | Description |
BackupForGKESettings |
getStub()
public BackupForGKEStub getStub()
Type | Description |
BackupForGKEStub |
getVolumeBackup(GetVolumeBackupRequest request)
public final VolumeBackup getVolumeBackup(GetVolumeBackupRequest request)
Retrieve the details of a single VolumeBackup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetVolumeBackupRequest request =
GetVolumeBackupRequest.newBuilder()
.setName(
VolumeBackupName.of(
"[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]", "[VOLUME_BACKUP]")
.toString())
.build();
VolumeBackup response = backupForGKEClient.getVolumeBackup(request);
}
Name | Description |
request | GetVolumeBackupRequest The request object containing all of the parameters for the API call. |
Type | Description |
VolumeBackup |
getVolumeBackup(VolumeBackupName name)
public final VolumeBackup getVolumeBackup(VolumeBackupName name)
Retrieve the details of a single VolumeBackup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
VolumeBackupName name =
VolumeBackupName.of(
"[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]", "[VOLUME_BACKUP]");
VolumeBackup response = backupForGKEClient.getVolumeBackup(name);
}
Name | Description |
name | VolumeBackupName Required. Full name of the VolumeBackup resource. Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* |
Type | Description |
VolumeBackup |
getVolumeBackup(String name)
public final VolumeBackup getVolumeBackup(String name)
Retrieve the details of a single VolumeBackup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name =
VolumeBackupName.of(
"[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]", "[VOLUME_BACKUP]")
.toString();
VolumeBackup response = backupForGKEClient.getVolumeBackup(name);
}
Name | Description |
name | String Required. Full name of the VolumeBackup resource. Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/* |
Type | Description |
VolumeBackup |
getVolumeBackupCallable()
public final UnaryCallable<GetVolumeBackupRequest,VolumeBackup> getVolumeBackupCallable()
Retrieve the details of a single VolumeBackup.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetVolumeBackupRequest request =
GetVolumeBackupRequest.newBuilder()
.setName(
VolumeBackupName.of(
"[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]", "[VOLUME_BACKUP]")
.toString())
.build();
ApiFuture<VolumeBackup> future =
backupForGKEClient.getVolumeBackupCallable().futureCall(request);
// Do something.
VolumeBackup response = future.get();
}
Type | Description |
UnaryCallable<GetVolumeBackupRequest,VolumeBackup> |
getVolumeRestore(GetVolumeRestoreRequest request)
public final VolumeRestore getVolumeRestore(GetVolumeRestoreRequest request)
Retrieve the details of a single VolumeRestore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetVolumeRestoreRequest request =
GetVolumeRestoreRequest.newBuilder()
.setName(
VolumeRestoreName.of(
"[PROJECT]",
"[LOCATION]",
"[RESTORE_PLAN]",
"[RESTORE]",
"[VOLUME_RESTORE]")
.toString())
.build();
VolumeRestore response = backupForGKEClient.getVolumeRestore(request);
}
Name | Description |
request | GetVolumeRestoreRequest The request object containing all of the parameters for the API call. |
Type | Description |
VolumeRestore |
getVolumeRestore(VolumeRestoreName name)
public final VolumeRestore getVolumeRestore(VolumeRestoreName name)
Retrieve the details of a single VolumeRestore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
VolumeRestoreName name =
VolumeRestoreName.of(
"[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]", "[VOLUME_RESTORE]");
VolumeRestore response = backupForGKEClient.getVolumeRestore(name);
}
Name | Description |
name | VolumeRestoreName Required. Full name of the VolumeRestore resource. Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* |
Type | Description |
VolumeRestore |
getVolumeRestore(String name)
public final VolumeRestore getVolumeRestore(String name)
Retrieve the details of a single VolumeRestore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String name =
VolumeRestoreName.of(
"[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]", "[VOLUME_RESTORE]")
.toString();
VolumeRestore response = backupForGKEClient.getVolumeRestore(name);
}
Name | Description |
name | String Required. Full name of the VolumeRestore resource. Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/* |
Type | Description |
VolumeRestore |
getVolumeRestoreCallable()
public final UnaryCallable<GetVolumeRestoreRequest,VolumeRestore> getVolumeRestoreCallable()
Retrieve the details of a single VolumeRestore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
GetVolumeRestoreRequest request =
GetVolumeRestoreRequest.newBuilder()
.setName(
VolumeRestoreName.of(
"[PROJECT]",
"[LOCATION]",
"[RESTORE_PLAN]",
"[RESTORE]",
"[VOLUME_RESTORE]")
.toString())
.build();
ApiFuture<VolumeRestore> future =
backupForGKEClient.getVolumeRestoreCallable().futureCall(request);
// Do something.
VolumeRestore response = future.get();
}
Type | Description |
UnaryCallable<GetVolumeRestoreRequest,VolumeRestore> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listBackupPlans(ListBackupPlansRequest request)
public final BackupForGKEClient.ListBackupPlansPagedResponse listBackupPlans(ListBackupPlansRequest request)
Lists BackupPlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.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 : backupForGKEClient.listBackupPlans(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListBackupPlansRequest The request object containing all of the parameters for the API call. |
Type | Description |
BackupForGKEClient.ListBackupPlansPagedResponse |
listBackupPlans(LocationName parent)
public final BackupForGKEClient.ListBackupPlansPagedResponse listBackupPlans(LocationName parent)
Lists BackupPlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (BackupPlan element : backupForGKEClient.listBackupPlans(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The location that contains the BackupPlans to list. Format: projects/*/locations/* |
Type | Description |
BackupForGKEClient.ListBackupPlansPagedResponse |
listBackupPlans(String parent)
public final BackupForGKEClient.ListBackupPlansPagedResponse listBackupPlans(String parent)
Lists BackupPlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (BackupPlan element : backupForGKEClient.listBackupPlans(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The location that contains the BackupPlans to list. Format: projects/*/locations/* |
Type | Description |
BackupForGKEClient.ListBackupPlansPagedResponse |
listBackupPlansCallable()
public final UnaryCallable<ListBackupPlansRequest,ListBackupPlansResponse> listBackupPlansCallable()
Lists BackupPlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.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 =
backupForGKEClient.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;
}
}
}
Type | Description |
UnaryCallable<ListBackupPlansRequest,ListBackupPlansResponse> |
listBackupPlansPagedCallable()
public final UnaryCallable<ListBackupPlansRequest,BackupForGKEClient.ListBackupPlansPagedResponse> listBackupPlansPagedCallable()
Lists BackupPlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.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 =
backupForGKEClient.listBackupPlansPagedCallable().futureCall(request);
// Do something.
for (BackupPlan element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListBackupPlansRequest,ListBackupPlansPagedResponse> |
listBackups(BackupPlanName parent)
public final BackupForGKEClient.ListBackupsPagedResponse listBackups(BackupPlanName parent)
Lists the Backups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupPlanName parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]");
for (Backup element : backupForGKEClient.listBackups(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | BackupPlanName Required. The BackupPlan that contains the Backups to list. Format: projects/*/locations/*/backupPlans/* |
Type | Description |
BackupForGKEClient.ListBackupsPagedResponse |
listBackups(ListBackupsRequest request)
public final BackupForGKEClient.ListBackupsPagedResponse listBackups(ListBackupsRequest request)
Lists the Backups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Backup element : backupForGKEClient.listBackups(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListBackupsRequest The request object containing all of the parameters for the API call. |
Type | Description |
BackupForGKEClient.ListBackupsPagedResponse |
listBackups(String parent)
public final BackupForGKEClient.ListBackupsPagedResponse listBackups(String parent)
Lists the Backups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent = BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString();
for (Backup element : backupForGKEClient.listBackups(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The BackupPlan that contains the Backups to list. Format: projects/*/locations/*/backupPlans/* |
Type | Description |
BackupForGKEClient.ListBackupsPagedResponse |
listBackupsCallable()
public final UnaryCallable<ListBackupsRequest,ListBackupsResponse> listBackupsCallable()
Lists the Backups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListBackupsResponse response = backupForGKEClient.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;
}
}
}
Type | Description |
UnaryCallable<ListBackupsRequest,ListBackupsResponse> |
listBackupsPagedCallable()
public final UnaryCallable<ListBackupsRequest,BackupForGKEClient.ListBackupsPagedResponse> listBackupsPagedCallable()
Lists the Backups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(BackupPlanName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Backup> future = backupForGKEClient.listBackupsPagedCallable().futureCall(request);
// Do something.
for (Backup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListBackupsRequest,ListBackupsPagedResponse> |
listRestorePlans(ListRestorePlansRequest request)
public final BackupForGKEClient.ListRestorePlansPagedResponse listRestorePlans(ListRestorePlansRequest request)
Lists RestorePlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListRestorePlansRequest request =
ListRestorePlansRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (RestorePlan element : backupForGKEClient.listRestorePlans(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListRestorePlansRequest The request object containing all of the parameters for the API call. |
Type | Description |
BackupForGKEClient.ListRestorePlansPagedResponse |
listRestorePlans(LocationName parent)
public final BackupForGKEClient.ListRestorePlansPagedResponse listRestorePlans(LocationName parent)
Lists RestorePlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (RestorePlan element : backupForGKEClient.listRestorePlans(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The location that contains the RestorePlans to list. Format: projects/*/locations/* |
Type | Description |
BackupForGKEClient.ListRestorePlansPagedResponse |
listRestorePlans(String parent)
public final BackupForGKEClient.ListRestorePlansPagedResponse listRestorePlans(String parent)
Lists RestorePlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (RestorePlan element : backupForGKEClient.listRestorePlans(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The location that contains the RestorePlans to list. Format: projects/*/locations/* |
Type | Description |
BackupForGKEClient.ListRestorePlansPagedResponse |
listRestorePlansCallable()
public final UnaryCallable<ListRestorePlansRequest,ListRestorePlansResponse> listRestorePlansCallable()
Lists RestorePlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListRestorePlansRequest request =
ListRestorePlansRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListRestorePlansResponse response =
backupForGKEClient.listRestorePlansCallable().call(request);
for (RestorePlan element : response.getRestorePlansList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListRestorePlansRequest,ListRestorePlansResponse> |
listRestorePlansPagedCallable()
public final UnaryCallable<ListRestorePlansRequest,BackupForGKEClient.ListRestorePlansPagedResponse> listRestorePlansPagedCallable()
Lists RestorePlans in a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListRestorePlansRequest request =
ListRestorePlansRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<RestorePlan> future =
backupForGKEClient.listRestorePlansPagedCallable().futureCall(request);
// Do something.
for (RestorePlan element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListRestorePlansRequest,ListRestorePlansPagedResponse> |
listRestores(ListRestoresRequest request)
public final BackupForGKEClient.ListRestoresPagedResponse listRestores(ListRestoresRequest request)
Lists the Restores for a given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListRestoresRequest request =
ListRestoresRequest.newBuilder()
.setParent(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Restore element : backupForGKEClient.listRestores(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListRestoresRequest The request object containing all of the parameters for the API call. |
Type | Description |
BackupForGKEClient.ListRestoresPagedResponse |
listRestores(RestorePlanName parent)
public final BackupForGKEClient.ListRestoresPagedResponse listRestores(RestorePlanName parent)
Lists the Restores for a given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
RestorePlanName parent = RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]");
for (Restore element : backupForGKEClient.listRestores(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | RestorePlanName Required. The RestorePlan that contains the Restores to list. Format: projects/*/locations/*/restorePlans/* |
Type | Description |
BackupForGKEClient.ListRestoresPagedResponse |
listRestores(String parent)
public final BackupForGKEClient.ListRestoresPagedResponse listRestores(String parent)
Lists the Restores for a given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent = RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString();
for (Restore element : backupForGKEClient.listRestores(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The RestorePlan that contains the Restores to list. Format: projects/*/locations/*/restorePlans/* |
Type | Description |
BackupForGKEClient.ListRestoresPagedResponse |
listRestoresCallable()
public final UnaryCallable<ListRestoresRequest,ListRestoresResponse> listRestoresCallable()
Lists the Restores for a given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListRestoresRequest request =
ListRestoresRequest.newBuilder()
.setParent(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListRestoresResponse response = backupForGKEClient.listRestoresCallable().call(request);
for (Restore element : response.getRestoresList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListRestoresRequest,ListRestoresResponse> |
listRestoresPagedCallable()
public final UnaryCallable<ListRestoresRequest,BackupForGKEClient.ListRestoresPagedResponse> listRestoresPagedCallable()
Lists the Restores for a given RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListRestoresRequest request =
ListRestoresRequest.newBuilder()
.setParent(RestorePlanName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Restore> future =
backupForGKEClient.listRestoresPagedCallable().futureCall(request);
// Do something.
for (Restore element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListRestoresRequest,ListRestoresPagedResponse> |
listVolumeBackups(BackupName parent)
public final BackupForGKEClient.ListVolumeBackupsPagedResponse listVolumeBackups(BackupName parent)
Lists the VolumeBackups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupName parent = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]");
for (VolumeBackup element : backupForGKEClient.listVolumeBackups(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | BackupName Required. The Backup that contains the VolumeBackups to list. Format: projects/*/locations/*/backupPlans/*/backups/* |
Type | Description |
BackupForGKEClient.ListVolumeBackupsPagedResponse |
listVolumeBackups(ListVolumeBackupsRequest request)
public final BackupForGKEClient.ListVolumeBackupsPagedResponse listVolumeBackups(ListVolumeBackupsRequest request)
Lists the VolumeBackups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListVolumeBackupsRequest request =
ListVolumeBackupsRequest.newBuilder()
.setParent(
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (VolumeBackup element : backupForGKEClient.listVolumeBackups(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListVolumeBackupsRequest The request object containing all of the parameters for the API call. |
Type | Description |
BackupForGKEClient.ListVolumeBackupsPagedResponse |
listVolumeBackups(String parent)
public final BackupForGKEClient.ListVolumeBackupsPagedResponse listVolumeBackups(String parent)
Lists the VolumeBackups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent =
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString();
for (VolumeBackup element : backupForGKEClient.listVolumeBackups(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The Backup that contains the VolumeBackups to list. Format: projects/*/locations/*/backupPlans/*/backups/* |
Type | Description |
BackupForGKEClient.ListVolumeBackupsPagedResponse |
listVolumeBackupsCallable()
public final UnaryCallable<ListVolumeBackupsRequest,ListVolumeBackupsResponse> listVolumeBackupsCallable()
Lists the VolumeBackups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListVolumeBackupsRequest request =
ListVolumeBackupsRequest.newBuilder()
.setParent(
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListVolumeBackupsResponse response =
backupForGKEClient.listVolumeBackupsCallable().call(request);
for (VolumeBackup element : response.getVolumeBackupsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListVolumeBackupsRequest,ListVolumeBackupsResponse> |
listVolumeBackupsPagedCallable()
public final UnaryCallable<ListVolumeBackupsRequest,BackupForGKEClient.ListVolumeBackupsPagedResponse> listVolumeBackupsPagedCallable()
Lists the VolumeBackups for a given 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListVolumeBackupsRequest request =
ListVolumeBackupsRequest.newBuilder()
.setParent(
BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<VolumeBackup> future =
backupForGKEClient.listVolumeBackupsPagedCallable().futureCall(request);
// Do something.
for (VolumeBackup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListVolumeBackupsRequest,ListVolumeBackupsPagedResponse> |
listVolumeRestores(ListVolumeRestoresRequest request)
public final BackupForGKEClient.ListVolumeRestoresPagedResponse listVolumeRestores(ListVolumeRestoresRequest request)
Lists the VolumeRestores for a given Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListVolumeRestoresRequest request =
ListVolumeRestoresRequest.newBuilder()
.setParent(
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (VolumeRestore element : backupForGKEClient.listVolumeRestores(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListVolumeRestoresRequest The request object containing all of the parameters for the API call. |
Type | Description |
BackupForGKEClient.ListVolumeRestoresPagedResponse |
listVolumeRestores(RestoreName parent)
public final BackupForGKEClient.ListVolumeRestoresPagedResponse listVolumeRestores(RestoreName parent)
Lists the VolumeRestores for a given Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
RestoreName parent = RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]");
for (VolumeRestore element : backupForGKEClient.listVolumeRestores(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | RestoreName Required. The Restore that contains the VolumeRestores to list. Format: projects/*/locations/*/restorePlans/*/restores/* |
Type | Description |
BackupForGKEClient.ListVolumeRestoresPagedResponse |
listVolumeRestores(String parent)
public final BackupForGKEClient.ListVolumeRestoresPagedResponse listVolumeRestores(String parent)
Lists the VolumeRestores for a given Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
String parent =
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]").toString();
for (VolumeRestore element : backupForGKEClient.listVolumeRestores(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The Restore that contains the VolumeRestores to list. Format: projects/*/locations/*/restorePlans/*/restores/* |
Type | Description |
BackupForGKEClient.ListVolumeRestoresPagedResponse |
listVolumeRestoresCallable()
public final UnaryCallable<ListVolumeRestoresRequest,ListVolumeRestoresResponse> listVolumeRestoresCallable()
Lists the VolumeRestores for a given Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListVolumeRestoresRequest request =
ListVolumeRestoresRequest.newBuilder()
.setParent(
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListVolumeRestoresResponse response =
backupForGKEClient.listVolumeRestoresCallable().call(request);
for (VolumeRestore element : response.getVolumeRestoresList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListVolumeRestoresRequest,ListVolumeRestoresResponse> |
listVolumeRestoresPagedCallable()
public final UnaryCallable<ListVolumeRestoresRequest,BackupForGKEClient.ListVolumeRestoresPagedResponse> listVolumeRestoresPagedCallable()
Lists the VolumeRestores for a given Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
ListVolumeRestoresRequest request =
ListVolumeRestoresRequest.newBuilder()
.setParent(
RestoreName.of("[PROJECT]", "[LOCATION]", "[RESTORE_PLAN]", "[RESTORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<VolumeRestore> future =
backupForGKEClient.listVolumeRestoresPagedCallable().futureCall(request);
// Do something.
for (VolumeRestore element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListVolumeRestoresRequest,ListVolumeRestoresPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateBackupAsync(Backup backup, FieldMask updateMask)
public final OperationFuture<Backup,OperationMetadata> updateBackupAsync(Backup backup, FieldMask updateMask)
Update 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
Backup backup = Backup.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Backup response = backupForGKEClient.updateBackupAsync(backup, updateMask).get();
}
Name | Description |
backup | Backup Required. A new version of the Backup resource that contains updated fields. This
may be sparsely populated if an |
updateMask | FieldMask This is used to specify the fields to be overwritten in the Backup targeted
for update. The values for each of these updated fields will be taken from the
|
Type | Description |
OperationFuture<Backup,OperationMetadata> |
updateBackupAsync(UpdateBackupRequest request)
public final OperationFuture<Backup,OperationMetadata> updateBackupAsync(UpdateBackupRequest request)
Update 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder()
.setBackup(Backup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Backup response = backupForGKEClient.updateBackupAsync(request).get();
}
Name | Description |
request | UpdateBackupRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Backup,OperationMetadata> |
updateBackupCallable()
public final UnaryCallable<UpdateBackupRequest,Operation> updateBackupCallable()
Update 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder()
.setBackup(Backup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future = backupForGKEClient.updateBackupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateBackupRequest,Operation> |
updateBackupOperationCallable()
public final OperationCallable<UpdateBackupRequest,Backup,OperationMetadata> updateBackupOperationCallable()
Update 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder()
.setBackup(Backup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<Backup, OperationMetadata> future =
backupForGKEClient.updateBackupOperationCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
Type | Description |
OperationCallable<UpdateBackupRequest,Backup,OperationMetadata> |
updateBackupPlanAsync(BackupPlan backupPlan, FieldMask updateMask)
public final OperationFuture<BackupPlan,OperationMetadata> updateBackupPlanAsync(BackupPlan backupPlan, FieldMask updateMask)
Update 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
BackupPlan backupPlan = BackupPlan.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
BackupPlan response = backupForGKEClient.updateBackupPlanAsync(backupPlan, updateMask).get();
}
Name | Description |
backupPlan | BackupPlan Required. A new version of the BackupPlan resource that contains updated
fields. This may be sparsely populated if an |
updateMask | FieldMask This is used to specify the fields to be overwritten in the BackupPlan
targeted for update. The values for each of these updated fields will be taken from the
|
Type | Description |
OperationFuture<BackupPlan,OperationMetadata> |
updateBackupPlanAsync(UpdateBackupPlanRequest request)
public final OperationFuture<BackupPlan,OperationMetadata> updateBackupPlanAsync(UpdateBackupPlanRequest request)
Update 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateBackupPlanRequest request =
UpdateBackupPlanRequest.newBuilder()
.setBackupPlan(BackupPlan.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
BackupPlan response = backupForGKEClient.updateBackupPlanAsync(request).get();
}
Name | Description |
request | UpdateBackupPlanRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<BackupPlan,OperationMetadata> |
updateBackupPlanCallable()
public final UnaryCallable<UpdateBackupPlanRequest,Operation> updateBackupPlanCallable()
Update 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateBackupPlanRequest request =
UpdateBackupPlanRequest.newBuilder()
.setBackupPlan(BackupPlan.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
backupForGKEClient.updateBackupPlanCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateBackupPlanRequest,Operation> |
updateBackupPlanOperationCallable()
public final OperationCallable<UpdateBackupPlanRequest,BackupPlan,OperationMetadata> updateBackupPlanOperationCallable()
Update 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 (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateBackupPlanRequest request =
UpdateBackupPlanRequest.newBuilder()
.setBackupPlan(BackupPlan.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<BackupPlan, OperationMetadata> future =
backupForGKEClient.updateBackupPlanOperationCallable().futureCall(request);
// Do something.
BackupPlan response = future.get();
}
Type | Description |
OperationCallable<UpdateBackupPlanRequest,BackupPlan,OperationMetadata> |
updateRestoreAsync(Restore restore, FieldMask updateMask)
public final OperationFuture<Restore,OperationMetadata> updateRestoreAsync(Restore restore, FieldMask updateMask)
Update a Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
Restore restore = Restore.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Restore response = backupForGKEClient.updateRestoreAsync(restore, updateMask).get();
}
Name | Description |
restore | Restore Required. A new version of the Restore resource that contains updated fields.
This may be sparsely populated if an |
updateMask | FieldMask This is used to specify the fields to be overwritten in the Restore targeted
for update. The values for each of these updated fields will be taken from the |
Type | Description |
OperationFuture<Restore,OperationMetadata> |
updateRestoreAsync(UpdateRestoreRequest request)
public final OperationFuture<Restore,OperationMetadata> updateRestoreAsync(UpdateRestoreRequest request)
Update a Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateRestoreRequest request =
UpdateRestoreRequest.newBuilder()
.setRestore(Restore.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Restore response = backupForGKEClient.updateRestoreAsync(request).get();
}
Name | Description |
request | UpdateRestoreRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Restore,OperationMetadata> |
updateRestoreCallable()
public final UnaryCallable<UpdateRestoreRequest,Operation> updateRestoreCallable()
Update a Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateRestoreRequest request =
UpdateRestoreRequest.newBuilder()
.setRestore(Restore.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future = backupForGKEClient.updateRestoreCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateRestoreRequest,Operation> |
updateRestoreOperationCallable()
public final OperationCallable<UpdateRestoreRequest,Restore,OperationMetadata> updateRestoreOperationCallable()
Update a Restore.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateRestoreRequest request =
UpdateRestoreRequest.newBuilder()
.setRestore(Restore.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<Restore, OperationMetadata> future =
backupForGKEClient.updateRestoreOperationCallable().futureCall(request);
// Do something.
Restore response = future.get();
}
Type | Description |
OperationCallable<UpdateRestoreRequest,Restore,OperationMetadata> |
updateRestorePlanAsync(RestorePlan restorePlan, FieldMask updateMask)
public final OperationFuture<RestorePlan,OperationMetadata> updateRestorePlanAsync(RestorePlan restorePlan, FieldMask updateMask)
Update a RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
RestorePlan restorePlan = RestorePlan.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
RestorePlan response =
backupForGKEClient.updateRestorePlanAsync(restorePlan, updateMask).get();
}
Name | Description |
restorePlan | RestorePlan Required. A new version of the RestorePlan resource that contains updated
fields. This may be sparsely populated if an |
updateMask | FieldMask This is used to specify the fields to be overwritten in the RestorePlan
targeted for update. The values for each of these updated fields will be taken from the
|
Type | Description |
OperationFuture<RestorePlan,OperationMetadata> |
updateRestorePlanAsync(UpdateRestorePlanRequest request)
public final OperationFuture<RestorePlan,OperationMetadata> updateRestorePlanAsync(UpdateRestorePlanRequest request)
Update a RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateRestorePlanRequest request =
UpdateRestorePlanRequest.newBuilder()
.setRestorePlan(RestorePlan.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
RestorePlan response = backupForGKEClient.updateRestorePlanAsync(request).get();
}
Name | Description |
request | UpdateRestorePlanRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<RestorePlan,OperationMetadata> |
updateRestorePlanCallable()
public final UnaryCallable<UpdateRestorePlanRequest,Operation> updateRestorePlanCallable()
Update a RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateRestorePlanRequest request =
UpdateRestorePlanRequest.newBuilder()
.setRestorePlan(RestorePlan.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
backupForGKEClient.updateRestorePlanCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateRestorePlanRequest,Operation> |
updateRestorePlanOperationCallable()
public final OperationCallable<UpdateRestorePlanRequest,RestorePlan,OperationMetadata> updateRestorePlanOperationCallable()
Update a RestorePlan.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) {
UpdateRestorePlanRequest request =
UpdateRestorePlanRequest.newBuilder()
.setRestorePlan(RestorePlan.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<RestorePlan, OperationMetadata> future =
backupForGKEClient.updateRestorePlanOperationCallable().futureCall(request);
// Do something.
RestorePlan response = future.get();
}
Type | Description |
OperationCallable<UpdateRestorePlanRequest,RestorePlan,OperationMetadata> |