@Generated(value="by gapic-generator-java") public class CloudFilestoreManagerClient extends Object implements com.google.api.gax.core.BackgroundResource
Filestore Manager v1.
The `file.googleapis.com` service implements the Filestore API and defines the following resource model for managing instances:
Note that location_id must be a Google Cloud `zone` for instances, but a Google Cloud `region` for backups; for example:
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 (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = cloudFilestoreManagerClient.getInstance(name);
}
Note: close() needs to be called on the CloudFilestoreManagerClient 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 |
|---|---|---|
ListInstances |
Lists all instances in a project for either a specified location or for all locations. |
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.
|
GetInstance |
Gets the details of a specific instance. |
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.
|
CreateInstance |
Creates an instance. When creating from a backup, the capacity of the new instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier). |
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.
|
UpdateInstance |
Updates the settings of a specific instance. |
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.
|
RestoreInstance |
Restores an existing instance's file share from a backup. The capacity of the instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier). |
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.
|
RevertInstance |
Revert an existing instance's file system to a specified snapshot. |
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.
|
DeleteInstance |
Deletes an instance. |
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.
|
ListSnapshots |
Lists all snapshots in a project for either a specified location or for all locations. |
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.
|
GetSnapshot |
Gets the details of a specific snapshot. |
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.
|
CreateSnapshot |
Creates a snapshot. |
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.
|
DeleteSnapshot |
Deletes a snapshot. |
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.
|
UpdateSnapshot |
Updates the settings of a specific snapshot. |
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 all backups in a project for either a specified location or for all locations. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetBackup |
Gets the details of a specific 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.
|
CreateBackup |
Creates 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 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.
|
UpdateBackup |
Updates the settings of a specific 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.
|
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 CloudFilestoreManagerSettings 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
CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
CloudFilestoreManagerSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
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
CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
CloudFilestoreManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
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
CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
CloudFilestoreManagerSettings.newHttpJsonBuilder().build();
CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
CloudFilestoreManagerClient.ListBackupsFixedSizeCollection |
static class |
CloudFilestoreManagerClient.ListBackupsPage |
static class |
CloudFilestoreManagerClient.ListBackupsPagedResponse |
static class |
CloudFilestoreManagerClient.ListInstancesFixedSizeCollection |
static class |
CloudFilestoreManagerClient.ListInstancesPage |
static class |
CloudFilestoreManagerClient.ListInstancesPagedResponse |
static class |
CloudFilestoreManagerClient.ListSnapshotsFixedSizeCollection |
static class |
CloudFilestoreManagerClient.ListSnapshotsPage |
static class |
CloudFilestoreManagerClient.ListSnapshotsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
CloudFilestoreManagerClient(CloudFilestoreManagerSettings settings)
Constructs an instance of CloudFilestoreManagerClient, using the given settings.
|
protected |
CloudFilestoreManagerClient(CloudFilestoreManagerStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static CloudFilestoreManagerClient |
create()
Constructs an instance of CloudFilestoreManagerClient with default settings.
|
static CloudFilestoreManagerClient |
create(CloudFilestoreManagerSettings settings)
Constructs an instance of CloudFilestoreManagerClient, using the given settings.
|
static CloudFilestoreManagerClient |
create(CloudFilestoreManagerStub stub)
Constructs an instance of CloudFilestoreManagerClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> |
createBackupAsync(CreateBackupRequest request)
Creates a backup.
|
com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> |
createBackupAsync(LocationName parent,
Backup backup,
String backupId)
Creates a backup.
|
com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> |
createBackupAsync(String parent,
Backup backup,
String backupId)
Creates a backup.
|
com.google.api.gax.rpc.UnaryCallable<CreateBackupRequest,com.google.longrunning.Operation> |
createBackupCallable()
Creates a backup.
|
com.google.api.gax.rpc.OperationCallable<CreateBackupRequest,Backup,OperationMetadata> |
createBackupOperationCallable()
Creates a backup.
|
com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> |
createInstanceAsync(CreateInstanceRequest request)
Creates an instance.
|
com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> |
createInstanceAsync(LocationName parent,
Instance instance,
String instanceId)
Creates an instance.
|
com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> |
createInstanceAsync(String parent,
Instance instance,
String instanceId)
Creates an instance.
|
com.google.api.gax.rpc.UnaryCallable<CreateInstanceRequest,com.google.longrunning.Operation> |
createInstanceCallable()
Creates an instance.
|
com.google.api.gax.rpc.OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> |
createInstanceOperationCallable()
Creates an instance.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> |
createSnapshotAsync(CreateSnapshotRequest request)
Creates a snapshot.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> |
createSnapshotAsync(InstanceName parent,
Snapshot snapshot,
String snapshotId)
Creates a snapshot.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> |
createSnapshotAsync(String parent,
Snapshot snapshot,
String snapshotId)
Creates a snapshot.
|
com.google.api.gax.rpc.UnaryCallable<CreateSnapshotRequest,com.google.longrunning.Operation> |
createSnapshotCallable()
Creates a snapshot.
|
com.google.api.gax.rpc.OperationCallable<CreateSnapshotRequest,Snapshot,OperationMetadata> |
createSnapshotOperationCallable()
Creates a snapshot.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteBackupAsync(BackupName name)
Deletes a backup.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteBackupAsync(DeleteBackupRequest request)
Deletes a backup.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteBackupAsync(String name)
Deletes a backup.
|
com.google.api.gax.rpc.UnaryCallable<DeleteBackupRequest,com.google.longrunning.Operation> |
deleteBackupCallable()
Deletes a backup.
|
com.google.api.gax.rpc.OperationCallable<DeleteBackupRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteBackupOperationCallable()
Deletes a backup.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteInstanceAsync(DeleteInstanceRequest request)
Deletes an instance.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteInstanceAsync(InstanceName name)
Deletes an instance.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteInstanceAsync(String name)
Deletes an instance.
|
com.google.api.gax.rpc.UnaryCallable<DeleteInstanceRequest,com.google.longrunning.Operation> |
deleteInstanceCallable()
Deletes an instance.
|
com.google.api.gax.rpc.OperationCallable<DeleteInstanceRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteInstanceOperationCallable()
Deletes an instance.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSnapshotAsync(DeleteSnapshotRequest request)
Deletes a snapshot.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSnapshotAsync(SnapshotName name)
Deletes a snapshot.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteSnapshotAsync(String name)
Deletes a snapshot.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSnapshotRequest,com.google.longrunning.Operation> |
deleteSnapshotCallable()
Deletes a snapshot.
|
com.google.api.gax.rpc.OperationCallable<DeleteSnapshotRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteSnapshotOperationCallable()
Deletes a snapshot.
|
Backup |
getBackup(BackupName name)
Gets the details of a specific backup.
|
Backup |
getBackup(GetBackupRequest request)
Gets the details of a specific backup.
|
Backup |
getBackup(String name)
Gets the details of a specific backup.
|
com.google.api.gax.rpc.UnaryCallable<GetBackupRequest,Backup> |
getBackupCallable()
Gets the details of a specific backup.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
Instance |
getInstance(GetInstanceRequest request)
Gets the details of a specific instance.
|
Instance |
getInstance(InstanceName name)
Gets the details of a specific instance.
|
Instance |
getInstance(String name)
Gets the details of a specific instance.
|
com.google.api.gax.rpc.UnaryCallable<GetInstanceRequest,Instance> |
getInstanceCallable()
Gets the details of a specific instance.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
CloudFilestoreManagerSettings |
getSettings() |
Snapshot |
getSnapshot(GetSnapshotRequest request)
Gets the details of a specific snapshot.
|
Snapshot |
getSnapshot(SnapshotName name)
Gets the details of a specific snapshot.
|
Snapshot |
getSnapshot(String name)
Gets the details of a specific snapshot.
|
com.google.api.gax.rpc.UnaryCallable<GetSnapshotRequest,Snapshot> |
getSnapshotCallable()
Gets the details of a specific snapshot.
|
CloudFilestoreManagerStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
CloudFilestoreManagerClient.ListBackupsPagedResponse |
listBackups(ListBackupsRequest request)
Lists all backups in a project for either a specified location or for all locations.
|
CloudFilestoreManagerClient.ListBackupsPagedResponse |
listBackups(LocationName parent)
Lists all backups in a project for either a specified location or for all locations.
|
CloudFilestoreManagerClient.ListBackupsPagedResponse |
listBackups(String parent)
Lists all backups in a project for either a specified location or for all locations.
|
com.google.api.gax.rpc.UnaryCallable<ListBackupsRequest,ListBackupsResponse> |
listBackupsCallable()
Lists all backups in a project for either a specified location or for all locations.
|
com.google.api.gax.rpc.UnaryCallable<ListBackupsRequest,CloudFilestoreManagerClient.ListBackupsPagedResponse> |
listBackupsPagedCallable()
Lists all backups in a project for either a specified location or for all locations.
|
CloudFilestoreManagerClient.ListInstancesPagedResponse |
listInstances(ListInstancesRequest request)
Lists all instances in a project for either a specified location or for all locations.
|
CloudFilestoreManagerClient.ListInstancesPagedResponse |
listInstances(LocationName parent)
Lists all instances in a project for either a specified location or for all locations.
|
CloudFilestoreManagerClient.ListInstancesPagedResponse |
listInstances(String parent)
Lists all instances in a project for either a specified location or for all locations.
|
com.google.api.gax.rpc.UnaryCallable<ListInstancesRequest,ListInstancesResponse> |
listInstancesCallable()
Lists all instances in a project for either a specified location or for all locations.
|
com.google.api.gax.rpc.UnaryCallable<ListInstancesRequest,CloudFilestoreManagerClient.ListInstancesPagedResponse> |
listInstancesPagedCallable()
Lists all instances in a project for either a specified location or for all locations.
|
CloudFilestoreManagerClient.ListSnapshotsPagedResponse |
listSnapshots(InstanceName parent)
Lists all snapshots in a project for either a specified location or for all locations.
|
CloudFilestoreManagerClient.ListSnapshotsPagedResponse |
listSnapshots(ListSnapshotsRequest request)
Lists all snapshots in a project for either a specified location or for all locations.
|
CloudFilestoreManagerClient.ListSnapshotsPagedResponse |
listSnapshots(String parent)
Lists all snapshots in a project for either a specified location or for all locations.
|
com.google.api.gax.rpc.UnaryCallable<ListSnapshotsRequest,ListSnapshotsResponse> |
listSnapshotsCallable()
Lists all snapshots in a project for either a specified location or for all locations.
|
com.google.api.gax.rpc.UnaryCallable<ListSnapshotsRequest,CloudFilestoreManagerClient.ListSnapshotsPagedResponse> |
listSnapshotsPagedCallable()
Lists all snapshots in a project for either a specified location or for all locations.
|
com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> |
restoreInstanceAsync(RestoreInstanceRequest request)
Restores an existing instance's file share from a backup.
|
com.google.api.gax.rpc.UnaryCallable<RestoreInstanceRequest,com.google.longrunning.Operation> |
restoreInstanceCallable()
Restores an existing instance's file share from a backup.
|
com.google.api.gax.rpc.OperationCallable<RestoreInstanceRequest,Instance,OperationMetadata> |
restoreInstanceOperationCallable()
Restores an existing instance's file share from a backup.
|
com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> |
revertInstanceAsync(RevertInstanceRequest request)
Revert an existing instance's file system to a specified snapshot.
|
com.google.api.gax.rpc.UnaryCallable<RevertInstanceRequest,com.google.longrunning.Operation> |
revertInstanceCallable()
Revert an existing instance's file system to a specified snapshot.
|
com.google.api.gax.rpc.OperationCallable<RevertInstanceRequest,Instance,OperationMetadata> |
revertInstanceOperationCallable()
Revert an existing instance's file system to a specified snapshot.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> |
updateBackupAsync(Backup backup,
com.google.protobuf.FieldMask updateMask)
Updates the settings of a specific backup.
|
com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> |
updateBackupAsync(UpdateBackupRequest request)
Updates the settings of a specific backup.
|
com.google.api.gax.rpc.UnaryCallable<UpdateBackupRequest,com.google.longrunning.Operation> |
updateBackupCallable()
Updates the settings of a specific backup.
|
com.google.api.gax.rpc.OperationCallable<UpdateBackupRequest,Backup,OperationMetadata> |
updateBackupOperationCallable()
Updates the settings of a specific backup.
|
com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> |
updateInstanceAsync(Instance instance,
com.google.protobuf.FieldMask updateMask)
Updates the settings of a specific instance.
|
com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> |
updateInstanceAsync(UpdateInstanceRequest request)
Updates the settings of a specific instance.
|
com.google.api.gax.rpc.UnaryCallable<UpdateInstanceRequest,com.google.longrunning.Operation> |
updateInstanceCallable()
Updates the settings of a specific instance.
|
com.google.api.gax.rpc.OperationCallable<UpdateInstanceRequest,Instance,OperationMetadata> |
updateInstanceOperationCallable()
Updates the settings of a specific instance.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> |
updateSnapshotAsync(Snapshot snapshot,
com.google.protobuf.FieldMask updateMask)
Updates the settings of a specific snapshot.
|
com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> |
updateSnapshotAsync(UpdateSnapshotRequest request)
Updates the settings of a specific snapshot.
|
com.google.api.gax.rpc.UnaryCallable<UpdateSnapshotRequest,com.google.longrunning.Operation> |
updateSnapshotCallable()
Updates the settings of a specific snapshot.
|
com.google.api.gax.rpc.OperationCallable<UpdateSnapshotRequest,Snapshot,OperationMetadata> |
updateSnapshotOperationCallable()
Updates the settings of a specific snapshot.
|
protected CloudFilestoreManagerClient(CloudFilestoreManagerSettings settings) throws IOException
IOExceptionprotected CloudFilestoreManagerClient(CloudFilestoreManagerStub stub)
public static final CloudFilestoreManagerClient create() throws IOException
IOExceptionpublic static final CloudFilestoreManagerClient create(CloudFilestoreManagerSettings settings) throws IOException
IOExceptionpublic static final CloudFilestoreManagerClient create(CloudFilestoreManagerStub stub)
public final CloudFilestoreManagerSettings getSettings()
public CloudFilestoreManagerStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final CloudFilestoreManagerClient.ListInstancesPagedResponse listInstances(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The project and location for which to retrieve instance information, in
the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map
to Google Cloud zones, for example
com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudFilestoreManagerClient.ListInstancesPagedResponse listInstances(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Instance element : cloudFilestoreManagerClient.listInstances(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The project and location for which to retrieve instance information, in
the format `projects/{project_id}/locations/{location}`. In Cloud Filestore, locations map
to Google Cloud zones, for example
com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudFilestoreManagerClient.ListInstancesPagedResponse listInstances(ListInstancesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (Instance element : cloudFilestoreManagerClient.listInstances(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListInstancesRequest,CloudFilestoreManagerClient.ListInstancesPagedResponse> listInstancesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<Instance> future =
cloudFilestoreManagerClient.listInstancesPagedCallable().futureCall(request);
// Do something.
for (Instance element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListInstancesRequest,ListInstancesResponse> listInstancesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListInstancesRequest request =
ListInstancesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListInstancesResponse response =
cloudFilestoreManagerClient.listInstancesCallable().call(request);
for (Instance element : response.getInstancesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Instance getInstance(InstanceName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = cloudFilestoreManagerClient.getInstance(name);
}
name - Required. The instance resource name, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Instance getInstance(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
Instance response = cloudFilestoreManagerClient.getInstance(name);
}
name - Required. The instance resource name, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Instance getInstance(GetInstanceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
GetInstanceRequest request =
GetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
Instance response = cloudFilestoreManagerClient.getInstance(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetInstanceRequest,Instance> getInstanceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
GetInstanceRequest request =
GetInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.build();
ApiFuture<Instance> future =
cloudFilestoreManagerClient.getInstanceCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> createInstanceAsync(LocationName parent, Instance instance, String instanceId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Instance instance = Instance.newBuilder().build();
String instanceId = "instanceId902024336";
Instance response =
cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get();
}
parent - Required. The instance's project and location, in the format
`projects/{project_id}/locations/{location}`. In Filestore, locations map to Google Cloud
zones, for example **us-west1-b**.instance - Required. An [instance resource][google.cloud.filestore.v1.Instance]instanceId - Required. The name of the instance to create. The name must be unique for the
specified project and location.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> createInstanceAsync(String parent, Instance instance, String instanceId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Instance instance = Instance.newBuilder().build();
String instanceId = "instanceId902024336";
Instance response =
cloudFilestoreManagerClient.createInstanceAsync(parent, instance, instanceId).get();
}
parent - Required. The instance's project and location, in the format
`projects/{project_id}/locations/{location}`. In Filestore, locations map to Google Cloud
zones, for example **us-west1-b**.instance - Required. An [instance resource][google.cloud.filestore.v1.Instance]instanceId - Required. The name of the instance to create. The name must be unique for the
specified project and location.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> createInstanceAsync(CreateInstanceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateInstanceRequest request =
CreateInstanceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setInstanceId("instanceId902024336")
.setInstance(Instance.newBuilder().build())
.build();
Instance response = cloudFilestoreManagerClient.createInstanceAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateInstanceRequest,Instance,OperationMetadata> createInstanceOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateInstanceRequest request =
CreateInstanceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setInstanceId("instanceId902024336")
.setInstance(Instance.newBuilder().build())
.build();
OperationFuture<Instance, OperationMetadata> future =
cloudFilestoreManagerClient.createInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateInstanceRequest,com.google.longrunning.Operation> createInstanceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateInstanceRequest request =
CreateInstanceRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setInstanceId("instanceId902024336")
.setInstance(Instance.newBuilder().build())
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.createInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> updateInstanceAsync(Instance instance, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
Instance instance = Instance.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Instance response =
cloudFilestoreManagerClient.updateInstanceAsync(instance, updateMask).get();
}
instance - Only fields specified in update_mask are updated.updateMask - Mask of fields to update. At least one path must be supplied in this field.
The elements of the repeated paths field may only include these fields:
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> updateInstanceAsync(UpdateInstanceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateInstanceRequest request =
UpdateInstanceRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setInstance(Instance.newBuilder().build())
.build();
Instance response = cloudFilestoreManagerClient.updateInstanceAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateInstanceRequest,Instance,OperationMetadata> updateInstanceOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateInstanceRequest request =
UpdateInstanceRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setInstance(Instance.newBuilder().build())
.build();
OperationFuture<Instance, OperationMetadata> future =
cloudFilestoreManagerClient.updateInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateInstanceRequest,com.google.longrunning.Operation> updateInstanceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateInstanceRequest request =
UpdateInstanceRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setInstance(Instance.newBuilder().build())
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.updateInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> restoreInstanceAsync(RestoreInstanceRequest request)
The capacity of the instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
RestoreInstanceRequest request =
RestoreInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setFileShare("fileShare-1327728701")
.build();
Instance response = cloudFilestoreManagerClient.restoreInstanceAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<RestoreInstanceRequest,Instance,OperationMetadata> restoreInstanceOperationCallable()
The capacity of the instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
RestoreInstanceRequest request =
RestoreInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setFileShare("fileShare-1327728701")
.build();
OperationFuture<Instance, OperationMetadata> future =
cloudFilestoreManagerClient.restoreInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<RestoreInstanceRequest,com.google.longrunning.Operation> restoreInstanceCallable()
The capacity of the instance needs to be equal to or larger than the capacity of the backup (and also equal to or larger than the minimum capacity of the tier).
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
RestoreInstanceRequest request =
RestoreInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setFileShare("fileShare-1327728701")
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.restoreInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Instance,OperationMetadata> revertInstanceAsync(RevertInstanceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
RevertInstanceRequest request =
RevertInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setTargetSnapshotId("targetSnapshotId-2099459472")
.build();
Instance response = cloudFilestoreManagerClient.revertInstanceAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<RevertInstanceRequest,Instance,OperationMetadata> revertInstanceOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
RevertInstanceRequest request =
RevertInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setTargetSnapshotId("targetSnapshotId-2099459472")
.build();
OperationFuture<Instance, OperationMetadata> future =
cloudFilestoreManagerClient.revertInstanceOperationCallable().futureCall(request);
// Do something.
Instance response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<RevertInstanceRequest,com.google.longrunning.Operation> revertInstanceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
RevertInstanceRequest request =
RevertInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setTargetSnapshotId("targetSnapshotId-2099459472")
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.revertInstanceCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInstanceAsync(InstanceName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
cloudFilestoreManagerClient.deleteInstanceAsync(name).get();
}
name - Required. The instance resource name, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInstanceAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
cloudFilestoreManagerClient.deleteInstanceAsync(name).get();
}
name - Required. The instance resource name, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteInstanceAsync(DeleteInstanceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteInstanceRequest request =
DeleteInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setForce(true)
.build();
cloudFilestoreManagerClient.deleteInstanceAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteInstanceRequest,com.google.protobuf.Empty,OperationMetadata> deleteInstanceOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteInstanceRequest request =
DeleteInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setForce(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
cloudFilestoreManagerClient.deleteInstanceOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteInstanceRequest,com.google.longrunning.Operation> deleteInstanceCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteInstanceRequest request =
DeleteInstanceRequest.newBuilder()
.setName(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setForce(true)
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.deleteInstanceCallable().futureCall(request);
// Do something.
future.get();
}
public final CloudFilestoreManagerClient.ListSnapshotsPagedResponse listSnapshots(InstanceName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
for (Snapshot element : cloudFilestoreManagerClient.listSnapshots(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The instance for which to retrieve snapshot information, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudFilestoreManagerClient.ListSnapshotsPagedResponse listSnapshots(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
for (Snapshot element : cloudFilestoreManagerClient.listSnapshots(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The instance for which to retrieve snapshot information, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudFilestoreManagerClient.ListSnapshotsPagedResponse listSnapshots(ListSnapshotsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListSnapshotsRequest request =
ListSnapshotsRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (Snapshot element : cloudFilestoreManagerClient.listSnapshots(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSnapshotsRequest,CloudFilestoreManagerClient.ListSnapshotsPagedResponse> listSnapshotsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListSnapshotsRequest request =
ListSnapshotsRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<Snapshot> future =
cloudFilestoreManagerClient.listSnapshotsPagedCallable().futureCall(request);
// Do something.
for (Snapshot element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSnapshotsRequest,ListSnapshotsResponse> listSnapshotsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListSnapshotsRequest request =
ListSnapshotsRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListSnapshotsResponse response =
cloudFilestoreManagerClient.listSnapshotsCallable().call(request);
for (Snapshot element : response.getSnapshotsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final Snapshot getSnapshot(SnapshotName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
SnapshotName name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]");
Snapshot response = cloudFilestoreManagerClient.getSnapshot(name);
}
name - Required. The snapshot resource name, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Snapshot getSnapshot(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String name =
SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString();
Snapshot response = cloudFilestoreManagerClient.getSnapshot(name);
}
name - Required. The snapshot resource name, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final Snapshot getSnapshot(GetSnapshotRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
GetSnapshotRequest request =
GetSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString())
.build();
Snapshot response = cloudFilestoreManagerClient.getSnapshot(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSnapshotRequest,Snapshot> getSnapshotCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
GetSnapshotRequest request =
GetSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString())
.build();
ApiFuture<Snapshot> future =
cloudFilestoreManagerClient.getSnapshotCallable().futureCall(request);
// Do something.
Snapshot response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> createSnapshotAsync(InstanceName parent, Snapshot snapshot, String snapshotId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Snapshot snapshot = Snapshot.newBuilder().build();
String snapshotId = "snapshotId-1113817601";
Snapshot response =
cloudFilestoreManagerClient.createSnapshotAsync(parent, snapshot, snapshotId).get();
}
parent - Required. The Filestore Instance to create the snapshots of, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`snapshot - Required. A snapshot resource.snapshotId - Required. The ID to use for the snapshot. The ID must be unique within the
specified instance.
This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> createSnapshotAsync(String parent, Snapshot snapshot, String snapshotId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
Snapshot snapshot = Snapshot.newBuilder().build();
String snapshotId = "snapshotId-1113817601";
Snapshot response =
cloudFilestoreManagerClient.createSnapshotAsync(parent, snapshot, snapshotId).get();
}
parent - Required. The Filestore Instance to create the snapshots of, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}`snapshot - Required. A snapshot resource.snapshotId - Required. The ID to use for the snapshot. The ID must be unique within the
specified instance.
This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> createSnapshotAsync(CreateSnapshotRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateSnapshotRequest request =
CreateSnapshotRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setSnapshotId("snapshotId-1113817601")
.setSnapshot(Snapshot.newBuilder().build())
.build();
Snapshot response = cloudFilestoreManagerClient.createSnapshotAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateSnapshotRequest,Snapshot,OperationMetadata> createSnapshotOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateSnapshotRequest request =
CreateSnapshotRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setSnapshotId("snapshotId-1113817601")
.setSnapshot(Snapshot.newBuilder().build())
.build();
OperationFuture<Snapshot, OperationMetadata> future =
cloudFilestoreManagerClient.createSnapshotOperationCallable().futureCall(request);
// Do something.
Snapshot response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateSnapshotRequest,com.google.longrunning.Operation> createSnapshotCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateSnapshotRequest request =
CreateSnapshotRequest.newBuilder()
.setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
.setSnapshotId("snapshotId-1113817601")
.setSnapshot(Snapshot.newBuilder().build())
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.createSnapshotCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSnapshotAsync(SnapshotName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
SnapshotName name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]");
cloudFilestoreManagerClient.deleteSnapshotAsync(name).get();
}
name - Required. The snapshot resource name, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSnapshotAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String name =
SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString();
cloudFilestoreManagerClient.deleteSnapshotAsync(name).get();
}
name - Required. The snapshot resource name, in the format
`projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSnapshotAsync(DeleteSnapshotRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteSnapshotRequest request =
DeleteSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString())
.build();
cloudFilestoreManagerClient.deleteSnapshotAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteSnapshotRequest,com.google.protobuf.Empty,OperationMetadata> deleteSnapshotOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteSnapshotRequest request =
DeleteSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
cloudFilestoreManagerClient.deleteSnapshotOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteSnapshotRequest,com.google.longrunning.Operation> deleteSnapshotCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteSnapshotRequest request =
DeleteSnapshotRequest.newBuilder()
.setName(
SnapshotName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[SNAPSHOT]").toString())
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.deleteSnapshotCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> updateSnapshotAsync(Snapshot snapshot, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
Snapshot snapshot = Snapshot.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Snapshot response =
cloudFilestoreManagerClient.updateSnapshotAsync(snapshot, updateMask).get();
}
snapshot - Required. A snapshot resource.updateMask - Required. Mask of fields to update. At least one path must be supplied in
this field.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Snapshot,OperationMetadata> updateSnapshotAsync(UpdateSnapshotRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateSnapshotRequest request =
UpdateSnapshotRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSnapshot(Snapshot.newBuilder().build())
.build();
Snapshot response = cloudFilestoreManagerClient.updateSnapshotAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateSnapshotRequest,Snapshot,OperationMetadata> updateSnapshotOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateSnapshotRequest request =
UpdateSnapshotRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSnapshot(Snapshot.newBuilder().build())
.build();
OperationFuture<Snapshot, OperationMetadata> future =
cloudFilestoreManagerClient.updateSnapshotOperationCallable().futureCall(request);
// Do something.
Snapshot response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateSnapshotRequest,com.google.longrunning.Operation> updateSnapshotCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateSnapshotRequest request =
UpdateSnapshotRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setSnapshot(Snapshot.newBuilder().build())
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.updateSnapshotCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final CloudFilestoreManagerClient.ListBackupsPagedResponse listBackups(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The project and location for which to retrieve backup information, in
the format `projects/{project_number}/locations/{location}`. In Filestore, backup locations
map to Google Cloud regions, for example **us-west1**. To retrieve backup
information for all locations, use "-" for the `{location}` value.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudFilestoreManagerClient.ListBackupsPagedResponse listBackups(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Backup element : cloudFilestoreManagerClient.listBackups(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The project and location for which to retrieve backup information, in
the format `projects/{project_number}/locations/{location}`. In Filestore, backup locations
map to Google Cloud regions, for example **us-west1**. To retrieve backup
information for all locations, use "-" for the `{location}` value.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CloudFilestoreManagerClient.ListBackupsPagedResponse listBackups(ListBackupsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
for (Backup element : cloudFilestoreManagerClient.listBackups(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListBackupsRequest,CloudFilestoreManagerClient.ListBackupsPagedResponse> listBackupsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
ApiFuture<Backup> future =
cloudFilestoreManagerClient.listBackupsPagedCallable().futureCall(request);
// Do something.
for (Backup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListBackupsRequest,ListBackupsResponse> listBackupsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
ListBackupsRequest request =
ListBackupsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setFilter("filter-1274492040")
.build();
while (true) {
ListBackupsResponse response =
cloudFilestoreManagerClient.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;
}
}
}
public final Backup getBackup(BackupName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
Backup response = cloudFilestoreManagerClient.getBackup(name);
}
name - Required. The backup resource name, in the format
`projects/{project_number}/locations/{location}/backups/{backup_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Backup getBackup(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
Backup response = cloudFilestoreManagerClient.getBackup(name);
}
name - Required. The backup resource name, in the format
`projects/{project_number}/locations/{location}/backups/{backup_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Backup getBackup(GetBackupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
GetBackupRequest request =
GetBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
.build();
Backup response = cloudFilestoreManagerClient.getBackup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetBackupRequest,Backup> getBackupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
GetBackupRequest request =
GetBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
.build();
ApiFuture<Backup> future =
cloudFilestoreManagerClient.getBackupCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> createBackupAsync(LocationName parent, Backup backup, String backupId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Backup backup = Backup.newBuilder().build();
String backupId = "backupId2121930365";
Backup response =
cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get();
}
parent - Required. The backup's project and location, in the format
`projects/{project_number}/locations/{location}`. In Filestore, backup locations map to
Google Cloud regions, for example **us-west1**.backup - Required. A [backup resource][google.cloud.filestore.v1.Backup]backupId - Required. The ID to use for the backup. The ID must be unique within the
specified project and location.
This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> createBackupAsync(String parent, Backup backup, String backupId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Backup backup = Backup.newBuilder().build();
String backupId = "backupId2121930365";
Backup response =
cloudFilestoreManagerClient.createBackupAsync(parent, backup, backupId).get();
}
parent - Required. The backup's project and location, in the format
`projects/{project_number}/locations/{location}`. In Filestore, backup locations map to
Google Cloud regions, for example **us-west1**.backup - Required. A [backup resource][google.cloud.filestore.v1.Backup]backupId - Required. The ID to use for the backup. The ID must be unique within the
specified project and location.
This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. Values that do not match this pattern will trigger an INVALID_ARGUMENT error.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> createBackupAsync(CreateBackupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackup(Backup.newBuilder().build())
.setBackupId("backupId2121930365")
.build();
Backup response = cloudFilestoreManagerClient.createBackupAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateBackupRequest,Backup,OperationMetadata> createBackupOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackup(Backup.newBuilder().build())
.setBackupId("backupId2121930365")
.build();
OperationFuture<Backup, OperationMetadata> future =
cloudFilestoreManagerClient.createBackupOperationCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateBackupRequest,com.google.longrunning.Operation> createBackupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
CreateBackupRequest request =
CreateBackupRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setBackup(Backup.newBuilder().build())
.setBackupId("backupId2121930365")
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.createBackupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(BackupName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]");
cloudFilestoreManagerClient.deleteBackupAsync(name).get();
}
name - Required. The backup resource name, in the format
`projects/{project_number}/locations/{location}/backups/{backup_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString();
cloudFilestoreManagerClient.deleteBackupAsync(name).get();
}
name - Required. The backup resource name, in the format
`projects/{project_number}/locations/{location}/backups/{backup_id}`com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(DeleteBackupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
.build();
cloudFilestoreManagerClient.deleteBackupAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteBackupRequest,com.google.protobuf.Empty,OperationMetadata> deleteBackupOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
cloudFilestoreManagerClient.deleteBackupOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteBackupRequest,com.google.longrunning.Operation> deleteBackupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
DeleteBackupRequest request =
DeleteBackupRequest.newBuilder()
.setName(BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP]").toString())
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.deleteBackupCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> updateBackupAsync(Backup backup, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
Backup backup = Backup.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Backup response = cloudFilestoreManagerClient.updateBackupAsync(backup, updateMask).get();
}
backup - Required. A [backup resource][google.cloud.filestore.v1.Backup]updateMask - Required. Mask of fields to update. At least one path must be supplied in
this field.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Backup,OperationMetadata> updateBackupAsync(UpdateBackupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder()
.setBackup(Backup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Backup response = cloudFilestoreManagerClient.updateBackupAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateBackupRequest,Backup,OperationMetadata> updateBackupOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder()
.setBackup(Backup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<Backup, OperationMetadata> future =
cloudFilestoreManagerClient.updateBackupOperationCallable().futureCall(request);
// Do something.
Backup response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateBackupRequest,com.google.longrunning.Operation> updateBackupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
CloudFilestoreManagerClient.create()) {
UpdateBackupRequest request =
UpdateBackupRequest.newBuilder()
.setBackup(Backup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
cloudFilestoreManagerClient.updateBackupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.