Class BackupForGKEClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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().
| Method | Description | Method Variants |
|---|---|---|
CreateBackupPlan |
Creates a new BackupPlan in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListBackupPlans |
Lists BackupPlans in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackupPlan |
Retrieve the details of a single BackupPlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateBackupPlan |
Update a BackupPlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackupPlan |
Deletes an existing BackupPlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateBackupChannel |
Creates a new BackupChannel in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListBackupChannels |
Lists BackupChannels in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackupChannel |
Retrieve the details of a single BackupChannel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateBackupChannel |
Update a BackupChannel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackupChannel |
Deletes an existing BackupChannel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListBackupPlanBindings |
Lists BackupPlanBindings in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackupPlanBinding |
Retrieve the details of a single BackupPlanBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateBackup |
Creates a Backup for the given BackupPlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListBackups |
Lists the Backups for a given BackupPlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackup |
Retrieve the details of a single Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateBackup |
Update a Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackup |
Deletes an existing Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListVolumeBackups |
Lists the VolumeBackups for a given Backup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetVolumeBackup |
Retrieve the details of a single VolumeBackup. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateRestorePlan |
Creates a new RestorePlan in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListRestorePlans |
Lists RestorePlans in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRestorePlan |
Retrieve the details of a single RestorePlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateRestorePlan |
Update a RestorePlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteRestorePlan |
Deletes an existing RestorePlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateRestoreChannel |
Creates a new RestoreChannel in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListRestoreChannels |
Lists RestoreChannels in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRestoreChannel |
Retrieve the details of a single RestoreChannel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateRestoreChannel |
Update a RestoreChannel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteRestoreChannel |
Deletes an existing RestoreChannel. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListRestorePlanBindings |
Lists RestorePlanBindings in a given location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRestorePlanBinding |
Retrieve the details of a single RestorePlanBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateRestore |
Creates a new Restore for the given RestorePlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListRestores |
Lists the Restores for a given RestorePlan. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetRestore |
Retrieves the details of a single Restore. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateRestore |
Update a Restore. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteRestore |
Deletes an existing Restore. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListVolumeRestores |
Lists the VolumeRestores for a given Restore. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetVolumeRestore |
Retrieve the details of a single VolumeRestore. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackupIndexDownloadUrl |
Retrieve the link to the backupIndex. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of 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.newHttpJsonBuilder().build();
BackupForGKEClient backupForGKEClient = BackupForGKEClient.create(backupForGKESettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBackupForGKEClient(BackupForGKESettings settings) Constructs an instance of BackupForGKEClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final BackupForGKEClientcreate()Constructs an instance of BackupForGKEClient with default settings.static final BackupForGKEClientcreate(BackupForGKESettings settings) Constructs an instance of BackupForGKEClient, using the given settings.static final BackupForGKEClientcreate(BackupForGKEStub stub) Constructs an instance of BackupForGKEClient, using the given stub for making calls.createBackupAsync(BackupPlanName parent, Backup backup, String backupId) Creates a Backup for the given BackupPlan.createBackupAsync(CreateBackupRequest request) Creates a Backup for the given BackupPlan.createBackupAsync(String parent, Backup backup, String backupId) Creates a Backup for the given BackupPlan.Creates a Backup for the given BackupPlan.Creates a new BackupChannel in a given location.createBackupChannelAsync(LocationName parent, BackupChannel backupChannel, String backupChannelId) Creates a new BackupChannel in a given location.createBackupChannelAsync(String parent, BackupChannel backupChannel, String backupChannelId) Creates a new BackupChannel in a given location.Creates a new BackupChannel in a given location.Creates a new BackupChannel in a given location.Creates a Backup for the given BackupPlan.Creates a new BackupPlan in a given location.createBackupPlanAsync(LocationName parent, BackupPlan backupPlan, String backupPlanId) Creates a new BackupPlan in a given location.createBackupPlanAsync(String parent, BackupPlan backupPlan, String backupPlanId) Creates a new BackupPlan in a given location.Creates a new BackupPlan in a given location.Creates a new BackupPlan in a given location.createRestoreAsync(CreateRestoreRequest request) Creates a new Restore for the given RestorePlan.createRestoreAsync(RestorePlanName parent, Restore restore, String restoreId) Creates a new Restore for the given RestorePlan.createRestoreAsync(String parent, Restore restore, String restoreId) Creates a new Restore for the given RestorePlan.Creates a new Restore for the given RestorePlan.Creates a new RestoreChannel in a given location.createRestoreChannelAsync(LocationName parent, RestoreChannel restoreChannel, String restoreChannelId) Creates a new RestoreChannel in a given location.createRestoreChannelAsync(String parent, RestoreChannel restoreChannel, String restoreChannelId) Creates a new RestoreChannel in a given location.Creates a new RestoreChannel in a given location.Creates a new RestoreChannel in a given location.Creates a new Restore for the given RestorePlan.Creates a new RestorePlan in a given location.createRestorePlanAsync(LocationName parent, RestorePlan restorePlan, String restorePlanId) Creates a new RestorePlan in a given location.createRestorePlanAsync(String parent, RestorePlan restorePlan, String restorePlanId) Creates a new RestorePlan in a given location.Creates a new RestorePlan in a given location.Creates a new RestorePlan in a given location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(BackupName name) Deletes an existing Backup.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(DeleteBackupRequest request) Deletes an existing Backup.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(String name) Deletes an existing Backup.Deletes an existing Backup.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing BackupChannel.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing BackupChannel.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing BackupChannel.Deletes an existing BackupChannel.final OperationCallable<DeleteBackupChannelRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an existing BackupChannel.final OperationCallable<DeleteBackupRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an existing Backup.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing BackupPlan.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing BackupPlan.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupPlanAsync(String name) Deletes an existing BackupPlan.Deletes an existing BackupPlan.final OperationCallable<DeleteBackupPlanRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an existing BackupPlan.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRestoreAsync(DeleteRestoreRequest request) Deletes an existing Restore.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing Restore.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRestoreAsync(String name) Deletes an existing Restore.Deletes an existing Restore.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing RestoreChannel.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing RestoreChannel.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing RestoreChannel.Deletes an existing RestoreChannel.final OperationCallable<DeleteRestoreChannelRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an existing RestoreChannel.final OperationCallable<DeleteRestoreRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an existing Restore.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing RestorePlan.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes an existing RestorePlan.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRestorePlanAsync(String name) Deletes an existing RestorePlan.Deletes an existing RestorePlan.final OperationCallable<DeleteRestorePlanRequest,com.google.protobuf.Empty, OperationMetadata> Deletes an existing RestorePlan.final BackupgetBackup(BackupName name) Retrieve the details of a single Backup.final BackupgetBackup(GetBackupRequest request) Retrieve the details of a single Backup.final BackupRetrieve the details of a single Backup.final UnaryCallable<GetBackupRequest,Backup> Retrieve the details of a single Backup.final BackupChannelRetrieve the details of a single BackupChannel.final BackupChannelgetBackupChannel(GetBackupChannelRequest request) Retrieve the details of a single BackupChannel.final BackupChannelgetBackupChannel(String name) Retrieve the details of a single BackupChannel.Retrieve the details of a single BackupChannel.getBackupIndexDownloadUrl(BackupName backup) Retrieve the link to the backupIndex.Retrieve the link to the backupIndex.getBackupIndexDownloadUrl(String backup) Retrieve the link to the backupIndex.Retrieve the link to the backupIndex.final BackupPlangetBackupPlan(BackupPlanName name) Retrieve the details of a single BackupPlan.final BackupPlangetBackupPlan(GetBackupPlanRequest request) Retrieve the details of a single BackupPlan.final BackupPlangetBackupPlan(String name) Retrieve the details of a single BackupPlan.final BackupPlanBindingRetrieve the details of a single BackupPlanBinding.final BackupPlanBindingRetrieve the details of a single BackupPlanBinding.final BackupPlanBindinggetBackupPlanBinding(String name) Retrieve the details of a single BackupPlanBinding.Retrieve the details of a single BackupPlanBinding.Retrieve the details of a single BackupPlan.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the access control policy for a resource.Gets the access control policy for a resource.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final RestoregetRestore(GetRestoreRequest request) Retrieves the details of a single Restore.final RestoregetRestore(RestoreName name) Retrieves the details of a single Restore.final RestoregetRestore(String name) Retrieves the details of a single Restore.Retrieves the details of a single Restore.final RestoreChannelRetrieve the details of a single RestoreChannel.final RestoreChannelRetrieve the details of a single RestoreChannel.final RestoreChannelgetRestoreChannel(String name) Retrieve the details of a single RestoreChannel.Retrieve the details of a single RestoreChannel.final RestorePlangetRestorePlan(GetRestorePlanRequest request) Retrieve the details of a single RestorePlan.final RestorePlanRetrieve the details of a single RestorePlan.final RestorePlangetRestorePlan(String name) Retrieve the details of a single RestorePlan.final RestorePlanBindingRetrieve the details of a single RestorePlanBinding.final RestorePlanBindingRetrieve the details of a single RestorePlanBinding.final RestorePlanBindinggetRestorePlanBinding(String name) Retrieve the details of a single RestorePlanBinding.Retrieve the details of a single RestorePlanBinding.Retrieve the details of a single RestorePlan.final BackupForGKESettingsgetStub()final VolumeBackupgetVolumeBackup(GetVolumeBackupRequest request) Retrieve the details of a single VolumeBackup.final VolumeBackupRetrieve the details of a single VolumeBackup.final VolumeBackupgetVolumeBackup(String name) Retrieve the details of a single VolumeBackup.Retrieve the details of a single VolumeBackup.final VolumeRestoregetVolumeRestore(GetVolumeRestoreRequest request) Retrieve the details of a single VolumeRestore.final VolumeRestoreRetrieve the details of a single VolumeRestore.final VolumeRestoregetVolumeRestore(String name) Retrieve the details of a single VolumeRestore.Retrieve the details of a single VolumeRestore.booleanbooleanLists BackupChannels in a given location.listBackupChannels(LocationName parent) Lists BackupChannels in a given location.listBackupChannels(String parent) Lists BackupChannels in a given location.Lists BackupChannels in a given location.Lists BackupChannels in a given location.Lists BackupPlanBindings in a given location.Lists BackupPlanBindings in a given location.listBackupPlanBindings(String parent) Lists BackupPlanBindings in a given location.Lists BackupPlanBindings in a given location.final UnaryCallable<ListBackupPlanBindingsRequest,BackupForGKEClient.ListBackupPlanBindingsPagedResponse> Lists BackupPlanBindings in a given location.listBackupPlans(ListBackupPlansRequest request) Lists BackupPlans in a given location.listBackupPlans(LocationName parent) Lists BackupPlans in a given location.listBackupPlans(String parent) Lists BackupPlans in a given location.Lists BackupPlans in a given location.Lists BackupPlans in a given location.listBackups(BackupPlanName parent) Lists the Backups for a given BackupPlan.listBackups(ListBackupsRequest request) Lists the Backups for a given BackupPlan.listBackups(String parent) Lists the Backups for a given BackupPlan.Lists the Backups for a given BackupPlan.Lists the Backups for a given BackupPlan.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists RestoreChannels in a given location.listRestoreChannels(LocationName parent) Lists RestoreChannels in a given location.listRestoreChannels(String parent) Lists RestoreChannels in a given location.Lists RestoreChannels in a given location.Lists RestoreChannels in a given location.Lists RestorePlanBindings in a given location.Lists RestorePlanBindings in a given location.listRestorePlanBindings(String parent) Lists RestorePlanBindings in a given location.Lists RestorePlanBindings in a given location.final UnaryCallable<ListRestorePlanBindingsRequest,BackupForGKEClient.ListRestorePlanBindingsPagedResponse> Lists RestorePlanBindings in a given location.listRestorePlans(ListRestorePlansRequest request) Lists RestorePlans in a given location.listRestorePlans(LocationName parent) Lists RestorePlans in a given location.listRestorePlans(String parent) Lists RestorePlans in a given location.Lists RestorePlans in a given location.Lists RestorePlans in a given location.listRestores(ListRestoresRequest request) Lists the Restores for a given RestorePlan.listRestores(RestorePlanName parent) Lists the Restores for a given RestorePlan.listRestores(String parent) Lists the Restores for a given RestorePlan.Lists the Restores for a given RestorePlan.Lists the Restores for a given RestorePlan.listVolumeBackups(BackupName parent) Lists the VolumeBackups for a given Backup.Lists the VolumeBackups for a given Backup.listVolumeBackups(String parent) Lists the VolumeBackups for a given Backup.Lists the VolumeBackups for a given Backup.Lists the VolumeBackups for a given Backup.Lists the VolumeRestores for a given Restore.listVolumeRestores(RestoreName parent) Lists the VolumeRestores for a given Restore.listVolumeRestores(String parent) Lists the VolumeRestores for a given Restore.Lists the VolumeRestores for a given Restore.Lists the VolumeRestores for a given Restore.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the access control policy on the specified resource.Sets the access control policy on the specified resource.voidshutdown()voidReturns permissions that a caller has on the specified resource.Returns permissions that a caller has on the specified resource.updateBackupAsync(Backup backup, com.google.protobuf.FieldMask updateMask) Update a Backup.updateBackupAsync(UpdateBackupRequest request) Update a Backup.Update a Backup.updateBackupChannelAsync(BackupChannel backupChannel, com.google.protobuf.FieldMask updateMask) Update a BackupChannel.Update a BackupChannel.Update a BackupChannel.Update a BackupChannel.Update a Backup.updateBackupPlanAsync(BackupPlan backupPlan, com.google.protobuf.FieldMask updateMask) Update a BackupPlan.Update a BackupPlan.Update a BackupPlan.Update a BackupPlan.updateRestoreAsync(Restore restore, com.google.protobuf.FieldMask updateMask) Update a Restore.updateRestoreAsync(UpdateRestoreRequest request) Update a Restore.Update a Restore.updateRestoreChannelAsync(RestoreChannel restoreChannel, com.google.protobuf.FieldMask updateMask) Update a RestoreChannel.Update a RestoreChannel.Update a RestoreChannel.Update a RestoreChannel.Update a Restore.updateRestorePlanAsync(RestorePlan restorePlan, com.google.protobuf.FieldMask updateMask) Update a RestorePlan.Update a RestorePlan.Update a RestorePlan.Update a RestorePlan.
-
Constructor Details
-
BackupForGKEClient
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.- Throws:
IOException
-
BackupForGKEClient
-
-
Method Details
-
create
Constructs an instance of BackupForGKEClient with default settings.- Throws:
IOException
-
create
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.- Throws:
IOException
-
create
Constructs an instance of BackupForGKEClient, using the given stub for making calls. This is for advanced usage - prefer using create(BackupForGKESettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
createBackupPlanAsync
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(); }- Parameters:
parent- Required. The location within which to create the BackupPlan. Format: `projects/*/locations/*`backupPlan- Required. The BackupPlan resource object to create.backupPlanId- 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
- Throws:
ApiException- if the remote call fails
-
createBackupPlanAsync
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(); }- Parameters:
parent- Required. The location within which to create the BackupPlan. Format: `projects/*/locations/*`backupPlan- Required. The BackupPlan resource object to create.backupPlanId- 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
- Throws:
ApiException- if the remote call fails
-
createBackupPlanAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createBackupPlanOperationCallable
public final OperationCallable<CreateBackupPlanRequest,BackupPlan, createBackupPlanOperationCallable()OperationMetadata> 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(); } -
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(); } -
listBackupPlans
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); } }- Parameters:
parent- Required. The location that contains the BackupPlans to list. Format: `projects/*/locations/*`- Throws:
ApiException- if the remote call fails
-
listBackupPlans
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); } }- Parameters:
parent- Required. The location that contains the BackupPlans to list. Format: `projects/*/locations/*`- Throws:
ApiException- if the remote call fails
-
listBackupPlans
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getBackupPlan
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); }- Parameters:
name- Required. Fully qualified BackupPlan name. Format: `projects/*/locations/*/backupPlans/*`- Throws:
ApiException- if the remote call fails
-
getBackupPlan
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); }- Parameters:
name- Required. Fully qualified BackupPlan name. Format: `projects/*/locations/*/backupPlans/*`- Throws:
ApiException- if the remote call fails
-
getBackupPlan
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateBackupPlanAsync
public final OperationFuture<BackupPlan,OperationMetadata> updateBackupPlanAsync(BackupPlan backupPlan, com.google.protobuf.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(); }- Parameters:
backupPlan- Required. A new version of the BackupPlan resource that contains updated fields. This may be sparsely populated if an `update_mask` is provided.updateMask- Optional. 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 `backup_plan` provided with this request. Field names are relative to the root of the resource (e.g., `description`, `backup_config.include_volume_data`, etc.) If no `update_mask` is provided, all fields in `backup_plan` will be written to the target BackupPlan resource. Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored and are not used to update the target BackupPlan.- Throws:
ApiException- if the remote call fails
-
updateBackupPlanAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateBackupPlanOperationCallable
public final OperationCallable<UpdateBackupPlanRequest,BackupPlan, updateBackupPlanOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteBackupPlanAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. Fully qualified BackupPlan name. Format: `projects/*/locations/*/backupPlans/*`- Throws:
ApiException- if the remote call fails
-
deleteBackupPlanAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. Fully qualified BackupPlan name. Format: `projects/*/locations/*/backupPlans/*`- Throws:
ApiException- if the remote call fails
-
deleteBackupPlanAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteBackupPlanOperationCallable
public final OperationCallable<DeleteBackupPlanRequest,com.google.protobuf.Empty, deleteBackupPlanOperationCallable()OperationMetadata> 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(); } -
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(); } -
createBackupChannelAsync
public final OperationFuture<BackupChannel,OperationMetadata> createBackupChannelAsync(LocationName parent, BackupChannel backupChannel, String backupChannelId) Creates a new BackupChannel 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]"); BackupChannel backupChannel = BackupChannel.newBuilder().build(); String backupChannelId = "backupChannelId707614172"; BackupChannel response = backupForGKEClient.createBackupChannelAsync(parent, backupChannel, backupChannelId).get(); }- Parameters:
parent- Required. The location within which to create the BackupChannel. Format: `projects/*/locations/*`backupChannel- Required. The BackupChannel resource object to create.backupChannelId- Optional. The client-provided short name for the BackupChannel 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 BackupChannels in this location If the user does not provide a name, a uuid will be used as the name.
- Throws:
ApiException- if the remote call fails
-
createBackupChannelAsync
public final OperationFuture<BackupChannel,OperationMetadata> createBackupChannelAsync(String parent, BackupChannel backupChannel, String backupChannelId) Creates a new BackupChannel 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(); BackupChannel backupChannel = BackupChannel.newBuilder().build(); String backupChannelId = "backupChannelId707614172"; BackupChannel response = backupForGKEClient.createBackupChannelAsync(parent, backupChannel, backupChannelId).get(); }- Parameters:
parent- Required. The location within which to create the BackupChannel. Format: `projects/*/locations/*`backupChannel- Required. The BackupChannel resource object to create.backupChannelId- Optional. The client-provided short name for the BackupChannel 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 BackupChannels in this location If the user does not provide a name, a uuid will be used as the name.
- Throws:
ApiException- if the remote call fails
-
createBackupChannelAsync
public final OperationFuture<BackupChannel,OperationMetadata> createBackupChannelAsync(CreateBackupChannelRequest request) Creates a new BackupChannel 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()) { CreateBackupChannelRequest request = CreateBackupChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupChannel(BackupChannel.newBuilder().build()) .setBackupChannelId("backupChannelId707614172") .build(); BackupChannel response = backupForGKEClient.createBackupChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createBackupChannelOperationCallable
public final OperationCallable<CreateBackupChannelRequest,BackupChannel, createBackupChannelOperationCallable()OperationMetadata> Creates a new BackupChannel 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()) { CreateBackupChannelRequest request = CreateBackupChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupChannel(BackupChannel.newBuilder().build()) .setBackupChannelId("backupChannelId707614172") .build(); OperationFuture<BackupChannel, OperationMetadata> future = backupForGKEClient.createBackupChannelOperationCallable().futureCall(request); // Do something. BackupChannel response = future.get(); } -
createBackupChannelCallable
Creates a new BackupChannel 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()) { CreateBackupChannelRequest request = CreateBackupChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupChannel(BackupChannel.newBuilder().build()) .setBackupChannelId("backupChannelId707614172") .build(); ApiFuture<Operation> future = backupForGKEClient.createBackupChannelCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listBackupChannels
public final BackupForGKEClient.ListBackupChannelsPagedResponse listBackupChannels(LocationName parent) Lists BackupChannels 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 (BackupChannel element : backupForGKEClient.listBackupChannels(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The location that contains the BackupChannels to list. Format: `projects/*/locations/*`- Throws:
ApiException- if the remote call fails
-
listBackupChannels
Lists BackupChannels 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 (BackupChannel element : backupForGKEClient.listBackupChannels(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The location that contains the BackupChannels to list. Format: `projects/*/locations/*`- Throws:
ApiException- if the remote call fails
-
listBackupChannels
public final BackupForGKEClient.ListBackupChannelsPagedResponse listBackupChannels(ListBackupChannelsRequest request) Lists BackupChannels 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()) { ListBackupChannelsRequest request = ListBackupChannelsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (BackupChannel element : backupForGKEClient.listBackupChannels(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listBackupChannelsPagedCallable
public final UnaryCallable<ListBackupChannelsRequest,BackupForGKEClient.ListBackupChannelsPagedResponse> listBackupChannelsPagedCallable()Lists BackupChannels 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()) { ListBackupChannelsRequest request = ListBackupChannelsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<BackupChannel> future = backupForGKEClient.listBackupChannelsPagedCallable().futureCall(request); // Do something. for (BackupChannel element : future.get().iterateAll()) { // doThingsWith(element); } } -
listBackupChannelsCallable
public final UnaryCallable<ListBackupChannelsRequest,ListBackupChannelsResponse> listBackupChannelsCallable()Lists BackupChannels 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()) { ListBackupChannelsRequest request = ListBackupChannelsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListBackupChannelsResponse response = backupForGKEClient.listBackupChannelsCallable().call(request); for (BackupChannel element : response.getBackupChannelsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getBackupChannel
Retrieve the details of a single BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { BackupChannelName name = BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]"); BackupChannel response = backupForGKEClient.getBackupChannel(name); }- Parameters:
name- Required. Fully qualified BackupChannel name. Format: `projects/*/locations/*/backupChannels/*`- Throws:
ApiException- if the remote call fails
-
getBackupChannel
Retrieve the details of a single BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 = BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString(); BackupChannel response = backupForGKEClient.getBackupChannel(name); }- Parameters:
name- Required. Fully qualified BackupChannel name. Format: `projects/*/locations/*/backupChannels/*`- Throws:
ApiException- if the remote call fails
-
getBackupChannel
Retrieve the details of a single BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetBackupChannelRequest request = GetBackupChannelRequest.newBuilder() .setName( BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString()) .build(); BackupChannel response = backupForGKEClient.getBackupChannel(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getBackupChannelCallable
Retrieve the details of a single BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetBackupChannelRequest request = GetBackupChannelRequest.newBuilder() .setName( BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString()) .build(); ApiFuture<BackupChannel> future = backupForGKEClient.getBackupChannelCallable().futureCall(request); // Do something. BackupChannel response = future.get(); } -
updateBackupChannelAsync
public final OperationFuture<BackupChannel,OperationMetadata> updateBackupChannelAsync(BackupChannel backupChannel, com.google.protobuf.FieldMask updateMask) Update a BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { BackupChannel backupChannel = BackupChannel.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); BackupChannel response = backupForGKEClient.updateBackupChannelAsync(backupChannel, updateMask).get(); }- Parameters:
backupChannel- Required. A new version of the BackupChannel resource that contains updated fields. This may be sparsely populated if an `update_mask` is provided.updateMask- Optional. This is used to specify the fields to be overwritten in the BackupChannel targeted for update. The values for each of these updated fields will be taken from the `backup_channel` provided with this request. Field names are relative to the root of the resource (e.g., `description`, `labels`, etc.) If no `update_mask` is provided, all fields in `backup_channel` will be written to the target BackupChannel resource. Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and are not used to update the target BackupChannel.- Throws:
ApiException- if the remote call fails
-
updateBackupChannelAsync
public final OperationFuture<BackupChannel,OperationMetadata> updateBackupChannelAsync(UpdateBackupChannelRequest request) Update a BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { UpdateBackupChannelRequest request = UpdateBackupChannelRequest.newBuilder() .setBackupChannel(BackupChannel.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); BackupChannel response = backupForGKEClient.updateBackupChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateBackupChannelOperationCallable
public final OperationCallable<UpdateBackupChannelRequest,BackupChannel, updateBackupChannelOperationCallable()OperationMetadata> Update a BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { UpdateBackupChannelRequest request = UpdateBackupChannelRequest.newBuilder() .setBackupChannel(BackupChannel.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); OperationFuture<BackupChannel, OperationMetadata> future = backupForGKEClient.updateBackupChannelOperationCallable().futureCall(request); // Do something. BackupChannel response = future.get(); } -
updateBackupChannelCallable
Update a BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { UpdateBackupChannelRequest request = UpdateBackupChannelRequest.newBuilder() .setBackupChannel(BackupChannel.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Operation> future = backupForGKEClient.updateBackupChannelCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteBackupChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupChannelAsync(BackupChannelName name) Deletes an existing BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { BackupChannelName name = BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]"); backupForGKEClient.deleteBackupChannelAsync(name).get(); }- Parameters:
name- Required. Fully qualified BackupChannel name. Format: `projects/*/locations/*/backupChannels/*`- Throws:
ApiException- if the remote call fails
-
deleteBackupChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupChannelAsync(String name) Deletes an existing BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 = BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString(); backupForGKEClient.deleteBackupChannelAsync(name).get(); }- Parameters:
name- Required. Fully qualified BackupChannel name. Format: `projects/*/locations/*/backupChannels/*`- Throws:
ApiException- if the remote call fails
-
deleteBackupChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupChannelAsync(DeleteBackupChannelRequest request) Deletes an existing BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { DeleteBackupChannelRequest request = DeleteBackupChannelRequest.newBuilder() .setName( BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString()) .setEtag("etag3123477") .setForce(true) .build(); backupForGKEClient.deleteBackupChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteBackupChannelOperationCallable
public final OperationCallable<DeleteBackupChannelRequest,com.google.protobuf.Empty, deleteBackupChannelOperationCallable()OperationMetadata> Deletes an existing BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { DeleteBackupChannelRequest request = DeleteBackupChannelRequest.newBuilder() .setName( BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString()) .setEtag("etag3123477") .setForce(true) .build(); OperationFuture<Empty, OperationMetadata> future = backupForGKEClient.deleteBackupChannelOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteBackupChannelCallable
Deletes an existing BackupChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { DeleteBackupChannelRequest request = DeleteBackupChannelRequest.newBuilder() .setName( BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString()) .setEtag("etag3123477") .setForce(true) .build(); ApiFuture<Operation> future = backupForGKEClient.deleteBackupChannelCallable().futureCall(request); // Do something. future.get(); } -
listBackupPlanBindings
public final BackupForGKEClient.ListBackupPlanBindingsPagedResponse listBackupPlanBindings(BackupChannelName parent) Lists BackupPlanBindings 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()) { BackupChannelName parent = BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]"); for (BackupPlanBinding element : backupForGKEClient.listBackupPlanBindings(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The BackupChannel that contains the BackupPlanBindings to list. Format: `projects/*/locations/*/backupChannels/*`- Throws:
ApiException- if the remote call fails
-
listBackupPlanBindings
public final BackupForGKEClient.ListBackupPlanBindingsPagedResponse listBackupPlanBindings(String parent) Lists BackupPlanBindings 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 = BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString(); for (BackupPlanBinding element : backupForGKEClient.listBackupPlanBindings(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The BackupChannel that contains the BackupPlanBindings to list. Format: `projects/*/locations/*/backupChannels/*`- Throws:
ApiException- if the remote call fails
-
listBackupPlanBindings
public final BackupForGKEClient.ListBackupPlanBindingsPagedResponse listBackupPlanBindings(ListBackupPlanBindingsRequest request) Lists BackupPlanBindings 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()) { ListBackupPlanBindingsRequest request = ListBackupPlanBindingsRequest.newBuilder() .setParent( BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (BackupPlanBinding element : backupForGKEClient.listBackupPlanBindings(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listBackupPlanBindingsPagedCallable
public final UnaryCallable<ListBackupPlanBindingsRequest,BackupForGKEClient.ListBackupPlanBindingsPagedResponse> listBackupPlanBindingsPagedCallable()Lists BackupPlanBindings 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()) { ListBackupPlanBindingsRequest request = ListBackupPlanBindingsRequest.newBuilder() .setParent( BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<BackupPlanBinding> future = backupForGKEClient.listBackupPlanBindingsPagedCallable().futureCall(request); // Do something. for (BackupPlanBinding element : future.get().iterateAll()) { // doThingsWith(element); } } -
listBackupPlanBindingsCallable
public final UnaryCallable<ListBackupPlanBindingsRequest,ListBackupPlanBindingsResponse> listBackupPlanBindingsCallable()Lists BackupPlanBindings 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()) { ListBackupPlanBindingsRequest request = ListBackupPlanBindingsRequest.newBuilder() .setParent( BackupChannelName.of("[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListBackupPlanBindingsResponse response = backupForGKEClient.listBackupPlanBindingsCallable().call(request); for (BackupPlanBinding element : response.getBackupPlanBindingsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getBackupPlanBinding
Retrieve the details of a single BackupPlanBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { BackupPlanBindingName name = BackupPlanBindingName.of( "[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]", "[BACKUP_PLAN_BINDING]"); BackupPlanBinding response = backupForGKEClient.getBackupPlanBinding(name); }- Parameters:
name- Required. Fully qualified BackupPlanBinding name. Format: `projects/*/locations/*/backupChannels/*/backupPlanBindings/*`- Throws:
ApiException- if the remote call fails
-
getBackupPlanBinding
Retrieve the details of a single BackupPlanBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 = BackupPlanBindingName.of( "[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]", "[BACKUP_PLAN_BINDING]") .toString(); BackupPlanBinding response = backupForGKEClient.getBackupPlanBinding(name); }- Parameters:
name- Required. Fully qualified BackupPlanBinding name. Format: `projects/*/locations/*/backupChannels/*/backupPlanBindings/*`- Throws:
ApiException- if the remote call fails
-
getBackupPlanBinding
Retrieve the details of a single BackupPlanBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetBackupPlanBindingRequest request = GetBackupPlanBindingRequest.newBuilder() .setName( BackupPlanBindingName.of( "[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]", "[BACKUP_PLAN_BINDING]") .toString()) .build(); BackupPlanBinding response = backupForGKEClient.getBackupPlanBinding(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getBackupPlanBindingCallable
public final UnaryCallable<GetBackupPlanBindingRequest,BackupPlanBinding> getBackupPlanBindingCallable()Retrieve the details of a single BackupPlanBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetBackupPlanBindingRequest request = GetBackupPlanBindingRequest.newBuilder() .setName( BackupPlanBindingName.of( "[PROJECT]", "[LOCATION]", "[BACKUP_CHANNEL]", "[BACKUP_PLAN_BINDING]") .toString()) .build(); ApiFuture<BackupPlanBinding> future = backupForGKEClient.getBackupPlanBindingCallable().futureCall(request); // Do something. BackupPlanBinding response = future.get(); } -
createBackupAsync
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(); }- Parameters:
parent- Required. The BackupPlan within which to create the Backup. Format: `projects/*/locations/*/backupPlans/*`backup- Optional. The Backup resource to create.backupId- Optional. 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
- Throws:
ApiException- if the remote call fails
-
createBackupAsync
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(); }- Parameters:
parent- Required. The BackupPlan within which to create the Backup. Format: `projects/*/locations/*/backupPlans/*`backup- Optional. The Backup resource to create.backupId- Optional. 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
- Throws:
ApiException- if the remote call fails
-
createBackupAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createBackupOperationCallable
public final OperationCallable<CreateBackupRequest,Backup, createBackupOperationCallable()OperationMetadata> 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(); } -
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(); } -
listBackups
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); } }- Parameters:
parent- Required. The BackupPlan that contains the Backups to list. Format: `projects/*/locations/*/backupPlans/*`- Throws:
ApiException- if the remote call fails
-
listBackups
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); } }- Parameters:
parent- Required. The BackupPlan that contains the Backups to list. Format: `projects/*/locations/*/backupPlans/*`- Throws:
ApiException- if the remote call fails
-
listBackups
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") .setReturnPartialSuccess(true) .build(); for (Backup element : backupForGKEClient.listBackups(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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") .setReturnPartialSuccess(true) .build(); ApiFuture<Backup> future = backupForGKEClient.listBackupsPagedCallable().futureCall(request); // Do something. for (Backup element : future.get().iterateAll()) { // doThingsWith(element); } } -
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") .setReturnPartialSuccess(true) .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; } } } -
getBackup
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); }- Parameters:
name- Required. Full name of the Backup resource. Format: `projects/*/locations/*/backupPlans/*/backups/*`- Throws:
ApiException- if the remote call fails
-
getBackup
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); }- Parameters:
name- Required. Full name of the Backup resource. Format: `projects/*/locations/*/backupPlans/*/backups/*`- Throws:
ApiException- if the remote call fails
-
getBackup
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateBackupAsync
public final OperationFuture<Backup,OperationMetadata> updateBackupAsync(Backup backup, com.google.protobuf.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(); }- Parameters:
backup- Required. A new version of the Backup resource that contains updated fields. This may be sparsely populated if an `update_mask` is provided.updateMask- Optional. 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 `backup_plan` provided with this request. Field names are relative to the root of the resource. If no `update_mask` is provided, all fields in `backup` will be written to the target Backup resource. Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored and are not used to update the target Backup.- Throws:
ApiException- if the remote call fails
-
updateBackupAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateBackupOperationCallable
public final OperationCallable<UpdateBackupRequest,Backup, updateBackupOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteBackupAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. Name of the Backup resource. Format: `projects/*/locations/*/backupPlans/*/backups/*`- Throws:
ApiException- if the remote call fails
-
deleteBackupAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. Name of the Backup resource. Format: `projects/*/locations/*/backupPlans/*/backups/*`- Throws:
ApiException- if the remote call fails
-
deleteBackupAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteBackupOperationCallable
public final OperationCallable<DeleteBackupRequest,com.google.protobuf.Empty, deleteBackupOperationCallable()OperationMetadata> 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(); } -
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(); } -
listVolumeBackups
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); } }- Parameters:
parent- Required. The Backup that contains the VolumeBackups to list. Format: `projects/*/locations/*/backupPlans/*/backups/*`- Throws:
ApiException- if the remote call fails
-
listVolumeBackups
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); } }- Parameters:
parent- Required. The Backup that contains the VolumeBackups to list. Format: `projects/*/locations/*/backupPlans/*/backups/*`- Throws:
ApiException- if the remote call fails
-
listVolumeBackups
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getVolumeBackup
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); }- Parameters:
name- Required. Full name of the VolumeBackup resource. Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`- Throws:
ApiException- if the remote call fails
-
getVolumeBackup
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); }- Parameters:
name- Required. Full name of the VolumeBackup resource. Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`- Throws:
ApiException- if the remote call fails
-
getVolumeBackup
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createRestorePlanAsync
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(); }- Parameters:
parent- Required. The location within which to create the RestorePlan. Format: `projects/*/locations/*`restorePlan- Required. The RestorePlan resource object to create.restorePlanId- 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
- Throws:
ApiException- if the remote call fails
-
createRestorePlanAsync
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(); }- Parameters:
parent- Required. The location within which to create the RestorePlan. Format: `projects/*/locations/*`restorePlan- Required. The RestorePlan resource object to create.restorePlanId- 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
- Throws:
ApiException- if the remote call fails
-
createRestorePlanAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createRestorePlanOperationCallable
public final OperationCallable<CreateRestorePlanRequest,RestorePlan, createRestorePlanOperationCallable()OperationMetadata> 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(); } -
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(); } -
listRestorePlans
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); } }- Parameters:
parent- Required. The location that contains the RestorePlans to list. Format: `projects/*/locations/*`- Throws:
ApiException- if the remote call fails
-
listRestorePlans
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); } }- Parameters:
parent- Required. The location that contains the RestorePlans to list. Format: `projects/*/locations/*`- Throws:
ApiException- if the remote call fails
-
listRestorePlans
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getRestorePlan
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); }- Parameters:
name- Required. Fully qualified RestorePlan name. Format: `projects/*/locations/*/restorePlans/*`- Throws:
ApiException- if the remote call fails
-
getRestorePlan
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); }- Parameters:
name- Required. Fully qualified RestorePlan name. Format: `projects/*/locations/*/restorePlans/*`- Throws:
ApiException- if the remote call fails
-
getRestorePlan
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateRestorePlanAsync
public final OperationFuture<RestorePlan,OperationMetadata> updateRestorePlanAsync(RestorePlan restorePlan, com.google.protobuf.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(); }- Parameters:
restorePlan- Required. A new version of the RestorePlan resource that contains updated fields. This may be sparsely populated if an `update_mask` is provided.updateMask- Optional. 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 `restore_plan` provided with this request. Field names are relative to the root of the resource. If no `update_mask` is provided, all fields in `restore_plan` will be written to the target RestorePlan resource. Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored and are not used to update the target RestorePlan.- Throws:
ApiException- if the remote call fails
-
updateRestorePlanAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateRestorePlanOperationCallable
public final OperationCallable<UpdateRestorePlanRequest,RestorePlan, updateRestorePlanOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteRestorePlanAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. Fully qualified RestorePlan name. Format: `projects/*/locations/*/restorePlans/*`- Throws:
ApiException- if the remote call fails
-
deleteRestorePlanAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. Fully qualified RestorePlan name. Format: `projects/*/locations/*/restorePlans/*`- Throws:
ApiException- if the remote call fails
-
deleteRestorePlanAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteRestorePlanOperationCallable
public final OperationCallable<DeleteRestorePlanRequest,com.google.protobuf.Empty, deleteRestorePlanOperationCallable()OperationMetadata> 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(); } -
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(); } -
createRestoreChannelAsync
public final OperationFuture<RestoreChannel,OperationMetadata> createRestoreChannelAsync(LocationName parent, RestoreChannel restoreChannel, String restoreChannelId) Creates a new RestoreChannel 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]"); RestoreChannel restoreChannel = RestoreChannel.newBuilder().build(); String restoreChannelId = "restoreChannelId1139842704"; RestoreChannel response = backupForGKEClient .createRestoreChannelAsync(parent, restoreChannel, restoreChannelId) .get(); }- Parameters:
parent- Required. The location within which to create the RestoreChannel. Format: `projects/*/locations/*`restoreChannel- Required. The RestoreChannel resource object to create.restoreChannelId- Optional. The client-provided short name for the RestoreChannel 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 RestoreChannels in this location If the user does not provide a name, a uuid will be used as the name.
- Throws:
ApiException- if the remote call fails
-
createRestoreChannelAsync
public final OperationFuture<RestoreChannel,OperationMetadata> createRestoreChannelAsync(String parent, RestoreChannel restoreChannel, String restoreChannelId) Creates a new RestoreChannel 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(); RestoreChannel restoreChannel = RestoreChannel.newBuilder().build(); String restoreChannelId = "restoreChannelId1139842704"; RestoreChannel response = backupForGKEClient .createRestoreChannelAsync(parent, restoreChannel, restoreChannelId) .get(); }- Parameters:
parent- Required. The location within which to create the RestoreChannel. Format: `projects/*/locations/*`restoreChannel- Required. The RestoreChannel resource object to create.restoreChannelId- Optional. The client-provided short name for the RestoreChannel 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 RestoreChannels in this location If the user does not provide a name, a uuid will be used as the name.
- Throws:
ApiException- if the remote call fails
-
createRestoreChannelAsync
public final OperationFuture<RestoreChannel,OperationMetadata> createRestoreChannelAsync(CreateRestoreChannelRequest request) Creates a new RestoreChannel 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()) { CreateRestoreChannelRequest request = CreateRestoreChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setRestoreChannel(RestoreChannel.newBuilder().build()) .setRestoreChannelId("restoreChannelId1139842704") .build(); RestoreChannel response = backupForGKEClient.createRestoreChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createRestoreChannelOperationCallable
public final OperationCallable<CreateRestoreChannelRequest,RestoreChannel, createRestoreChannelOperationCallable()OperationMetadata> Creates a new RestoreChannel 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()) { CreateRestoreChannelRequest request = CreateRestoreChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setRestoreChannel(RestoreChannel.newBuilder().build()) .setRestoreChannelId("restoreChannelId1139842704") .build(); OperationFuture<RestoreChannel, OperationMetadata> future = backupForGKEClient.createRestoreChannelOperationCallable().futureCall(request); // Do something. RestoreChannel response = future.get(); } -
createRestoreChannelCallable
Creates a new RestoreChannel 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()) { CreateRestoreChannelRequest request = CreateRestoreChannelRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setRestoreChannel(RestoreChannel.newBuilder().build()) .setRestoreChannelId("restoreChannelId1139842704") .build(); ApiFuture<Operation> future = backupForGKEClient.createRestoreChannelCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listRestoreChannels
public final BackupForGKEClient.ListRestoreChannelsPagedResponse listRestoreChannels(LocationName parent) Lists RestoreChannels 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 (RestoreChannel element : backupForGKEClient.listRestoreChannels(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The location that contains the RestoreChannels to list. Format: `projects/*/locations/*`- Throws:
ApiException- if the remote call fails
-
listRestoreChannels
Lists RestoreChannels 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 (RestoreChannel element : backupForGKEClient.listRestoreChannels(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The location that contains the RestoreChannels to list. Format: `projects/*/locations/*`- Throws:
ApiException- if the remote call fails
-
listRestoreChannels
public final BackupForGKEClient.ListRestoreChannelsPagedResponse listRestoreChannels(ListRestoreChannelsRequest request) Lists RestoreChannels 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()) { ListRestoreChannelsRequest request = ListRestoreChannelsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (RestoreChannel element : backupForGKEClient.listRestoreChannels(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listRestoreChannelsPagedCallable
public final UnaryCallable<ListRestoreChannelsRequest,BackupForGKEClient.ListRestoreChannelsPagedResponse> listRestoreChannelsPagedCallable()Lists RestoreChannels 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()) { ListRestoreChannelsRequest request = ListRestoreChannelsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<RestoreChannel> future = backupForGKEClient.listRestoreChannelsPagedCallable().futureCall(request); // Do something. for (RestoreChannel element : future.get().iterateAll()) { // doThingsWith(element); } } -
listRestoreChannelsCallable
public final UnaryCallable<ListRestoreChannelsRequest,ListRestoreChannelsResponse> listRestoreChannelsCallable()Lists RestoreChannels 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()) { ListRestoreChannelsRequest request = ListRestoreChannelsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListRestoreChannelsResponse response = backupForGKEClient.listRestoreChannelsCallable().call(request); for (RestoreChannel element : response.getRestoreChannelsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getRestoreChannel
Retrieve the details of a single RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { RestoreChannelName name = RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]"); RestoreChannel response = backupForGKEClient.getRestoreChannel(name); }- Parameters:
name- Required. Fully qualified RestoreChannel name. Format: `projects/*/locations/*/restoreChannels/*`- Throws:
ApiException- if the remote call fails
-
getRestoreChannel
Retrieve the details of a single RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 = RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString(); RestoreChannel response = backupForGKEClient.getRestoreChannel(name); }- Parameters:
name- Required. Fully qualified RestoreChannel name. Format: `projects/*/locations/*/restoreChannels/*`- Throws:
ApiException- if the remote call fails
-
getRestoreChannel
Retrieve the details of a single RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetRestoreChannelRequest request = GetRestoreChannelRequest.newBuilder() .setName( RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString()) .build(); RestoreChannel response = backupForGKEClient.getRestoreChannel(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getRestoreChannelCallable
Retrieve the details of a single RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetRestoreChannelRequest request = GetRestoreChannelRequest.newBuilder() .setName( RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString()) .build(); ApiFuture<RestoreChannel> future = backupForGKEClient.getRestoreChannelCallable().futureCall(request); // Do something. RestoreChannel response = future.get(); } -
updateRestoreChannelAsync
public final OperationFuture<RestoreChannel,OperationMetadata> updateRestoreChannelAsync(RestoreChannel restoreChannel, com.google.protobuf.FieldMask updateMask) Update a RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { RestoreChannel restoreChannel = RestoreChannel.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); RestoreChannel response = backupForGKEClient.updateRestoreChannelAsync(restoreChannel, updateMask).get(); }- Parameters:
restoreChannel- Required. A new version of the RestoreChannel resource that contains updated fields. This may be sparsely populated if an `update_mask` is provided.updateMask- Optional. This is used to specify the fields to be overwritten in the RestoreChannel targeted for update. The values for each of these updated fields will be taken from the `restore_channel` provided with this request. Field names are relative to the root of the resource (e.g., `description`, `destination_project_id`, etc.) If no `update_mask` is provided, all fields in `restore_channel` will be written to the target RestoreChannel resource. Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and are not used to update the target RestoreChannel.- Throws:
ApiException- if the remote call fails
-
updateRestoreChannelAsync
public final OperationFuture<RestoreChannel,OperationMetadata> updateRestoreChannelAsync(UpdateRestoreChannelRequest request) Update a RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { UpdateRestoreChannelRequest request = UpdateRestoreChannelRequest.newBuilder() .setRestoreChannel(RestoreChannel.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); RestoreChannel response = backupForGKEClient.updateRestoreChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateRestoreChannelOperationCallable
public final OperationCallable<UpdateRestoreChannelRequest,RestoreChannel, updateRestoreChannelOperationCallable()OperationMetadata> Update a RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { UpdateRestoreChannelRequest request = UpdateRestoreChannelRequest.newBuilder() .setRestoreChannel(RestoreChannel.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); OperationFuture<RestoreChannel, OperationMetadata> future = backupForGKEClient.updateRestoreChannelOperationCallable().futureCall(request); // Do something. RestoreChannel response = future.get(); } -
updateRestoreChannelCallable
Update a RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { UpdateRestoreChannelRequest request = UpdateRestoreChannelRequest.newBuilder() .setRestoreChannel(RestoreChannel.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Operation> future = backupForGKEClient.updateRestoreChannelCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteRestoreChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRestoreChannelAsync(RestoreChannelName name) Deletes an existing RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { RestoreChannelName name = RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]"); backupForGKEClient.deleteRestoreChannelAsync(name).get(); }- Parameters:
name- Required. Fully qualified RestoreChannel name. Format: `projects/*/locations/*/restoreChannels/*`- Throws:
ApiException- if the remote call fails
-
deleteRestoreChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRestoreChannelAsync(String name) Deletes an existing RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 = RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString(); backupForGKEClient.deleteRestoreChannelAsync(name).get(); }- Parameters:
name- Required. Fully qualified RestoreChannel name. Format: `projects/*/locations/*/restoreChannels/*`- Throws:
ApiException- if the remote call fails
-
deleteRestoreChannelAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteRestoreChannelAsync(DeleteRestoreChannelRequest request) Deletes an existing RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { DeleteRestoreChannelRequest request = DeleteRestoreChannelRequest.newBuilder() .setName( RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString()) .setEtag("etag3123477") .build(); backupForGKEClient.deleteRestoreChannelAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteRestoreChannelOperationCallable
public final OperationCallable<DeleteRestoreChannelRequest,com.google.protobuf.Empty, deleteRestoreChannelOperationCallable()OperationMetadata> Deletes an existing RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { DeleteRestoreChannelRequest request = DeleteRestoreChannelRequest.newBuilder() .setName( RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString()) .setEtag("etag3123477") .build(); OperationFuture<Empty, OperationMetadata> future = backupForGKEClient.deleteRestoreChannelOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteRestoreChannelCallable
Deletes an existing RestoreChannel.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { DeleteRestoreChannelRequest request = DeleteRestoreChannelRequest.newBuilder() .setName( RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString()) .setEtag("etag3123477") .build(); ApiFuture<Operation> future = backupForGKEClient.deleteRestoreChannelCallable().futureCall(request); // Do something. future.get(); } -
listRestorePlanBindings
public final BackupForGKEClient.ListRestorePlanBindingsPagedResponse listRestorePlanBindings(RestoreChannelName parent) Lists RestorePlanBindings 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()) { RestoreChannelName parent = RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]"); for (RestorePlanBinding element : backupForGKEClient.listRestorePlanBindings(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The RestoreChannel that contains the ListRestorePlanBindings to list. Format: `projects/*/locations/*/restoreChannels/*`- Throws:
ApiException- if the remote call fails
-
listRestorePlanBindings
public final BackupForGKEClient.ListRestorePlanBindingsPagedResponse listRestorePlanBindings(String parent) Lists RestorePlanBindings 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 = RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString(); for (RestorePlanBinding element : backupForGKEClient.listRestorePlanBindings(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The RestoreChannel that contains the ListRestorePlanBindings to list. Format: `projects/*/locations/*/restoreChannels/*`- Throws:
ApiException- if the remote call fails
-
listRestorePlanBindings
public final BackupForGKEClient.ListRestorePlanBindingsPagedResponse listRestorePlanBindings(ListRestorePlanBindingsRequest request) Lists RestorePlanBindings 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()) { ListRestorePlanBindingsRequest request = ListRestorePlanBindingsRequest.newBuilder() .setParent( RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (RestorePlanBinding element : backupForGKEClient.listRestorePlanBindings(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listRestorePlanBindingsPagedCallable
public final UnaryCallable<ListRestorePlanBindingsRequest,BackupForGKEClient.ListRestorePlanBindingsPagedResponse> listRestorePlanBindingsPagedCallable()Lists RestorePlanBindings 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()) { ListRestorePlanBindingsRequest request = ListRestorePlanBindingsRequest.newBuilder() .setParent( RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<RestorePlanBinding> future = backupForGKEClient.listRestorePlanBindingsPagedCallable().futureCall(request); // Do something. for (RestorePlanBinding element : future.get().iterateAll()) { // doThingsWith(element); } } -
listRestorePlanBindingsCallable
public final UnaryCallable<ListRestorePlanBindingsRequest,ListRestorePlanBindingsResponse> listRestorePlanBindingsCallable()Lists RestorePlanBindings 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()) { ListRestorePlanBindingsRequest request = ListRestorePlanBindingsRequest.newBuilder() .setParent( RestoreChannelName.of("[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListRestorePlanBindingsResponse response = backupForGKEClient.listRestorePlanBindingsCallable().call(request); for (RestorePlanBinding element : response.getRestorePlanBindingsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getRestorePlanBinding
Retrieve the details of a single RestorePlanBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { RestorePlanBindingName name = RestorePlanBindingName.of( "[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]", "[RESTORE_PLAN_BINDING]"); RestorePlanBinding response = backupForGKEClient.getRestorePlanBinding(name); }- Parameters:
name- Required. Fully qualified RestorePlanBinding name. Format: `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*`- Throws:
ApiException- if the remote call fails
-
getRestorePlanBinding
Retrieve the details of a single RestorePlanBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 = RestorePlanBindingName.of( "[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]", "[RESTORE_PLAN_BINDING]") .toString(); RestorePlanBinding response = backupForGKEClient.getRestorePlanBinding(name); }- Parameters:
name- Required. Fully qualified RestorePlanBinding name. Format: `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*`- Throws:
ApiException- if the remote call fails
-
getRestorePlanBinding
Retrieve the details of a single RestorePlanBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetRestorePlanBindingRequest request = GetRestorePlanBindingRequest.newBuilder() .setName( RestorePlanBindingName.of( "[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]", "[RESTORE_PLAN_BINDING]") .toString()) .build(); RestorePlanBinding response = backupForGKEClient.getRestorePlanBinding(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getRestorePlanBindingCallable
public final UnaryCallable<GetRestorePlanBindingRequest,RestorePlanBinding> getRestorePlanBindingCallable()Retrieve the details of a single RestorePlanBinding.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetRestorePlanBindingRequest request = GetRestorePlanBindingRequest.newBuilder() .setName( RestorePlanBindingName.of( "[PROJECT]", "[LOCATION]", "[RESTORE_CHANNEL]", "[RESTORE_PLAN_BINDING]") .toString()) .build(); ApiFuture<RestorePlanBinding> future = backupForGKEClient.getRestorePlanBindingCallable().futureCall(request); // Do something. RestorePlanBinding response = future.get(); } -
createRestoreAsync
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(); }- Parameters:
parent- Required. The RestorePlan within which to create the Restore. Format: `projects/*/locations/*/restorePlans/*`restore- Required. The restore resource to create.restoreId- 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.
- Throws:
ApiException- if the remote call fails
-
createRestoreAsync
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(); }- Parameters:
parent- Required. The RestorePlan within which to create the Restore. Format: `projects/*/locations/*/restorePlans/*`restore- Required. The restore resource to create.restoreId- 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.
- Throws:
ApiException- if the remote call fails
-
createRestoreAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createRestoreOperationCallable
public final OperationCallable<CreateRestoreRequest,Restore, createRestoreOperationCallable()OperationMetadata> 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(); } -
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(); } -
listRestores
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); } }- Parameters:
parent- Required. The RestorePlan that contains the Restores to list. Format: `projects/*/locations/*/restorePlans/*`- Throws:
ApiException- if the remote call fails
-
listRestores
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); } }- Parameters:
parent- Required. The RestorePlan that contains the Restores to list. Format: `projects/*/locations/*/restorePlans/*`- Throws:
ApiException- if the remote call fails
-
listRestores
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getRestore
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); }- Parameters:
name- Required. Name of the restore resource. Format: `projects/*/locations/*/restorePlans/*/restores/*`- Throws:
ApiException- if the remote call fails
-
getRestore
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); }- Parameters:
name- Required. Name of the restore resource. Format: `projects/*/locations/*/restorePlans/*/restores/*`- Throws:
ApiException- if the remote call fails
-
getRestore
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateRestoreAsync
public final OperationFuture<Restore,OperationMetadata> updateRestoreAsync(Restore restore, com.google.protobuf.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(); }- Parameters:
restore- Required. A new version of the Restore resource that contains updated fields. This may be sparsely populated if an `update_mask` is provided.updateMask- Optional. 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 `restore` provided with this request. Field names are relative to the root of the resource. If no `update_mask` is provided, all fields in `restore` will be written to the target Restore resource. Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored and are not used to update the target Restore.- Throws:
ApiException- if the remote call fails
-
updateRestoreAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateRestoreOperationCallable
public final OperationCallable<UpdateRestoreRequest,Restore, updateRestoreOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteRestoreAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. Full name of the Restore Format: `projects/*/locations/*/restorePlans/*/restores/*`- Throws:
ApiException- if the remote call fails
-
deleteRestoreAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. Full name of the Restore Format: `projects/*/locations/*/restorePlans/*/restores/*`- Throws:
ApiException- if the remote call fails
-
deleteRestoreAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteRestoreOperationCallable
public final OperationCallable<DeleteRestoreRequest,com.google.protobuf.Empty, deleteRestoreOperationCallable()OperationMetadata> 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(); } -
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(); } -
listVolumeRestores
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); } }- Parameters:
parent- Required. The Restore that contains the VolumeRestores to list. Format: `projects/*/locations/*/restorePlans/*/restores/*`- Throws:
ApiException- if the remote call fails
-
listVolumeRestores
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); } }- Parameters:
parent- Required. The Restore that contains the VolumeRestores to list. Format: `projects/*/locations/*/restorePlans/*/restores/*`- Throws:
ApiException- if the remote call fails
-
listVolumeRestores
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getVolumeRestore
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); }- Parameters:
name- Required. Full name of the VolumeRestore resource. Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`- Throws:
ApiException- if the remote call fails
-
getVolumeRestore
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); }- Parameters:
name- Required. Full name of the VolumeRestore resource. Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`- Throws:
ApiException- if the remote call fails
-
getVolumeRestore
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
getBackupIndexDownloadUrl
Retrieve the link to the backupIndex.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 backup = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]"); GetBackupIndexDownloadUrlResponse response = backupForGKEClient.getBackupIndexDownloadUrl(backup); }- Parameters:
backup- Required. Full name of Backup resource. Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}- Throws:
ApiException- if the remote call fails
-
getBackupIndexDownloadUrl
Retrieve the link to the backupIndex.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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 backup = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString(); GetBackupIndexDownloadUrlResponse response = backupForGKEClient.getBackupIndexDownloadUrl(backup); }- Parameters:
backup- Required. Full name of Backup resource. Format: projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}- Throws:
ApiException- if the remote call fails
-
getBackupIndexDownloadUrl
public final GetBackupIndexDownloadUrlResponse getBackupIndexDownloadUrl(GetBackupIndexDownloadUrlRequest request) Retrieve the link to the backupIndex.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetBackupIndexDownloadUrlRequest request = GetBackupIndexDownloadUrlRequest.newBuilder() .setBackup( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString()) .build(); GetBackupIndexDownloadUrlResponse response = backupForGKEClient.getBackupIndexDownloadUrl(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getBackupIndexDownloadUrlCallable
public final UnaryCallable<GetBackupIndexDownloadUrlRequest,GetBackupIndexDownloadUrlResponse> getBackupIndexDownloadUrlCallable()Retrieve the link to the backupIndex.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { GetBackupIndexDownloadUrlRequest request = GetBackupIndexDownloadUrlRequest.newBuilder() .setBackup( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString()) .build(); ApiFuture<GetBackupIndexDownloadUrlResponse> future = backupForGKEClient.getBackupIndexDownloadUrlCallable().futureCall(request); // Do something. GetBackupIndexDownloadUrlResponse response = future.get(); } -
listLocations
public final BackupForGKEClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : backupForGKEClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,BackupForGKEClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = backupForGKEClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = backupForGKEClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = backupForGKEClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = backupForGKEClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
setIamPolicy
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); Policy response = backupForGKEClient.setIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the access control policy on the specified resource. Replacesany existing policy.Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder() .setResource( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString()) .setPolicy(Policy.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Policy> future = backupForGKEClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
getIamPolicy
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); Policy response = backupForGKEClient.getIamPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder() .setResource( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString()) .setOptions(GetPolicyOptions.newBuilder().build()) .build(); ApiFuture<Policy> future = backupForGKEClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying 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()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); TestIamPermissionsResponse response = backupForGKEClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (BackupForGKEClient backupForGKEClient = BackupForGKEClient.create()) { TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder() .setResource( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_PLAN]", "[BACKUP]").toString()) .addAllPermissions(new ArrayList<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = backupForGKEClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-