Class NetAppClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetAppClient netAppClient = NetAppClient.create()) {
StoragePoolName name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]");
StoragePool response = netAppClient.getStoragePool(name);
}
Note: close() needs to be called on the NetAppClient 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 |
|---|---|---|
ListStoragePools |
Returns descriptions of all storage pools owned by the caller. |
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.
|
CreateStoragePool |
Creates a new storage pool. |
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.
|
GetStoragePool |
Returns the description of the specified storage pool by poolId. |
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.
|
UpdateStoragePool |
Updates the storage pool properties with the full spec |
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.
|
DeleteStoragePool |
Warning! This operation will permanently delete the storage pool. |
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.
|
ValidateDirectoryService |
ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool. |
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.
|
SwitchActiveReplicaZone |
This operation will switch the active/replica zone for a regional storagePool. |
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.
|
ListVolumes |
Lists Volumes in a given project. |
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.
|
GetVolume |
Gets details of a single Volume. |
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.
|
CreateVolume |
Creates a new Volume in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `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.
|
UpdateVolume |
Updates the parameters of a single Volume. |
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.
|
DeleteVolume |
Deletes a single Volume. |
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.
|
RevertVolume |
Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created. |
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.
|
EstablishVolumePeering |
Establish volume peering. This is used to establish cluster and svm peerings between the GCNV and OnPrem clusters. |
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.
|
ListSnapshots |
Returns descriptions of all snapshots for a volume. |
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 |
Describe a snapshot for a volume. |
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 |
Create a new snapshot for a volume. |
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.
|
ListActiveDirectories |
Lists active directories. |
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.
|
GetActiveDirectory |
Describes a specified active directory. |
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.
|
CreateActiveDirectory |
CreateActiveDirectory Creates the active directory specified in the request. |
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.
|
UpdateActiveDirectory |
Update the parameters of an active directories. |
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.
|
DeleteActiveDirectory |
Delete the active directory specified in the request. |
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.
|
ListKmsConfigs |
Returns descriptions of all KMS configs owned by the caller. |
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.
|
CreateKmsConfig |
Creates a new KMS config. |
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.
|
GetKmsConfig |
Returns the description of the specified KMS config by kms_config_id. |
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.
|
UpdateKmsConfig |
Updates the Kms config properties with the full spec |
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.
|
EncryptVolumes |
Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region. |
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.
|
VerifyKmsConfig |
Verifies KMS config reachability. |
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.
|
DeleteKmsConfig |
Warning! This operation will permanently delete the Kms config. |
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.
|
ListReplications |
Returns descriptions of all replications for a volume. |
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.
|
GetReplication |
Describe a replication for a volume. |
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.
|
CreateReplication |
Create a new replication for a volume. |
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.
|
DeleteReplication |
Deletes a replication. |
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.
|
UpdateReplication |
Updates the settings of a specific replication. |
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.
|
StopReplication |
Stop Cross Region Replication. |
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.
|
ResumeReplication |
Resume Cross Region Replication. |
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.
|
ReverseReplicationDirection |
Reverses direction of replication. Source becomes destination and destination becomes source. |
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.
|
EstablishPeering |
Establish replication peering. |
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.
|
SyncReplication |
Syncs the replication. This will invoke one time volume data transfer from source to destination. |
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.
|
CreateBackupVault |
Creates new backup vault |
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.
|
GetBackupVault |
Returns the description of the specified backup vault |
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.
|
ListBackupVaults |
Returns list of all available backup vaults. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateBackupVault |
Updates the settings of a specific backup vault. |
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.
|
DeleteBackupVault |
Warning! This operation will permanently delete the backup vault. |
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.
|
CreateBackup |
Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation. |
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.
|
GetBackup |
Returns the description of the specified 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.
|
ListBackups |
Returns descriptions of all backups for a backupVault. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteBackup |
Warning! This operation will permanently delete the 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 |
Update backup with full spec. |
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.
|
CreateBackupPolicy |
Creates new backup policy |
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.
|
GetBackupPolicy |
Returns the description of the specified backup policy by backup_policy_id. |
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.
|
ListBackupPolicies |
Returns list of all available backup policies. |
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.
|
UpdateBackupPolicy |
Updates settings of a specific backup policy. |
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.
|
DeleteBackupPolicy |
Warning! This operation will permanently delete the backup policy. |
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.
|
ListQuotaRules |
Returns list of all quota rules in a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetQuotaRule |
Returns details of the specified quota rule. |
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.
|
CreateQuotaRule |
Creates a new quota rule. |
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.
|
UpdateQuotaRule |
Updates a quota rule. |
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.
|
DeleteQuotaRule |
Deletes a quota rule. |
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.
|
RestoreBackupFiles |
Restore files from a backup to a volume. |
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.
|
ListHostGroups |
Returns a list of host groups in a `location`. Use `-` as location to list host groups across 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.
|
GetHostGroup |
Returns details of the specified host group. |
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.
|
CreateHostGroup |
Creates a new host group. |
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.
|
UpdateHostGroup |
Updates an existing host group. |
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.
|
DeleteHostGroup |
Deletes a host group. |
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.
|
ExecuteOntapPost |
`ExecuteOntapPost` dispatches the ONTAP `POST` request to the `StoragePool` cluster. |
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.
|
ExecuteOntapGet |
`ExecuteOntapGet` dispatches the ONTAP `GET` request to the `StoragePool` cluster. |
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.
|
ExecuteOntapDelete |
`ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the `StoragePool` cluster. |
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.
|
ExecuteOntapPatch |
`ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the `StoragePool` cluster. |
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.
|
ListLocations |
Lists information about the supported locations for this service. This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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 NetAppSettings 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
NetAppSettings netAppSettings =
NetAppSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
NetAppClient netAppClient = NetAppClient.create(netAppSettings);
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
NetAppSettings netAppSettings = NetAppSettings.newBuilder().setEndpoint(myEndpoint).build();
NetAppClient netAppClient = NetAppClient.create(netAppSettings);
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
NetAppSettings netAppSettings = NetAppSettings.newHttpJsonBuilder().build();
NetAppClient netAppClient = NetAppClient.create(netAppSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNetAppClient(NetAppSettings settings) Constructs an instance of NetAppClient, using the given settings.protectedNetAppClient(NetAppStub stub) -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final NetAppClientcreate()Constructs an instance of NetAppClient with default settings.static final NetAppClientcreate(NetAppSettings settings) Constructs an instance of NetAppClient, using the given settings.static final NetAppClientcreate(NetAppStub stub) Constructs an instance of NetAppClient, using the given stub for making calls.CreateActiveDirectory Creates the active directory specified in the request.createActiveDirectoryAsync(LocationName parent, ActiveDirectory activeDirectory, String activeDirectoryId) CreateActiveDirectory Creates the active directory specified in the request.createActiveDirectoryAsync(String parent, ActiveDirectory activeDirectory, String activeDirectoryId) CreateActiveDirectory Creates the active directory specified in the request.CreateActiveDirectory Creates the active directory specified in the request.CreateActiveDirectory Creates the active directory specified in the request.createBackupAsync(BackupVaultName parent, Backup backup, String backupId) Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request.createBackupAsync(CreateBackupRequest request) Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request.createBackupAsync(String parent, Backup backup, String backupId) Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request.Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request.Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request.Creates new backup policycreateBackupPolicyAsync(LocationName parent, BackupPolicy backupPolicy, String backupPolicyId) Creates new backup policycreateBackupPolicyAsync(String parent, BackupPolicy backupPolicy, String backupPolicyId) Creates new backup policyCreates new backup policyCreates new backup policyCreates new backup vaultcreateBackupVaultAsync(LocationName parent, BackupVault backupVault, String backupVaultId) Creates new backup vaultcreateBackupVaultAsync(String parent, BackupVault backupVault, String backupVaultId) Creates new backup vaultCreates new backup vaultCreates new backup vaultCreates a new host group.createHostGroupAsync(LocationName parent, HostGroup hostGroup, String hostGroupId) Creates a new host group.createHostGroupAsync(String parent, HostGroup hostGroup, String hostGroupId) Creates a new host group.Creates a new host group.Creates a new host group.Creates a new KMS config.createKmsConfigAsync(LocationName parent, KmsConfig kmsConfig, String kmsConfigId) Creates a new KMS config.createKmsConfigAsync(String parent, KmsConfig kmsConfig, String kmsConfigId) Creates a new KMS config.Creates a new KMS config.Creates a new KMS config.Creates a new quota rule.createQuotaRuleAsync(VolumeName parent, QuotaRule quotaRule, String quotaRuleId) Creates a new quota rule.createQuotaRuleAsync(String parent, QuotaRule quotaRule, String quotaRuleId) Creates a new quota rule.Creates a new quota rule.Creates a new quota rule.Create a new replication for a volume.createReplicationAsync(VolumeName parent, Replication replication, String replicationId) Create a new replication for a volume.createReplicationAsync(String parent, Replication replication, String replicationId) Create a new replication for a volume.Create a new replication for a volume.Create a new replication for a volume.createSnapshotAsync(CreateSnapshotRequest request) Create a new snapshot for a volume.createSnapshotAsync(VolumeName parent, Snapshot snapshot, String snapshotId) Create a new snapshot for a volume.createSnapshotAsync(String parent, Snapshot snapshot, String snapshotId) Create a new snapshot for a volume.Create a new snapshot for a volume.Create a new snapshot for a volume.Creates a new storage pool.createStoragePoolAsync(LocationName parent, StoragePool storagePool, String storagePoolId) Creates a new storage pool.createStoragePoolAsync(String parent, StoragePool storagePool, String storagePoolId) Creates a new storage pool.Creates a new storage pool.Creates a new storage pool.createVolumeAsync(CreateVolumeRequest request) Creates a new Volume in a given project and location.createVolumeAsync(LocationName parent, Volume volume, String volumeId) Creates a new Volume in a given project and location.createVolumeAsync(String parent, Volume volume, String volumeId) Creates a new Volume in a given project and location.Creates a new Volume in a given project and location.Creates a new Volume in a given project and location.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Delete the active directory specified in the request.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Delete the active directory specified in the request.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Delete the active directory specified in the request.Delete the active directory specified in the request.final OperationCallable<DeleteActiveDirectoryRequest,com.google.protobuf.Empty, OperationMetadata> Delete the active directory specified in the request.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(BackupName name) Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(DeleteBackupRequest request) Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(String name) Warning!Warning!final OperationCallable<DeleteBackupRequest,com.google.protobuf.Empty, OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!Warning!final OperationCallable<DeleteBackupPolicyRequest,com.google.protobuf.Empty, OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupVaultAsync(String name) Warning!Warning!final OperationCallable<DeleteBackupVaultRequest,com.google.protobuf.Empty, OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a host group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a host group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHostGroupAsync(String name) Deletes a host group.Deletes a host group.final OperationCallable<DeleteHostGroupRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a host group.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteKmsConfigAsync(String name) Warning!Warning!final OperationCallable<DeleteKmsConfigRequest,com.google.protobuf.Empty, OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a quota rule.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a quota rule.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteQuotaRuleAsync(String name) Deletes a quota rule.Deletes a quota rule.final OperationCallable<DeleteQuotaRuleRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a quota rule.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a replication.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a replication.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReplicationAsync(String name) Deletes a replication.Deletes a replication.final OperationCallable<DeleteReplicationRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a replication.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSnapshotAsync(DeleteSnapshotRequest request) Deletes a snapshot.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a snapshot.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSnapshotAsync(String name) Deletes a snapshot.Deletes a snapshot.final OperationCallable<DeleteSnapshotRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a snapshot.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStoragePoolAsync(String name) Warning!Warning!final OperationCallable<DeleteStoragePoolRequest,com.google.protobuf.Empty, OperationMetadata> Warning!final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVolumeAsync(DeleteVolumeRequest request) Deletes a single Volume.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVolumeAsync(VolumeName name) Deletes a single Volume.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVolumeAsync(String name) Deletes a single Volume.Deletes a single Volume.final OperationCallable<DeleteVolumeRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a single Volume.encryptVolumesAsync(EncryptVolumesRequest request) Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.Establish replication peering.Establish replication peering.Establish replication peering.Establish volume peering.Establish volume peering.Establish volume peering.`ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the `StoragePool` cluster.`ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the `StoragePool` cluster.final ExecuteOntapGetResponseexecuteOntapGet(ExecuteOntapGetRequest request) `ExecuteOntapGet` dispatches the ONTAP `GET` request to the `StoragePool` cluster.`ExecuteOntapGet` dispatches the ONTAP `GET` request to the `StoragePool` cluster.`ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the `StoragePool` cluster.`ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the `StoragePool` cluster.final ExecuteOntapPostResponseexecuteOntapPost(ExecuteOntapPostRequest request) `ExecuteOntapPost` dispatches the ONTAP `POST` request to the `StoragePool` cluster.`ExecuteOntapPost` dispatches the ONTAP `POST` request to the `StoragePool` cluster.final ActiveDirectoryDescribes a specified active directory.final ActiveDirectoryDescribes a specified active directory.final ActiveDirectorygetActiveDirectory(String name) Describes a specified active directory.Describes a specified active directory.final BackupgetBackup(BackupName name) Returns the description of the specified backupfinal BackupgetBackup(GetBackupRequest request) Returns the description of the specified backupfinal BackupReturns the description of the specified backupfinal UnaryCallable<GetBackupRequest,Backup> Returns the description of the specified backupfinal BackupPolicyReturns the description of the specified backup policy by backup_policy_id.final BackupPolicygetBackupPolicy(GetBackupPolicyRequest request) Returns the description of the specified backup policy by backup_policy_id.final BackupPolicygetBackupPolicy(String name) Returns the description of the specified backup policy by backup_policy_id.Returns the description of the specified backup policy by backup_policy_id.final BackupVaultReturns the description of the specified backup vaultfinal BackupVaultgetBackupVault(GetBackupVaultRequest request) Returns the description of the specified backup vaultfinal BackupVaultgetBackupVault(String name) Returns the description of the specified backup vaultReturns the description of the specified backup vaultfinal HostGroupgetHostGroup(GetHostGroupRequest request) Returns details of the specified host group.final HostGroupgetHostGroup(HostGroupName name) Returns details of the specified host group.final HostGroupgetHostGroup(String name) Returns details of the specified host group.Returns details of the specified host group.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final KmsConfiggetKmsConfig(GetKmsConfigRequest request) Returns the description of the specified KMS config by kms_config_id.final KmsConfiggetKmsConfig(KmsConfigName name) Returns the description of the specified KMS config by kms_config_id.final KmsConfiggetKmsConfig(String name) Returns the description of the specified KMS config by kms_config_id.Returns the description of the specified KMS config by kms_config_id.final LocationgetLocation(GetLocationRequest request) Gets information about a location.Gets information about a location.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final QuotaRulegetQuotaRule(GetQuotaRuleRequest request) Returns details of the specified quota rule.final QuotaRulegetQuotaRule(QuotaRuleName name) Returns details of the specified quota rule.final QuotaRulegetQuotaRule(String name) Returns details of the specified quota rule.Returns details of the specified quota rule.final ReplicationgetReplication(GetReplicationRequest request) Describe a replication for a volume.final ReplicationDescribe a replication for a volume.final ReplicationgetReplication(String name) Describe a replication for a volume.Describe a replication for a volume.final NetAppSettingsfinal SnapshotgetSnapshot(GetSnapshotRequest request) Describe a snapshot for a volume.final SnapshotgetSnapshot(SnapshotName name) Describe a snapshot for a volume.final SnapshotgetSnapshot(String name) Describe a snapshot for a volume.Describe a snapshot for a volume.final StoragePoolgetStoragePool(GetStoragePoolRequest request) Returns the description of the specified storage pool by poolId.final StoragePoolReturns the description of the specified storage pool by poolId.final StoragePoolgetStoragePool(String name) Returns the description of the specified storage pool by poolId.Returns the description of the specified storage pool by poolId.getStub()final VolumegetVolume(GetVolumeRequest request) Gets details of a single Volume.final VolumegetVolume(VolumeName name) Gets details of a single Volume.final VolumeGets details of a single Volume.final UnaryCallable<GetVolumeRequest,Volume> Gets details of a single Volume.booleanbooleanLists active directories.listActiveDirectories(LocationName parent) Lists active directories.listActiveDirectories(String parent) Lists active directories.Lists active directories.Lists active directories.Returns list of all available backup policies.listBackupPolicies(LocationName parent) Returns list of all available backup policies.listBackupPolicies(String parent) Returns list of all available backup policies.Returns list of all available backup policies.Returns list of all available backup policies.listBackups(BackupVaultName parent) Returns descriptions of all backups for a backupVault.listBackups(ListBackupsRequest request) Returns descriptions of all backups for a backupVault.listBackups(String parent) Returns descriptions of all backups for a backupVault.Returns descriptions of all backups for a backupVault.Returns descriptions of all backups for a backupVault.listBackupVaults(ListBackupVaultsRequest request) Returns list of all available backup vaults.listBackupVaults(LocationName parent) Returns list of all available backup vaults.listBackupVaults(String parent) Returns list of all available backup vaults.Returns list of all available backup vaults.Returns list of all available backup vaults.listHostGroups(ListHostGroupsRequest request) Returns a list of host groups in a `location`.listHostGroups(LocationName parent) Returns a list of host groups in a `location`.listHostGroups(String parent) Returns a list of host groups in a `location`.Returns a list of host groups in a `location`.Returns a list of host groups in a `location`.listKmsConfigs(ListKmsConfigsRequest request) Returns descriptions of all KMS configs owned by the caller.listKmsConfigs(LocationName parent) Returns descriptions of all KMS configs owned by the caller.listKmsConfigs(String parent) Returns descriptions of all KMS configs owned by the caller.Returns descriptions of all KMS configs owned by the caller.Returns descriptions of all KMS configs owned by the caller.listLocations(ListLocationsRequest request) Lists information about the supported locations for this service.Lists information about the supported locations for this service.Lists information about the supported locations for this service.listQuotaRules(ListQuotaRulesRequest request) Returns list of all quota rules in a location.listQuotaRules(VolumeName parent) Returns list of all quota rules in a location.listQuotaRules(String parent) Returns list of all quota rules in a location.Returns list of all quota rules in a location.Returns list of all quota rules in a location.listReplications(ListReplicationsRequest request) Returns descriptions of all replications for a volume.listReplications(VolumeName parent) Returns descriptions of all replications for a volume.listReplications(String parent) Returns descriptions of all replications for a volume.Returns descriptions of all replications for a volume.Returns descriptions of all replications for a volume.listSnapshots(ListSnapshotsRequest request) Returns descriptions of all snapshots for a volume.listSnapshots(VolumeName parent) Returns descriptions of all snapshots for a volume.listSnapshots(String parent) Returns descriptions of all snapshots for a volume.Returns descriptions of all snapshots for a volume.Returns descriptions of all snapshots for a volume.listStoragePools(ListStoragePoolsRequest request) Returns descriptions of all storage pools owned by the caller.listStoragePools(LocationName parent) Returns descriptions of all storage pools owned by the caller.listStoragePools(String parent) Returns descriptions of all storage pools owned by the caller.Returns descriptions of all storage pools owned by the caller.Returns descriptions of all storage pools owned by the caller.listVolumes(ListVolumesRequest request) Lists Volumes in a given project.listVolumes(LocationName parent) Lists Volumes in a given project.listVolumes(String parent) Lists Volumes in a given project.Lists Volumes in a given project.Lists Volumes in a given project.Restore files from a backup to a volume.Restore files from a backup to a volume.Restore files from a backup to a volume.Resume Cross Region Replication.Resume Cross Region Replication.Resume Cross Region Replication.Reverses direction of replication.Reverses direction of replication.Reverses direction of replication.revertVolumeAsync(RevertVolumeRequest request) Revert an existing volume to a specified snapshot.Revert an existing volume to a specified snapshot.Revert an existing volume to a specified snapshot.voidshutdown()voidStop Cross Region Replication.Stop Cross Region Replication.Stop Cross Region Replication.This operation will switch the active/replica zone for a regional storagePool.This operation will switch the active/replica zone for a regional storagePool.This operation will switch the active/replica zone for a regional storagePool.Syncs the replication.Syncs the replication.Syncs the replication.updateActiveDirectoryAsync(ActiveDirectory activeDirectory, com.google.protobuf.FieldMask updateMask) Update the parameters of an active directories.Update the parameters of an active directories.Update the parameters of an active directories.Update the parameters of an active directories.updateBackupAsync(Backup backup, com.google.protobuf.FieldMask updateMask) Update backup with full spec.updateBackupAsync(UpdateBackupRequest request) Update backup with full spec.Update backup with full spec.Update backup with full spec.updateBackupPolicyAsync(BackupPolicy backupPolicy, com.google.protobuf.FieldMask updateMask) Updates settings of a specific backup policy.Updates settings of a specific backup policy.Updates settings of a specific backup policy.Updates settings of a specific backup policy.updateBackupVaultAsync(BackupVault backupVault, com.google.protobuf.FieldMask updateMask) Updates the settings of a specific backup vault.Updates the settings of a specific backup vault.Updates the settings of a specific backup vault.Updates the settings of a specific backup vault.updateHostGroupAsync(HostGroup hostGroup, com.google.protobuf.FieldMask updateMask) Updates an existing host group.Updates an existing host group.Updates an existing host group.Updates an existing host group.updateKmsConfigAsync(KmsConfig kmsConfig, com.google.protobuf.FieldMask updateMask) Updates the Kms config properties with the full specUpdates the Kms config properties with the full specUpdates the Kms config properties with the full specUpdates the Kms config properties with the full specupdateQuotaRuleAsync(QuotaRule quotaRule, com.google.protobuf.FieldMask updateMask) Updates a quota rule.Updates a quota rule.Updates a quota rule.Updates a quota rule.updateReplicationAsync(Replication replication, com.google.protobuf.FieldMask updateMask) Updates the settings of a specific replication.Updates the settings of a specific replication.Updates the settings of a specific replication.Updates the settings of a specific replication.updateSnapshotAsync(Snapshot snapshot, com.google.protobuf.FieldMask updateMask) Updates the settings of a specific snapshot.updateSnapshotAsync(UpdateSnapshotRequest request) Updates the settings of a specific snapshot.Updates the settings of a specific snapshot.Updates the settings of a specific snapshot.updateStoragePoolAsync(StoragePool storagePool, com.google.protobuf.FieldMask updateMask) Updates the storage pool properties with the full specUpdates the storage pool properties with the full specUpdates the storage pool properties with the full specUpdates the storage pool properties with the full specupdateVolumeAsync(UpdateVolumeRequest request) Updates the parameters of a single Volume.updateVolumeAsync(Volume volume, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Volume.Updates the parameters of a single Volume.Updates the parameters of a single Volume.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.final OperationCallable<ValidateDirectoryServiceRequest,com.google.protobuf.Empty, OperationMetadata> ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.final VerifyKmsConfigResponseverifyKmsConfig(VerifyKmsConfigRequest request) Verifies KMS config reachability.Verifies KMS config reachability.
-
Constructor Details
-
NetAppClient
Constructs an instance of NetAppClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
NetAppClient
-
-
Method Details
-
create
Constructs an instance of NetAppClient with default settings.- Throws:
IOException
-
create
Constructs an instance of NetAppClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
Constructs an instance of NetAppClient, using the given stub for making calls. This is for advanced usage - prefer using create(NetAppSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listStoragePools
Returns descriptions of all storage pools owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (StoragePool element : netAppClient.listStoragePools(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value- Throws:
ApiException- if the remote call fails
-
listStoragePools
Returns descriptions of all storage pools owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (StoragePool element : netAppClient.listStoragePools(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value- Throws:
ApiException- if the remote call fails
-
listStoragePools
public final NetAppClient.ListStoragePoolsPagedResponse listStoragePools(ListStoragePoolsRequest request) Returns descriptions of all storage pools owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListStoragePoolsRequest request = ListStoragePoolsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); for (StoragePool element : netAppClient.listStoragePools(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listStoragePoolsPagedCallable
public final UnaryCallable<ListStoragePoolsRequest,NetAppClient.ListStoragePoolsPagedResponse> listStoragePoolsPagedCallable()Returns descriptions of all storage pools owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListStoragePoolsRequest request = ListStoragePoolsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); ApiFuture<StoragePool> future = netAppClient.listStoragePoolsPagedCallable().futureCall(request); // Do something. for (StoragePool element : future.get().iterateAll()) { // doThingsWith(element); } } -
listStoragePoolsCallable
public final UnaryCallable<ListStoragePoolsRequest,ListStoragePoolsResponse> listStoragePoolsCallable()Returns descriptions of all storage pools owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListStoragePoolsRequest request = ListStoragePoolsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); while (true) { ListStoragePoolsResponse response = netAppClient.listStoragePoolsCallable().call(request); for (StoragePool element : response.getStoragePoolsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
createStoragePoolAsync
public final OperationFuture<StoragePool,OperationMetadata> createStoragePoolAsync(LocationName parent, StoragePool storagePool, String storagePoolId) Creates a new storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); StoragePool storagePool = StoragePool.newBuilder().build(); String storagePoolId = "storagePoolId1617506482"; StoragePool response = netAppClient.createStoragePoolAsync(parent, storagePool, storagePoolId).get(); }- Parameters:
parent- Required. Value for parent.storagePool- Required. The required parameters to create a new storage pool.storagePoolId- Required. Id of the requesting storage pool. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createStoragePoolAsync
public final OperationFuture<StoragePool,OperationMetadata> createStoragePoolAsync(String parent, StoragePool storagePool, String storagePoolId) Creates a new storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); StoragePool storagePool = StoragePool.newBuilder().build(); String storagePoolId = "storagePoolId1617506482"; StoragePool response = netAppClient.createStoragePoolAsync(parent, storagePool, storagePoolId).get(); }- Parameters:
parent- Required. Value for parent.storagePool- Required. The required parameters to create a new storage pool.storagePoolId- Required. Id of the requesting storage pool. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createStoragePoolAsync
public final OperationFuture<StoragePool,OperationMetadata> createStoragePoolAsync(CreateStoragePoolRequest request) Creates a new storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateStoragePoolRequest request = CreateStoragePoolRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setStoragePoolId("storagePoolId1617506482") .setStoragePool(StoragePool.newBuilder().build()) .build(); StoragePool response = netAppClient.createStoragePoolAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createStoragePoolOperationCallable
public final OperationCallable<CreateStoragePoolRequest,StoragePool, createStoragePoolOperationCallable()OperationMetadata> Creates a new storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateStoragePoolRequest request = CreateStoragePoolRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setStoragePoolId("storagePoolId1617506482") .setStoragePool(StoragePool.newBuilder().build()) .build(); OperationFuture<StoragePool, OperationMetadata> future = netAppClient.createStoragePoolOperationCallable().futureCall(request); // Do something. StoragePool response = future.get(); } -
createStoragePoolCallable
Creates a new storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateStoragePoolRequest request = CreateStoragePoolRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setStoragePoolId("storagePoolId1617506482") .setStoragePool(StoragePool.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.createStoragePoolCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getStoragePool
Returns the description of the specified storage pool by poolId.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { StoragePoolName name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]"); StoragePool response = netAppClient.getStoragePool(name); }- Parameters:
name- Required. Name of the storage pool- Throws:
ApiException- if the remote call fails
-
getStoragePool
Returns the description of the specified storage pool by poolId.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString(); StoragePool response = netAppClient.getStoragePool(name); }- Parameters:
name- Required. Name of the storage pool- Throws:
ApiException- if the remote call fails
-
getStoragePool
Returns the description of the specified storage pool by poolId.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetStoragePoolRequest request = GetStoragePoolRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .build(); StoragePool response = netAppClient.getStoragePool(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getStoragePoolCallable
Returns the description of the specified storage pool by poolId.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetStoragePoolRequest request = GetStoragePoolRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .build(); ApiFuture<StoragePool> future = netAppClient.getStoragePoolCallable().futureCall(request); // Do something. StoragePool response = future.get(); } -
updateStoragePoolAsync
public final OperationFuture<StoragePool,OperationMetadata> updateStoragePoolAsync(StoragePool storagePool, com.google.protobuf.FieldMask updateMask) Updates the storage pool properties with the full specSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { StoragePool storagePool = StoragePool.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); StoragePool response = netAppClient.updateStoragePoolAsync(storagePool, updateMask).get(); }- Parameters:
storagePool- Required. The pool being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the StoragePool resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateStoragePoolAsync
public final OperationFuture<StoragePool,OperationMetadata> updateStoragePoolAsync(UpdateStoragePoolRequest request) Updates the storage pool properties with the full specSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateStoragePoolRequest request = UpdateStoragePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setStoragePool(StoragePool.newBuilder().build()) .build(); StoragePool response = netAppClient.updateStoragePoolAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateStoragePoolOperationCallable
public final OperationCallable<UpdateStoragePoolRequest,StoragePool, updateStoragePoolOperationCallable()OperationMetadata> Updates the storage pool properties with the full specSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateStoragePoolRequest request = UpdateStoragePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setStoragePool(StoragePool.newBuilder().build()) .build(); OperationFuture<StoragePool, OperationMetadata> future = netAppClient.updateStoragePoolOperationCallable().futureCall(request); // Do something. StoragePool response = future.get(); } -
updateStoragePoolCallable
Updates the storage pool properties with the full specSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateStoragePoolRequest request = UpdateStoragePoolRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setStoragePool(StoragePool.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateStoragePoolCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteStoragePoolAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStoragePoolAsync(StoragePoolName name) Warning! This operation will permanently delete the storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { StoragePoolName name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]"); netAppClient.deleteStoragePoolAsync(name).get(); }- Parameters:
name- Required. Name of the storage pool- Throws:
ApiException- if the remote call fails
-
deleteStoragePoolAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStoragePoolAsync(String name) Warning! This operation will permanently delete the storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString(); netAppClient.deleteStoragePoolAsync(name).get(); }- Parameters:
name- Required. Name of the storage pool- Throws:
ApiException- if the remote call fails
-
deleteStoragePoolAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteStoragePoolAsync(DeleteStoragePoolRequest request) Warning! This operation will permanently delete the storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteStoragePoolRequest request = DeleteStoragePoolRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .build(); netAppClient.deleteStoragePoolAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteStoragePoolOperationCallable
public final OperationCallable<DeleteStoragePoolRequest,com.google.protobuf.Empty, deleteStoragePoolOperationCallable()OperationMetadata> Warning! This operation will permanently delete the storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteStoragePoolRequest request = DeleteStoragePoolRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteStoragePoolOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteStoragePoolCallable
Warning! This operation will permanently delete the storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteStoragePoolRequest request = DeleteStoragePoolRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteStoragePoolCallable().futureCall(request); // Do something. future.get(); } -
validateDirectoryServiceAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> validateDirectoryServiceAsync(ValidateDirectoryServiceRequest request) ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ValidateDirectoryServiceRequest request = ValidateDirectoryServiceRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .setDirectoryServiceType(DirectoryServiceType.forNumber(0)) .build(); netAppClient.validateDirectoryServiceAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
validateDirectoryServiceOperationCallable
public final OperationCallable<ValidateDirectoryServiceRequest,com.google.protobuf.Empty, validateDirectoryServiceOperationCallable()OperationMetadata> ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ValidateDirectoryServiceRequest request = ValidateDirectoryServiceRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .setDirectoryServiceType(DirectoryServiceType.forNumber(0)) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.validateDirectoryServiceOperationCallable().futureCall(request); // Do something. future.get(); } -
validateDirectoryServiceCallable
public final UnaryCallable<ValidateDirectoryServiceRequest,Operation> validateDirectoryServiceCallable()ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ValidateDirectoryServiceRequest request = ValidateDirectoryServiceRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .setDirectoryServiceType(DirectoryServiceType.forNumber(0)) .build(); ApiFuture<Operation> future = netAppClient.validateDirectoryServiceCallable().futureCall(request); // Do something. future.get(); } -
switchActiveReplicaZoneAsync
public final OperationFuture<StoragePool,OperationMetadata> switchActiveReplicaZoneAsync(SwitchActiveReplicaZoneRequest request) This operation will switch the active/replica zone for a regional storagePool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { SwitchActiveReplicaZoneRequest request = SwitchActiveReplicaZoneRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .build(); StoragePool response = netAppClient.switchActiveReplicaZoneAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
switchActiveReplicaZoneOperationCallable
public final OperationCallable<SwitchActiveReplicaZoneRequest,StoragePool, switchActiveReplicaZoneOperationCallable()OperationMetadata> This operation will switch the active/replica zone for a regional storagePool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { SwitchActiveReplicaZoneRequest request = SwitchActiveReplicaZoneRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .build(); OperationFuture<StoragePool, OperationMetadata> future = netAppClient.switchActiveReplicaZoneOperationCallable().futureCall(request); // Do something. StoragePool response = future.get(); } -
switchActiveReplicaZoneCallable
public final UnaryCallable<SwitchActiveReplicaZoneRequest,Operation> switchActiveReplicaZoneCallable()This operation will switch the active/replica zone for a regional storagePool.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { SwitchActiveReplicaZoneRequest request = SwitchActiveReplicaZoneRequest.newBuilder() .setName(StoragePoolName.of("[PROJECT]", "[LOCATION]", "[STORAGE_POOL]").toString()) .build(); ApiFuture<Operation> future = netAppClient.switchActiveReplicaZoneCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listVolumes
Lists Volumes in a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (Volume element : netAppClient.listVolumes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListVolumesRequest- Throws:
ApiException- if the remote call fails
-
listVolumes
Lists Volumes in a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (Volume element : netAppClient.listVolumes(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListVolumesRequest- Throws:
ApiException- if the remote call fails
-
listVolumes
Lists Volumes in a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListVolumesRequest request = ListVolumesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (Volume element : netAppClient.listVolumes(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listVolumesPagedCallable
public final UnaryCallable<ListVolumesRequest,NetAppClient.ListVolumesPagedResponse> listVolumesPagedCallable()Lists Volumes in a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListVolumesRequest request = ListVolumesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<Volume> future = netAppClient.listVolumesPagedCallable().futureCall(request); // Do something. for (Volume element : future.get().iterateAll()) { // doThingsWith(element); } } -
listVolumesCallable
Lists Volumes in a given project.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListVolumesRequest request = ListVolumesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListVolumesResponse response = netAppClient.listVolumesCallable().call(request); for (Volume element : response.getVolumesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getVolume
Gets details of a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); Volume response = netAppClient.getVolume(name); }- Parameters:
name- Required. Name of the volume- Throws:
ApiException- if the remote call fails
-
getVolume
Gets details of a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); Volume response = netAppClient.getVolume(name); }- Parameters:
name- Required. Name of the volume- Throws:
ApiException- if the remote call fails
-
getVolume
Gets details of a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetVolumeRequest request = GetVolumeRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .build(); Volume response = netAppClient.getVolume(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getVolumeCallable
Gets details of a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetVolumeRequest request = GetVolumeRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .build(); ApiFuture<Volume> future = netAppClient.getVolumeCallable().futureCall(request); // Do something. Volume response = future.get(); } -
createVolumeAsync
public final OperationFuture<Volume,OperationMetadata> createVolumeAsync(LocationName parent, Volume volume, String volumeId) Creates a new Volume in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); Volume volume = Volume.newBuilder().build(); String volumeId = "volumeId-1869770283"; Volume response = netAppClient.createVolumeAsync(parent, volume, volumeId).get(); }- Parameters:
parent- Required. Value for parent.volume- Required. The volume being created.volumeId- Required. Id of the requesting volume. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createVolumeAsync
public final OperationFuture<Volume,OperationMetadata> createVolumeAsync(String parent, Volume volume, String volumeId) Creates a new Volume in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); Volume volume = Volume.newBuilder().build(); String volumeId = "volumeId-1869770283"; Volume response = netAppClient.createVolumeAsync(parent, volume, volumeId).get(); }- Parameters:
parent- Required. Value for parent.volume- Required. The volume being created.volumeId- Required. Id of the requesting volume. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createVolumeAsync
public final OperationFuture<Volume,OperationMetadata> createVolumeAsync(CreateVolumeRequest request) Creates a new Volume in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateVolumeRequest request = CreateVolumeRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setVolumeId("volumeId-1869770283") .setVolume(Volume.newBuilder().build()) .build(); Volume response = netAppClient.createVolumeAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createVolumeOperationCallable
public final OperationCallable<CreateVolumeRequest,Volume, createVolumeOperationCallable()OperationMetadata> Creates a new Volume in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateVolumeRequest request = CreateVolumeRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setVolumeId("volumeId-1869770283") .setVolume(Volume.newBuilder().build()) .build(); OperationFuture<Volume, OperationMetadata> future = netAppClient.createVolumeOperationCallable().futureCall(request); // Do something. Volume response = future.get(); } -
createVolumeCallable
Creates a new Volume in a given project and location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateVolumeRequest request = CreateVolumeRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setVolumeId("volumeId-1869770283") .setVolume(Volume.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.createVolumeCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateVolumeAsync
public final OperationFuture<Volume,OperationMetadata> updateVolumeAsync(Volume volume, com.google.protobuf.FieldMask updateMask) Updates the parameters of a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { Volume volume = Volume.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Volume response = netAppClient.updateVolumeAsync(volume, updateMask).get(); }- Parameters:
volume- Required. The volume being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Volume resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateVolumeAsync
public final OperationFuture<Volume,OperationMetadata> updateVolumeAsync(UpdateVolumeRequest request) Updates the parameters of a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateVolumeRequest request = UpdateVolumeRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setVolume(Volume.newBuilder().build()) .build(); Volume response = netAppClient.updateVolumeAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateVolumeOperationCallable
public final OperationCallable<UpdateVolumeRequest,Volume, updateVolumeOperationCallable()OperationMetadata> Updates the parameters of a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateVolumeRequest request = UpdateVolumeRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setVolume(Volume.newBuilder().build()) .build(); OperationFuture<Volume, OperationMetadata> future = netAppClient.updateVolumeOperationCallable().futureCall(request); // Do something. Volume response = future.get(); } -
updateVolumeCallable
Updates the parameters of a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateVolumeRequest request = UpdateVolumeRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setVolume(Volume.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateVolumeCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteVolumeAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVolumeAsync(VolumeName name) Deletes a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VolumeName name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); netAppClient.deleteVolumeAsync(name).get(); }- Parameters:
name- Required. Name of the volume- Throws:
ApiException- if the remote call fails
-
deleteVolumeAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVolumeAsync(String name) Deletes a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); netAppClient.deleteVolumeAsync(name).get(); }- Parameters:
name- Required. Name of the volume- Throws:
ApiException- if the remote call fails
-
deleteVolumeAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteVolumeAsync(DeleteVolumeRequest request) Deletes a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteVolumeRequest request = DeleteVolumeRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setForce(true) .build(); netAppClient.deleteVolumeAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteVolumeOperationCallable
public final OperationCallable<DeleteVolumeRequest,com.google.protobuf.Empty, deleteVolumeOperationCallable()OperationMetadata> Deletes a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteVolumeRequest request = DeleteVolumeRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setForce(true) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteVolumeOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteVolumeCallable
Deletes a single Volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteVolumeRequest request = DeleteVolumeRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setForce(true) .build(); ApiFuture<Operation> future = netAppClient.deleteVolumeCallable().futureCall(request); // Do something. future.get(); } -
revertVolumeAsync
public final OperationFuture<Volume,OperationMetadata> revertVolumeAsync(RevertVolumeRequest request) Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { RevertVolumeRequest request = RevertVolumeRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setSnapshotId("snapshotId-1113817601") .build(); Volume response = netAppClient.revertVolumeAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
revertVolumeOperationCallable
public final OperationCallable<RevertVolumeRequest,Volume, revertVolumeOperationCallable()OperationMetadata> Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { RevertVolumeRequest request = RevertVolumeRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setSnapshotId("snapshotId-1113817601") .build(); OperationFuture<Volume, OperationMetadata> future = netAppClient.revertVolumeOperationCallable().futureCall(request); // Do something. Volume response = future.get(); } -
revertVolumeCallable
Revert an existing volume to a specified snapshot. Warning! This operation will permanently revert all changes made after the snapshot was created.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { RevertVolumeRequest request = RevertVolumeRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setSnapshotId("snapshotId-1113817601") .build(); ApiFuture<Operation> future = netAppClient.revertVolumeCallable().futureCall(request); // Do something. Operation response = future.get(); } -
establishVolumePeeringAsync
public final OperationFuture<Volume,OperationMetadata> establishVolumePeeringAsync(EstablishVolumePeeringRequest request) Establish volume peering. This is used to establish cluster and svm peerings between the GCNV and OnPrem clusters.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EstablishVolumePeeringRequest request = EstablishVolumePeeringRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPeerClusterName("peerClusterName313022691") .setPeerSvmName("peerSvmName1014209619") .addAllPeerIpAddresses(new ArrayList<String>()) .setPeerVolumeName("peerVolumeName1542206407") .build(); Volume response = netAppClient.establishVolumePeeringAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
establishVolumePeeringOperationCallable
public final OperationCallable<EstablishVolumePeeringRequest,Volume, establishVolumePeeringOperationCallable()OperationMetadata> Establish volume peering. This is used to establish cluster and svm peerings between the GCNV and OnPrem clusters.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EstablishVolumePeeringRequest request = EstablishVolumePeeringRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPeerClusterName("peerClusterName313022691") .setPeerSvmName("peerSvmName1014209619") .addAllPeerIpAddresses(new ArrayList<String>()) .setPeerVolumeName("peerVolumeName1542206407") .build(); OperationFuture<Volume, OperationMetadata> future = netAppClient.establishVolumePeeringOperationCallable().futureCall(request); // Do something. Volume response = future.get(); } -
establishVolumePeeringCallable
public final UnaryCallable<EstablishVolumePeeringRequest,Operation> establishVolumePeeringCallable()Establish volume peering. This is used to establish cluster and svm peerings between the GCNV and OnPrem clusters.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EstablishVolumePeeringRequest request = EstablishVolumePeeringRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPeerClusterName("peerClusterName313022691") .setPeerSvmName("peerSvmName1014209619") .addAllPeerIpAddresses(new ArrayList<String>()) .setPeerVolumeName("peerVolumeName1542206407") .build(); ApiFuture<Operation> future = netAppClient.establishVolumePeeringCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listSnapshots
Returns descriptions of all snapshots for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); for (Snapshot element : netAppClient.listSnapshots(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The volume for which to retrieve snapshot information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`.- Throws:
ApiException- if the remote call fails
-
listSnapshots
Returns descriptions of all snapshots for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); for (Snapshot element : netAppClient.listSnapshots(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The volume for which to retrieve snapshot information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`.- Throws:
ApiException- if the remote call fails
-
listSnapshots
Returns descriptions of all snapshots for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); for (Snapshot element : netAppClient.listSnapshots(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listSnapshotsPagedCallable
public final UnaryCallable<ListSnapshotsRequest,NetAppClient.ListSnapshotsPagedResponse> listSnapshotsPagedCallable()Returns descriptions of all snapshots for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); ApiFuture<Snapshot> future = netAppClient.listSnapshotsPagedCallable().futureCall(request); // Do something. for (Snapshot element : future.get().iterateAll()) { // doThingsWith(element); } } -
listSnapshotsCallable
Returns descriptions of all snapshots for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListSnapshotsRequest request = ListSnapshotsRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); while (true) { ListSnapshotsResponse response = netAppClient.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; } } } -
getSnapshot
Describe a snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { SnapshotName name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); Snapshot response = netAppClient.getSnapshot(name); }- Parameters:
name- Required. The snapshot resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`- Throws:
ApiException- if the remote call fails
-
getSnapshot
Describe a snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString(); Snapshot response = netAppClient.getSnapshot(name); }- Parameters:
name- Required. The snapshot resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/snapshots/{snapshot_id}`- Throws:
ApiException- if the remote call fails
-
getSnapshot
Describe a snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetSnapshotRequest request = GetSnapshotRequest.newBuilder() .setName( SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) .build(); Snapshot response = netAppClient.getSnapshot(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSnapshotCallable
Describe a snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetSnapshotRequest request = GetSnapshotRequest.newBuilder() .setName( SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) .build(); ApiFuture<Snapshot> future = netAppClient.getSnapshotCallable().futureCall(request); // Do something. Snapshot response = future.get(); } -
createSnapshotAsync
public final OperationFuture<Snapshot,OperationMetadata> createSnapshotAsync(VolumeName parent, Snapshot snapshot, String snapshotId) Create a new snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); Snapshot snapshot = Snapshot.newBuilder().build(); String snapshotId = "snapshotId-1113817601"; Snapshot response = netAppClient.createSnapshotAsync(parent, snapshot, snapshotId).get(); }- Parameters:
parent- Required. The NetApp volume to create the snapshots of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`snapshot- Required. A snapshot resourcesnapshotId- Required. ID of the snapshot to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createSnapshotAsync
public final OperationFuture<Snapshot,OperationMetadata> createSnapshotAsync(String parent, Snapshot snapshot, String snapshotId) Create a new snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); Snapshot snapshot = Snapshot.newBuilder().build(); String snapshotId = "snapshotId-1113817601"; Snapshot response = netAppClient.createSnapshotAsync(parent, snapshot, snapshotId).get(); }- Parameters:
parent- Required. The NetApp volume to create the snapshots of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`snapshot- Required. A snapshot resourcesnapshotId- Required. ID of the snapshot to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createSnapshotAsync
public final OperationFuture<Snapshot,OperationMetadata> createSnapshotAsync(CreateSnapshotRequest request) Create a new snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateSnapshotRequest request = CreateSnapshotRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setSnapshot(Snapshot.newBuilder().build()) .setSnapshotId("snapshotId-1113817601") .build(); Snapshot response = netAppClient.createSnapshotAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createSnapshotOperationCallable
public final OperationCallable<CreateSnapshotRequest,Snapshot, createSnapshotOperationCallable()OperationMetadata> Create a new snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateSnapshotRequest request = CreateSnapshotRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setSnapshot(Snapshot.newBuilder().build()) .setSnapshotId("snapshotId-1113817601") .build(); OperationFuture<Snapshot, OperationMetadata> future = netAppClient.createSnapshotOperationCallable().futureCall(request); // Do something. Snapshot response = future.get(); } -
createSnapshotCallable
Create a new snapshot for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateSnapshotRequest request = CreateSnapshotRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setSnapshot(Snapshot.newBuilder().build()) .setSnapshotId("snapshotId-1113817601") .build(); ApiFuture<Operation> future = netAppClient.createSnapshotCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteSnapshotAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSnapshotAsync(SnapshotName name) Deletes a snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { SnapshotName name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]"); netAppClient.deleteSnapshotAsync(name).get(); }- Parameters:
name- Required. The snapshot resource name, in the format `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`- Throws:
ApiException- if the remote call fails
-
deleteSnapshotAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSnapshotAsync(String name) Deletes a snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString(); netAppClient.deleteSnapshotAsync(name).get(); }- Parameters:
name- Required. The snapshot resource name, in the format `projects/*/locations/*/volumes/*/snapshots/{snapshot_id}`- Throws:
ApiException- if the remote call fails
-
deleteSnapshotAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSnapshotAsync(DeleteSnapshotRequest request) Deletes a snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder() .setName( SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) .build(); netAppClient.deleteSnapshotAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteSnapshotOperationCallable
public final OperationCallable<DeleteSnapshotRequest,com.google.protobuf.Empty, deleteSnapshotOperationCallable()OperationMetadata> Deletes a snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder() .setName( SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteSnapshotOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteSnapshotCallable
Deletes a snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteSnapshotRequest request = DeleteSnapshotRequest.newBuilder() .setName( SnapshotName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[SNAPSHOT]").toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteSnapshotCallable().futureCall(request); // Do something. future.get(); } -
updateSnapshotAsync
public final OperationFuture<Snapshot,OperationMetadata> updateSnapshotAsync(Snapshot snapshot, com.google.protobuf.FieldMask updateMask) Updates the settings of a specific snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { Snapshot snapshot = Snapshot.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Snapshot response = netAppClient.updateSnapshotAsync(snapshot, updateMask).get(); }- Parameters:
snapshot- Required. A snapshot resourceupdateMask- Required. Mask of fields to update. At least one path must be supplied in this field.- Throws:
ApiException- if the remote call fails
-
updateSnapshotAsync
public final OperationFuture<Snapshot,OperationMetadata> updateSnapshotAsync(UpdateSnapshotRequest request) Updates the settings of a specific snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateSnapshotRequest request = UpdateSnapshotRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSnapshot(Snapshot.newBuilder().build()) .build(); Snapshot response = netAppClient.updateSnapshotAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateSnapshotOperationCallable
public final OperationCallable<UpdateSnapshotRequest,Snapshot, updateSnapshotOperationCallable()OperationMetadata> Updates the settings of a specific snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateSnapshotRequest request = UpdateSnapshotRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSnapshot(Snapshot.newBuilder().build()) .build(); OperationFuture<Snapshot, OperationMetadata> future = netAppClient.updateSnapshotOperationCallable().futureCall(request); // Do something. Snapshot response = future.get(); } -
updateSnapshotCallable
Updates the settings of a specific snapshot.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateSnapshotRequest request = UpdateSnapshotRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setSnapshot(Snapshot.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateSnapshotCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listActiveDirectories
public final NetAppClient.ListActiveDirectoriesPagedResponse listActiveDirectories(LocationName parent) Lists active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (ActiveDirectory element : netAppClient.listActiveDirectories(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListActiveDirectoriesRequest- Throws:
ApiException- if the remote call fails
-
listActiveDirectories
Lists active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (ActiveDirectory element : netAppClient.listActiveDirectories(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListActiveDirectoriesRequest- Throws:
ApiException- if the remote call fails
-
listActiveDirectories
public final NetAppClient.ListActiveDirectoriesPagedResponse listActiveDirectories(ListActiveDirectoriesRequest request) Lists active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListActiveDirectoriesRequest request = ListActiveDirectoriesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (ActiveDirectory element : netAppClient.listActiveDirectories(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listActiveDirectoriesPagedCallable
public final UnaryCallable<ListActiveDirectoriesRequest,NetAppClient.ListActiveDirectoriesPagedResponse> listActiveDirectoriesPagedCallable()Lists active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListActiveDirectoriesRequest request = ListActiveDirectoriesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<ActiveDirectory> future = netAppClient.listActiveDirectoriesPagedCallable().futureCall(request); // Do something. for (ActiveDirectory element : future.get().iterateAll()) { // doThingsWith(element); } } -
listActiveDirectoriesCallable
public final UnaryCallable<ListActiveDirectoriesRequest,ListActiveDirectoriesResponse> listActiveDirectoriesCallable()Lists active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListActiveDirectoriesRequest request = ListActiveDirectoriesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListActiveDirectoriesResponse response = netAppClient.listActiveDirectoriesCallable().call(request); for (ActiveDirectory element : response.getActiveDirectoriesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getActiveDirectory
Describes a specified active directory.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ActiveDirectoryName name = ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]"); ActiveDirectory response = netAppClient.getActiveDirectory(name); }- Parameters:
name- Required. Name of the active directory.- Throws:
ApiException- if the remote call fails
-
getActiveDirectory
Describes a specified active directory.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]").toString(); ActiveDirectory response = netAppClient.getActiveDirectory(name); }- Parameters:
name- Required. Name of the active directory.- Throws:
ApiException- if the remote call fails
-
getActiveDirectory
Describes a specified active directory.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetActiveDirectoryRequest request = GetActiveDirectoryRequest.newBuilder() .setName( ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]") .toString()) .build(); ActiveDirectory response = netAppClient.getActiveDirectory(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getActiveDirectoryCallable
Describes a specified active directory.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetActiveDirectoryRequest request = GetActiveDirectoryRequest.newBuilder() .setName( ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]") .toString()) .build(); ApiFuture<ActiveDirectory> future = netAppClient.getActiveDirectoryCallable().futureCall(request); // Do something. ActiveDirectory response = future.get(); } -
createActiveDirectoryAsync
public final OperationFuture<ActiveDirectory,OperationMetadata> createActiveDirectoryAsync(LocationName parent, ActiveDirectory activeDirectory, String activeDirectoryId) CreateActiveDirectory Creates the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); ActiveDirectory activeDirectory = ActiveDirectory.newBuilder().build(); String activeDirectoryId = "activeDirectoryId589359490"; ActiveDirectory response = netAppClient.createActiveDirectoryAsync(parent, activeDirectory, activeDirectoryId).get(); }- Parameters:
parent- Required. Value for parent.activeDirectory- Required. Fields of the to be created active directory.activeDirectoryId- Required. ID of the active directory to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter , the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createActiveDirectoryAsync
public final OperationFuture<ActiveDirectory,OperationMetadata> createActiveDirectoryAsync(String parent, ActiveDirectory activeDirectory, String activeDirectoryId) CreateActiveDirectory Creates the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); ActiveDirectory activeDirectory = ActiveDirectory.newBuilder().build(); String activeDirectoryId = "activeDirectoryId589359490"; ActiveDirectory response = netAppClient.createActiveDirectoryAsync(parent, activeDirectory, activeDirectoryId).get(); }- Parameters:
parent- Required. Value for parent.activeDirectory- Required. Fields of the to be created active directory.activeDirectoryId- Required. ID of the active directory to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter , the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createActiveDirectoryAsync
public final OperationFuture<ActiveDirectory,OperationMetadata> createActiveDirectoryAsync(CreateActiveDirectoryRequest request) CreateActiveDirectory Creates the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { CreateActiveDirectoryRequest request = CreateActiveDirectoryRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setActiveDirectory(ActiveDirectory.newBuilder().build()) .setActiveDirectoryId("activeDirectoryId589359490") .build(); ActiveDirectory response = netAppClient.createActiveDirectoryAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createActiveDirectoryOperationCallable
public final OperationCallable<CreateActiveDirectoryRequest,ActiveDirectory, createActiveDirectoryOperationCallable()OperationMetadata> CreateActiveDirectory Creates the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { CreateActiveDirectoryRequest request = CreateActiveDirectoryRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setActiveDirectory(ActiveDirectory.newBuilder().build()) .setActiveDirectoryId("activeDirectoryId589359490") .build(); OperationFuture<ActiveDirectory, OperationMetadata> future = netAppClient.createActiveDirectoryOperationCallable().futureCall(request); // Do something. ActiveDirectory response = future.get(); } -
createActiveDirectoryCallable
CreateActiveDirectory Creates the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { CreateActiveDirectoryRequest request = CreateActiveDirectoryRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setActiveDirectory(ActiveDirectory.newBuilder().build()) .setActiveDirectoryId("activeDirectoryId589359490") .build(); ApiFuture<Operation> future = netAppClient.createActiveDirectoryCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateActiveDirectoryAsync
public final OperationFuture<ActiveDirectory,OperationMetadata> updateActiveDirectoryAsync(ActiveDirectory activeDirectory, com.google.protobuf.FieldMask updateMask) Update the parameters of an active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ActiveDirectory activeDirectory = ActiveDirectory.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); ActiveDirectory response = netAppClient.updateActiveDirectoryAsync(activeDirectory, updateMask).get(); }- Parameters:
activeDirectory- Required. The volume being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Active Directory resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateActiveDirectoryAsync
public final OperationFuture<ActiveDirectory,OperationMetadata> updateActiveDirectoryAsync(UpdateActiveDirectoryRequest request) Update the parameters of an active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateActiveDirectoryRequest request = UpdateActiveDirectoryRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setActiveDirectory(ActiveDirectory.newBuilder().build()) .build(); ActiveDirectory response = netAppClient.updateActiveDirectoryAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateActiveDirectoryOperationCallable
public final OperationCallable<UpdateActiveDirectoryRequest,ActiveDirectory, updateActiveDirectoryOperationCallable()OperationMetadata> Update the parameters of an active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateActiveDirectoryRequest request = UpdateActiveDirectoryRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setActiveDirectory(ActiveDirectory.newBuilder().build()) .build(); OperationFuture<ActiveDirectory, OperationMetadata> future = netAppClient.updateActiveDirectoryOperationCallable().futureCall(request); // Do something. ActiveDirectory response = future.get(); } -
updateActiveDirectoryCallable
Update the parameters of an active directories.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateActiveDirectoryRequest request = UpdateActiveDirectoryRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setActiveDirectory(ActiveDirectory.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateActiveDirectoryCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteActiveDirectoryAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteActiveDirectoryAsync(ActiveDirectoryName name) Delete the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { ActiveDirectoryName name = ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]"); netAppClient.deleteActiveDirectoryAsync(name).get(); }- Parameters:
name- Required. Name of the active directory.- Throws:
ApiException- if the remote call fails
-
deleteActiveDirectoryAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteActiveDirectoryAsync(String name) Delete the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { String name = ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]").toString(); netAppClient.deleteActiveDirectoryAsync(name).get(); }- Parameters:
name- Required. Name of the active directory.- Throws:
ApiException- if the remote call fails
-
deleteActiveDirectoryAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteActiveDirectoryAsync(DeleteActiveDirectoryRequest request) Delete the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { DeleteActiveDirectoryRequest request = DeleteActiveDirectoryRequest.newBuilder() .setName( ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]") .toString()) .build(); netAppClient.deleteActiveDirectoryAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteActiveDirectoryOperationCallable
public final OperationCallable<DeleteActiveDirectoryRequest,com.google.protobuf.Empty, deleteActiveDirectoryOperationCallable()OperationMetadata> Delete the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { DeleteActiveDirectoryRequest request = DeleteActiveDirectoryRequest.newBuilder() .setName( ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]") .toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteActiveDirectoryOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteActiveDirectoryCallable
Delete the active directory specified in the 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 (NetAppClient netAppClient = NetAppClient.create()) { DeleteActiveDirectoryRequest request = DeleteActiveDirectoryRequest.newBuilder() .setName( ActiveDirectoryName.of("[PROJECT]", "[LOCATION]", "[ACTIVE_DIRECTORY]") .toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteActiveDirectoryCallable().futureCall(request); // Do something. future.get(); } -
listKmsConfigs
Returns descriptions of all KMS configs owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (KmsConfig element : netAppClient.listKmsConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value- Throws:
ApiException- if the remote call fails
-
listKmsConfigs
Returns descriptions of all KMS configs owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (KmsConfig element : netAppClient.listKmsConfigs(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value- Throws:
ApiException- if the remote call fails
-
listKmsConfigs
Returns descriptions of all KMS configs owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListKmsConfigsRequest request = ListKmsConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); for (KmsConfig element : netAppClient.listKmsConfigs(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listKmsConfigsPagedCallable
public final UnaryCallable<ListKmsConfigsRequest,NetAppClient.ListKmsConfigsPagedResponse> listKmsConfigsPagedCallable()Returns descriptions of all KMS configs owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListKmsConfigsRequest request = ListKmsConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); ApiFuture<KmsConfig> future = netAppClient.listKmsConfigsPagedCallable().futureCall(request); // Do something. for (KmsConfig element : future.get().iterateAll()) { // doThingsWith(element); } } -
listKmsConfigsCallable
Returns descriptions of all KMS configs owned by the caller.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListKmsConfigsRequest request = ListKmsConfigsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); while (true) { ListKmsConfigsResponse response = netAppClient.listKmsConfigsCallable().call(request); for (KmsConfig element : response.getKmsConfigsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
createKmsConfigAsync
public final OperationFuture<KmsConfig,OperationMetadata> createKmsConfigAsync(LocationName parent, KmsConfig kmsConfig, String kmsConfigId) Creates a new KMS config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); KmsConfig kmsConfig = KmsConfig.newBuilder().build(); String kmsConfigId = "kmsConfigId-1159731602"; KmsConfig response = netAppClient.createKmsConfigAsync(parent, kmsConfig, kmsConfigId).get(); }- Parameters:
parent- Required. Value for parent.kmsConfig- Required. The required parameters to create a new KmsConfig.kmsConfigId- Required. Id of the requesting KmsConfig. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createKmsConfigAsync
public final OperationFuture<KmsConfig,OperationMetadata> createKmsConfigAsync(String parent, KmsConfig kmsConfig, String kmsConfigId) Creates a new KMS config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); KmsConfig kmsConfig = KmsConfig.newBuilder().build(); String kmsConfigId = "kmsConfigId-1159731602"; KmsConfig response = netAppClient.createKmsConfigAsync(parent, kmsConfig, kmsConfigId).get(); }- Parameters:
parent- Required. Value for parent.kmsConfig- Required. The required parameters to create a new KmsConfig.kmsConfigId- Required. Id of the requesting KmsConfig. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createKmsConfigAsync
public final OperationFuture<KmsConfig,OperationMetadata> createKmsConfigAsync(CreateKmsConfigRequest request) Creates a new KMS config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateKmsConfigRequest request = CreateKmsConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setKmsConfigId("kmsConfigId-1159731602") .setKmsConfig(KmsConfig.newBuilder().build()) .build(); KmsConfig response = netAppClient.createKmsConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createKmsConfigOperationCallable
public final OperationCallable<CreateKmsConfigRequest,KmsConfig, createKmsConfigOperationCallable()OperationMetadata> Creates a new KMS config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateKmsConfigRequest request = CreateKmsConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setKmsConfigId("kmsConfigId-1159731602") .setKmsConfig(KmsConfig.newBuilder().build()) .build(); OperationFuture<KmsConfig, OperationMetadata> future = netAppClient.createKmsConfigOperationCallable().futureCall(request); // Do something. KmsConfig response = future.get(); } -
createKmsConfigCallable
Creates a new KMS config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateKmsConfigRequest request = CreateKmsConfigRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setKmsConfigId("kmsConfigId-1159731602") .setKmsConfig(KmsConfig.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.createKmsConfigCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getKmsConfig
Returns the description of the specified KMS config by kms_config_id.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { KmsConfigName name = KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]"); KmsConfig response = netAppClient.getKmsConfig(name); }- Parameters:
name- Required. Name of the KmsConfig- Throws:
ApiException- if the remote call fails
-
getKmsConfig
Returns the description of the specified KMS config by kms_config_id.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString(); KmsConfig response = netAppClient.getKmsConfig(name); }- Parameters:
name- Required. Name of the KmsConfig- Throws:
ApiException- if the remote call fails
-
getKmsConfig
Returns the description of the specified KMS config by kms_config_id.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetKmsConfigRequest request = GetKmsConfigRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); KmsConfig response = netAppClient.getKmsConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getKmsConfigCallable
Returns the description of the specified KMS config by kms_config_id.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetKmsConfigRequest request = GetKmsConfigRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); ApiFuture<KmsConfig> future = netAppClient.getKmsConfigCallable().futureCall(request); // Do something. KmsConfig response = future.get(); } -
updateKmsConfigAsync
public final OperationFuture<KmsConfig,OperationMetadata> updateKmsConfigAsync(KmsConfig kmsConfig, com.google.protobuf.FieldMask updateMask) Updates the Kms config properties with the full specSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { KmsConfig kmsConfig = KmsConfig.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); KmsConfig response = netAppClient.updateKmsConfigAsync(kmsConfig, updateMask).get(); }- Parameters:
kmsConfig- Required. The KmsConfig being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the KmsConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateKmsConfigAsync
public final OperationFuture<KmsConfig,OperationMetadata> updateKmsConfigAsync(UpdateKmsConfigRequest request) Updates the Kms config properties with the full specSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateKmsConfigRequest request = UpdateKmsConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setKmsConfig(KmsConfig.newBuilder().build()) .build(); KmsConfig response = netAppClient.updateKmsConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateKmsConfigOperationCallable
public final OperationCallable<UpdateKmsConfigRequest,KmsConfig, updateKmsConfigOperationCallable()OperationMetadata> Updates the Kms config properties with the full specSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateKmsConfigRequest request = UpdateKmsConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setKmsConfig(KmsConfig.newBuilder().build()) .build(); OperationFuture<KmsConfig, OperationMetadata> future = netAppClient.updateKmsConfigOperationCallable().futureCall(request); // Do something. KmsConfig response = future.get(); } -
updateKmsConfigCallable
Updates the Kms config properties with the full specSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateKmsConfigRequest request = UpdateKmsConfigRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setKmsConfig(KmsConfig.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateKmsConfigCallable().futureCall(request); // Do something. Operation response = future.get(); } -
encryptVolumesAsync
public final OperationFuture<KmsConfig,OperationMetadata> encryptVolumesAsync(EncryptVolumesRequest request) Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EncryptVolumesRequest request = EncryptVolumesRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); KmsConfig response = netAppClient.encryptVolumesAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
encryptVolumesOperationCallable
public final OperationCallable<EncryptVolumesRequest,KmsConfig, encryptVolumesOperationCallable()OperationMetadata> Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EncryptVolumesRequest request = EncryptVolumesRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); OperationFuture<KmsConfig, OperationMetadata> future = netAppClient.encryptVolumesOperationCallable().futureCall(request); // Do something. KmsConfig response = future.get(); } -
encryptVolumesCallable
Encrypt the existing volumes without CMEK encryption with the desired the KMS config for the whole region.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EncryptVolumesRequest request = EncryptVolumesRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); ApiFuture<Operation> future = netAppClient.encryptVolumesCallable().futureCall(request); // Do something. Operation response = future.get(); } -
verifyKmsConfig
Verifies KMS config reachability.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VerifyKmsConfigRequest request = VerifyKmsConfigRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); VerifyKmsConfigResponse response = netAppClient.verifyKmsConfig(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
verifyKmsConfigCallable
public final UnaryCallable<VerifyKmsConfigRequest,VerifyKmsConfigResponse> verifyKmsConfigCallable()Verifies KMS config reachability.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VerifyKmsConfigRequest request = VerifyKmsConfigRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); ApiFuture<VerifyKmsConfigResponse> future = netAppClient.verifyKmsConfigCallable().futureCall(request); // Do something. VerifyKmsConfigResponse response = future.get(); } -
deleteKmsConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteKmsConfigAsync(KmsConfigName name) Warning! This operation will permanently delete the Kms config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { KmsConfigName name = KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]"); netAppClient.deleteKmsConfigAsync(name).get(); }- Parameters:
name- Required. Name of the KmsConfig.- Throws:
ApiException- if the remote call fails
-
deleteKmsConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteKmsConfigAsync(String name) Warning! This operation will permanently delete the Kms config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString(); netAppClient.deleteKmsConfigAsync(name).get(); }- Parameters:
name- Required. Name of the KmsConfig.- Throws:
ApiException- if the remote call fails
-
deleteKmsConfigAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteKmsConfigAsync(DeleteKmsConfigRequest request) Warning! This operation will permanently delete the Kms config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteKmsConfigRequest request = DeleteKmsConfigRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); netAppClient.deleteKmsConfigAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteKmsConfigOperationCallable
public final OperationCallable<DeleteKmsConfigRequest,com.google.protobuf.Empty, deleteKmsConfigOperationCallable()OperationMetadata> Warning! This operation will permanently delete the Kms config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteKmsConfigRequest request = DeleteKmsConfigRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteKmsConfigOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteKmsConfigCallable
Warning! This operation will permanently delete the Kms config.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteKmsConfigRequest request = DeleteKmsConfigRequest.newBuilder() .setName(KmsConfigName.of("[PROJECT]", "[LOCATION]", "[KMS_CONFIG]").toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteKmsConfigCallable().futureCall(request); // Do something. future.get(); } -
listReplications
Returns descriptions of all replications for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); for (Replication element : netAppClient.listReplications(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The volume for which to retrieve replication information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`.- Throws:
ApiException- if the remote call fails
-
listReplications
Returns descriptions of all replications for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); for (Replication element : netAppClient.listReplications(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The volume for which to retrieve replication information, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`.- Throws:
ApiException- if the remote call fails
-
listReplications
public final NetAppClient.ListReplicationsPagedResponse listReplications(ListReplicationsRequest request) Returns descriptions of all replications for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListReplicationsRequest request = ListReplicationsRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); for (Replication element : netAppClient.listReplications(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listReplicationsPagedCallable
public final UnaryCallable<ListReplicationsRequest,NetAppClient.ListReplicationsPagedResponse> listReplicationsPagedCallable()Returns descriptions of all replications for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListReplicationsRequest request = ListReplicationsRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); ApiFuture<Replication> future = netAppClient.listReplicationsPagedCallable().futureCall(request); // Do something. for (Replication element : future.get().iterateAll()) { // doThingsWith(element); } } -
listReplicationsCallable
public final UnaryCallable<ListReplicationsRequest,ListReplicationsResponse> listReplicationsCallable()Returns descriptions of all replications for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListReplicationsRequest request = ListReplicationsRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); while (true) { ListReplicationsResponse response = netAppClient.listReplicationsCallable().call(request); for (Replication element : response.getReplicationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getReplication
Describe a replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ReplicationName name = ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]"); Replication response = netAppClient.getReplication(name); }- Parameters:
name- Required. The replication resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`- Throws:
ApiException- if the remote call fails
-
getReplication
Describe a replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]").toString(); Replication response = netAppClient.getReplication(name); }- Parameters:
name- Required. The replication resource name, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`- Throws:
ApiException- if the remote call fails
-
getReplication
Describe a replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetReplicationRequest request = GetReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); Replication response = netAppClient.getReplication(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getReplicationCallable
Describe a replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetReplicationRequest request = GetReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); ApiFuture<Replication> future = netAppClient.getReplicationCallable().futureCall(request); // Do something. Replication response = future.get(); } -
createReplicationAsync
public final OperationFuture<Replication,OperationMetadata> createReplicationAsync(VolumeName parent, Replication replication, String replicationId) Create a new replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); Replication replication = Replication.newBuilder().build(); String replicationId = "replicationId1170820615"; Replication response = netAppClient.createReplicationAsync(parent, replication, replicationId).get(); }- Parameters:
parent- Required. The NetApp volume to create the replications of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`replication- Required. A replication resourcereplicationId- Required. ID of the replication to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createReplicationAsync
public final OperationFuture<Replication,OperationMetadata> createReplicationAsync(String parent, Replication replication, String replicationId) Create a new replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); Replication replication = Replication.newBuilder().build(); String replicationId = "replicationId1170820615"; Replication response = netAppClient.createReplicationAsync(parent, replication, replicationId).get(); }- Parameters:
parent- Required. The NetApp volume to create the replications of, in the format `projects/{project_id}/locations/{location}/volumes/{volume_id}`replication- Required. A replication resourcereplicationId- Required. ID of the replication to create. Must be unique within the parent resource. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createReplicationAsync
public final OperationFuture<Replication,OperationMetadata> createReplicationAsync(CreateReplicationRequest request) Create a new replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateReplicationRequest request = CreateReplicationRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setReplication(Replication.newBuilder().build()) .setReplicationId("replicationId1170820615") .build(); Replication response = netAppClient.createReplicationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createReplicationOperationCallable
public final OperationCallable<CreateReplicationRequest,Replication, createReplicationOperationCallable()OperationMetadata> Create a new replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateReplicationRequest request = CreateReplicationRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setReplication(Replication.newBuilder().build()) .setReplicationId("replicationId1170820615") .build(); OperationFuture<Replication, OperationMetadata> future = netAppClient.createReplicationOperationCallable().futureCall(request); // Do something. Replication response = future.get(); } -
createReplicationCallable
Create a new replication for a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateReplicationRequest request = CreateReplicationRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setReplication(Replication.newBuilder().build()) .setReplicationId("replicationId1170820615") .build(); ApiFuture<Operation> future = netAppClient.createReplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteReplicationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReplicationAsync(ReplicationName name) Deletes a replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ReplicationName name = ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]"); netAppClient.deleteReplicationAsync(name).get(); }- Parameters:
name- Required. The replication resource name, in the format `projects/*/locations/*/volumes/*/replications/{replication_id}`- Throws:
ApiException- if the remote call fails
-
deleteReplicationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReplicationAsync(String name) Deletes a replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]").toString(); netAppClient.deleteReplicationAsync(name).get(); }- Parameters:
name- Required. The replication resource name, in the format `projects/*/locations/*/volumes/*/replications/{replication_id}`- Throws:
ApiException- if the remote call fails
-
deleteReplicationAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteReplicationAsync(DeleteReplicationRequest request) Deletes a replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteReplicationRequest request = DeleteReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); netAppClient.deleteReplicationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteReplicationOperationCallable
public final OperationCallable<DeleteReplicationRequest,com.google.protobuf.Empty, deleteReplicationOperationCallable()OperationMetadata> Deletes a replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteReplicationRequest request = DeleteReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteReplicationOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteReplicationCallable
Deletes a replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteReplicationRequest request = DeleteReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteReplicationCallable().futureCall(request); // Do something. future.get(); } -
updateReplicationAsync
public final OperationFuture<Replication,OperationMetadata> updateReplicationAsync(Replication replication, com.google.protobuf.FieldMask updateMask) Updates the settings of a specific replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { Replication replication = Replication.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Replication response = netAppClient.updateReplicationAsync(replication, updateMask).get(); }- Parameters:
replication- Required. A replication resourceupdateMask- Required. Mask of fields to update. At least one path must be supplied in this field.- Throws:
ApiException- if the remote call fails
-
updateReplicationAsync
public final OperationFuture<Replication,OperationMetadata> updateReplicationAsync(UpdateReplicationRequest request) Updates the settings of a specific replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateReplicationRequest request = UpdateReplicationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setReplication(Replication.newBuilder().build()) .build(); Replication response = netAppClient.updateReplicationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateReplicationOperationCallable
public final OperationCallable<UpdateReplicationRequest,Replication, updateReplicationOperationCallable()OperationMetadata> Updates the settings of a specific replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateReplicationRequest request = UpdateReplicationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setReplication(Replication.newBuilder().build()) .build(); OperationFuture<Replication, OperationMetadata> future = netAppClient.updateReplicationOperationCallable().futureCall(request); // Do something. Replication response = future.get(); } -
updateReplicationCallable
Updates the settings of a specific replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateReplicationRequest request = UpdateReplicationRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setReplication(Replication.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateReplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
stopReplicationAsync
public final OperationFuture<Replication,OperationMetadata> stopReplicationAsync(StopReplicationRequest request) Stop Cross Region Replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { StopReplicationRequest request = StopReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .setForce(true) .build(); Replication response = netAppClient.stopReplicationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
stopReplicationOperationCallable
public final OperationCallable<StopReplicationRequest,Replication, stopReplicationOperationCallable()OperationMetadata> Stop Cross Region Replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { StopReplicationRequest request = StopReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .setForce(true) .build(); OperationFuture<Replication, OperationMetadata> future = netAppClient.stopReplicationOperationCallable().futureCall(request); // Do something. Replication response = future.get(); } -
stopReplicationCallable
Stop Cross Region Replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { StopReplicationRequest request = StopReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .setForce(true) .build(); ApiFuture<Operation> future = netAppClient.stopReplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
resumeReplicationAsync
public final OperationFuture<Replication,OperationMetadata> resumeReplicationAsync(ResumeReplicationRequest request) Resume Cross Region Replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ResumeReplicationRequest request = ResumeReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); Replication response = netAppClient.resumeReplicationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
resumeReplicationOperationCallable
public final OperationCallable<ResumeReplicationRequest,Replication, resumeReplicationOperationCallable()OperationMetadata> Resume Cross Region Replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ResumeReplicationRequest request = ResumeReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); OperationFuture<Replication, OperationMetadata> future = netAppClient.resumeReplicationOperationCallable().futureCall(request); // Do something. Replication response = future.get(); } -
resumeReplicationCallable
Resume Cross Region Replication.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ResumeReplicationRequest request = ResumeReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); ApiFuture<Operation> future = netAppClient.resumeReplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
reverseReplicationDirectionAsync
public final OperationFuture<Replication,OperationMetadata> reverseReplicationDirectionAsync(ReverseReplicationDirectionRequest request) Reverses direction of replication. Source becomes destination and destination becomes source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ReverseReplicationDirectionRequest request = ReverseReplicationDirectionRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); Replication response = netAppClient.reverseReplicationDirectionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
reverseReplicationDirectionOperationCallable
public final OperationCallable<ReverseReplicationDirectionRequest,Replication, reverseReplicationDirectionOperationCallable()OperationMetadata> Reverses direction of replication. Source becomes destination and destination becomes source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ReverseReplicationDirectionRequest request = ReverseReplicationDirectionRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); OperationFuture<Replication, OperationMetadata> future = netAppClient.reverseReplicationDirectionOperationCallable().futureCall(request); // Do something. Replication response = future.get(); } -
reverseReplicationDirectionCallable
public final UnaryCallable<ReverseReplicationDirectionRequest,Operation> reverseReplicationDirectionCallable()Reverses direction of replication. Source becomes destination and destination becomes source.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ReverseReplicationDirectionRequest request = ReverseReplicationDirectionRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); ApiFuture<Operation> future = netAppClient.reverseReplicationDirectionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
establishPeeringAsync
public final OperationFuture<Replication,OperationMetadata> establishPeeringAsync(EstablishPeeringRequest request) Establish replication peering.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EstablishPeeringRequest request = EstablishPeeringRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .setPeerClusterName("peerClusterName313022691") .setPeerSvmName("peerSvmName1014209619") .addAllPeerIpAddresses(new ArrayList<String>()) .setPeerVolumeName("peerVolumeName1542206407") .build(); Replication response = netAppClient.establishPeeringAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
establishPeeringOperationCallable
public final OperationCallable<EstablishPeeringRequest,Replication, establishPeeringOperationCallable()OperationMetadata> Establish replication peering.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EstablishPeeringRequest request = EstablishPeeringRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .setPeerClusterName("peerClusterName313022691") .setPeerSvmName("peerSvmName1014209619") .addAllPeerIpAddresses(new ArrayList<String>()) .setPeerVolumeName("peerVolumeName1542206407") .build(); OperationFuture<Replication, OperationMetadata> future = netAppClient.establishPeeringOperationCallable().futureCall(request); // Do something. Replication response = future.get(); } -
establishPeeringCallable
Establish replication peering.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { EstablishPeeringRequest request = EstablishPeeringRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .setPeerClusterName("peerClusterName313022691") .setPeerSvmName("peerSvmName1014209619") .addAllPeerIpAddresses(new ArrayList<String>()) .setPeerVolumeName("peerVolumeName1542206407") .build(); ApiFuture<Operation> future = netAppClient.establishPeeringCallable().futureCall(request); // Do something. Operation response = future.get(); } -
syncReplicationAsync
public final OperationFuture<Replication,OperationMetadata> syncReplicationAsync(SyncReplicationRequest request) Syncs the replication. This will invoke one time volume data transfer from source to destination.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { SyncReplicationRequest request = SyncReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); Replication response = netAppClient.syncReplicationAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
syncReplicationOperationCallable
public final OperationCallable<SyncReplicationRequest,Replication, syncReplicationOperationCallable()OperationMetadata> Syncs the replication. This will invoke one time volume data transfer from source to destination.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { SyncReplicationRequest request = SyncReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); OperationFuture<Replication, OperationMetadata> future = netAppClient.syncReplicationOperationCallable().futureCall(request); // Do something. Replication response = future.get(); } -
syncReplicationCallable
Syncs the replication. This will invoke one time volume data transfer from source to destination.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { SyncReplicationRequest request = SyncReplicationRequest.newBuilder() .setName( ReplicationName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[REPLICATION]") .toString()) .build(); ApiFuture<Operation> future = netAppClient.syncReplicationCallable().futureCall(request); // Do something. Operation response = future.get(); } -
createBackupVaultAsync
public final OperationFuture<BackupVault,OperationMetadata> createBackupVaultAsync(LocationName parent, BackupVault backupVault, String backupVaultId) Creates new backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); BackupVault backupVault = BackupVault.newBuilder().build(); String backupVaultId = "backupVaultId-1897432373"; BackupVault response = netAppClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); }- Parameters:
parent- Required. The location to create the backup vaults, in the format `projects/{project_id}/locations/{location}`backupVault- Required. A backupVault resourcebackupVaultId- Required. The ID to use for the backupVault. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createBackupVaultAsync
public final OperationFuture<BackupVault,OperationMetadata> createBackupVaultAsync(String parent, BackupVault backupVault, String backupVaultId) Creates new backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); BackupVault backupVault = BackupVault.newBuilder().build(); String backupVaultId = "backupVaultId-1897432373"; BackupVault response = netAppClient.createBackupVaultAsync(parent, backupVault, backupVaultId).get(); }- Parameters:
parent- Required. The location to create the backup vaults, in the format `projects/{project_id}/locations/{location}`backupVault- Required. A backupVault resourcebackupVaultId- Required. The ID to use for the backupVault. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createBackupVaultAsync
public final OperationFuture<BackupVault,OperationMetadata> createBackupVaultAsync(CreateBackupVaultRequest request) Creates new backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupVaultRequest request = CreateBackupVaultRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupVaultId("backupVaultId-1897432373") .setBackupVault(BackupVault.newBuilder().build()) .build(); BackupVault response = netAppClient.createBackupVaultAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createBackupVaultOperationCallable
public final OperationCallable<CreateBackupVaultRequest,BackupVault, createBackupVaultOperationCallable()OperationMetadata> Creates new backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupVaultRequest request = CreateBackupVaultRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupVaultId("backupVaultId-1897432373") .setBackupVault(BackupVault.newBuilder().build()) .build(); OperationFuture<BackupVault, OperationMetadata> future = netAppClient.createBackupVaultOperationCallable().futureCall(request); // Do something. BackupVault response = future.get(); } -
createBackupVaultCallable
Creates new backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupVaultRequest request = CreateBackupVaultRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupVaultId("backupVaultId-1897432373") .setBackupVault(BackupVault.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.createBackupVaultCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getBackupVault
Returns the description of the specified backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); BackupVault response = netAppClient.getBackupVault(name); }- Parameters:
name- Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`- Throws:
ApiException- if the remote call fails
-
getBackupVault
Returns the description of the specified backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString(); BackupVault response = netAppClient.getBackupVault(name); }- Parameters:
name- Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`- Throws:
ApiException- if the remote call fails
-
getBackupVault
Returns the description of the specified backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetBackupVaultRequest request = GetBackupVaultRequest.newBuilder() .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .build(); BackupVault response = netAppClient.getBackupVault(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getBackupVaultCallable
Returns the description of the specified backup vaultSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetBackupVaultRequest request = GetBackupVaultRequest.newBuilder() .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .build(); ApiFuture<BackupVault> future = netAppClient.getBackupVaultCallable().futureCall(request); // Do something. BackupVault response = future.get(); } -
listBackupVaults
Returns list of all available backup vaults.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (BackupVault element : netAppClient.listBackupVaults(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The location for which to retrieve backupVault information, in the format `projects/{project_id}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listBackupVaults
Returns list of all available backup vaults.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (BackupVault element : netAppClient.listBackupVaults(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The location for which to retrieve backupVault information, in the format `projects/{project_id}/locations/{location}`.- Throws:
ApiException- if the remote call fails
-
listBackupVaults
public final NetAppClient.ListBackupVaultsPagedResponse listBackupVaults(ListBackupVaultsRequest request) Returns list of all available backup vaults.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupVaultsRequest request = ListBackupVaultsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); for (BackupVault element : netAppClient.listBackupVaults(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listBackupVaultsPagedCallable
public final UnaryCallable<ListBackupVaultsRequest,NetAppClient.ListBackupVaultsPagedResponse> listBackupVaultsPagedCallable()Returns list of all available backup vaults.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupVaultsRequest request = ListBackupVaultsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); ApiFuture<BackupVault> future = netAppClient.listBackupVaultsPagedCallable().futureCall(request); // Do something. for (BackupVault element : future.get().iterateAll()) { // doThingsWith(element); } } -
listBackupVaultsCallable
public final UnaryCallable<ListBackupVaultsRequest,ListBackupVaultsResponse> listBackupVaultsCallable()Returns list of all available backup vaults.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupVaultsRequest request = ListBackupVaultsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); while (true) { ListBackupVaultsResponse response = netAppClient.listBackupVaultsCallable().call(request); for (BackupVault element : response.getBackupVaultsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
updateBackupVaultAsync
public final OperationFuture<BackupVault,OperationMetadata> updateBackupVaultAsync(BackupVault backupVault, com.google.protobuf.FieldMask updateMask) Updates the settings of a specific backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupVault backupVault = BackupVault.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); BackupVault response = netAppClient.updateBackupVaultAsync(backupVault, updateMask).get(); }- Parameters:
backupVault- Required. The backupVault being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Backup resource to be updated. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateBackupVaultAsync
public final OperationFuture<BackupVault,OperationMetadata> updateBackupVaultAsync(UpdateBackupVaultRequest request) Updates the settings of a specific backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupVaultRequest request = UpdateBackupVaultRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackupVault(BackupVault.newBuilder().build()) .build(); BackupVault response = netAppClient.updateBackupVaultAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateBackupVaultOperationCallable
public final OperationCallable<UpdateBackupVaultRequest,BackupVault, updateBackupVaultOperationCallable()OperationMetadata> Updates the settings of a specific backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupVaultRequest request = UpdateBackupVaultRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackupVault(BackupVault.newBuilder().build()) .build(); OperationFuture<BackupVault, OperationMetadata> future = netAppClient.updateBackupVaultOperationCallable().futureCall(request); // Do something. BackupVault response = future.get(); } -
updateBackupVaultCallable
Updates the settings of a specific backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupVaultRequest request = UpdateBackupVaultRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackupVault(BackupVault.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateBackupVaultCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteBackupVaultAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupVaultAsync(BackupVaultName name) Warning! This operation will permanently delete the backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupVaultName name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); netAppClient.deleteBackupVaultAsync(name).get(); }- Parameters:
name- Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`- Throws:
ApiException- if the remote call fails
-
deleteBackupVaultAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupVaultAsync(String name) Warning! This operation will permanently delete the backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString(); netAppClient.deleteBackupVaultAsync(name).get(); }- Parameters:
name- Required. The backupVault resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`- Throws:
ApiException- if the remote call fails
-
deleteBackupVaultAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupVaultAsync(DeleteBackupVaultRequest request) Warning! This operation will permanently delete the backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupVaultRequest request = DeleteBackupVaultRequest.newBuilder() .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .build(); netAppClient.deleteBackupVaultAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteBackupVaultOperationCallable
public final OperationCallable<DeleteBackupVaultRequest,com.google.protobuf.Empty, deleteBackupVaultOperationCallable()OperationMetadata> Warning! This operation will permanently delete the backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupVaultRequest request = DeleteBackupVaultRequest.newBuilder() .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteBackupVaultOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteBackupVaultCallable
Warning! This operation will permanently delete the backup vault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupVaultRequest request = DeleteBackupVaultRequest.newBuilder() .setName(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteBackupVaultCallable().futureCall(request); // Do something. future.get(); } -
createBackupAsync
public final OperationFuture<Backup,OperationMetadata> createBackupAsync(BackupVaultName parent, Backup backup, String backupId) Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); Backup backup = Backup.newBuilder().build(); String backupId = "backupId2121930365"; Backup response = netAppClient.createBackupAsync(parent, backup, backupId).get(); }- Parameters:
parent- Required. The NetApp backupVault to create the backups of, in the format `projects/*/locations/*/backupVaults/{backup_vault_id}`backup- Required. A backup resourcebackupId- Required. The ID to use for the backup. The ID must be unique within the specified backupVault. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createBackupAsync
public final OperationFuture<Backup,OperationMetadata> createBackupAsync(String parent, Backup backup, String backupId) Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString(); Backup backup = Backup.newBuilder().build(); String backupId = "backupId2121930365"; Backup response = netAppClient.createBackupAsync(parent, backup, backupId).get(); }- Parameters:
parent- Required. The NetApp backupVault to create the backups of, in the format `projects/*/locations/*/backupVaults/{backup_vault_id}`backup- Required. A backup resourcebackupId- Required. The ID to use for the backup. The ID must be unique within the specified backupVault. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createBackupAsync
public final OperationFuture<Backup,OperationMetadata> createBackupAsync(CreateBackupRequest request) Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupRequest request = CreateBackupRequest.newBuilder() .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .setBackupId("backupId2121930365") .setBackup(Backup.newBuilder().build()) .build(); Backup response = netAppClient.createBackupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createBackupOperationCallable
public final OperationCallable<CreateBackupRequest,Backup, createBackupOperationCallable()OperationMetadata> Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupRequest request = CreateBackupRequest.newBuilder() .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .setBackupId("backupId2121930365") .setBackup(Backup.newBuilder().build()) .build(); OperationFuture<Backup, OperationMetadata> future = netAppClient.createBackupOperationCallable().futureCall(request); // Do something. Backup response = future.get(); } -
createBackupCallable
Creates a backup from the volume specified in the request The backup can be created from the given snapshot if specified in the request. If no snapshot specified, there'll be a new snapshot taken to initiate the backup creation.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupRequest request = CreateBackupRequest.newBuilder() .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .setBackupId("backupId2121930365") .setBackup(Backup.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.createBackupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getBackup
Returns the description of the specified backupSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); Backup response = netAppClient.getBackup(name); }- Parameters:
name- Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`- Throws:
ApiException- if the remote call fails
-
getBackup
Returns the description of the specified backupSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString(); Backup response = netAppClient.getBackup(name); }- Parameters:
name- Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`- Throws:
ApiException- if the remote call fails
-
getBackup
Returns the description of the specified backupSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetBackupRequest request = GetBackupRequest.newBuilder() .setName( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) .build(); Backup response = netAppClient.getBackup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getBackupCallable
Returns the description of the specified backupSample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetBackupRequest request = GetBackupRequest.newBuilder() .setName( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) .build(); ApiFuture<Backup> future = netAppClient.getBackupCallable().futureCall(request); // Do something. Backup response = future.get(); } -
listBackups
Returns descriptions of all backups for a backupVault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupVaultName parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]"); for (Backup element : netAppClient.listBackups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The backupVault for which to retrieve backup information, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve backup information for all locations, use "-" for the `{location}` value. To retrieve backup information for all backupVaults, use "-" for the `{backup_vault_id}` value. To retrieve backup information for a volume, use "-" for the `{backup_vault_id}` value and specify volume full name with the filter.- Throws:
ApiException- if the remote call fails
-
listBackups
Returns descriptions of all backups for a backupVault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString(); for (Backup element : netAppClient.listBackups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The backupVault for which to retrieve backup information, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}`. To retrieve backup information for all locations, use "-" for the `{location}` value. To retrieve backup information for all backupVaults, use "-" for the `{backup_vault_id}` value. To retrieve backup information for a volume, use "-" for the `{backup_vault_id}` value and specify volume full name with the filter.- Throws:
ApiException- if the remote call fails
-
listBackups
Returns descriptions of all backups for a backupVault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupsRequest request = ListBackupsRequest.newBuilder() .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); for (Backup element : netAppClient.listBackups(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listBackupsPagedCallable
public final UnaryCallable<ListBackupsRequest,NetAppClient.ListBackupsPagedResponse> listBackupsPagedCallable()Returns descriptions of all backups for a backupVault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupsRequest request = ListBackupsRequest.newBuilder() .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); ApiFuture<Backup> future = netAppClient.listBackupsPagedCallable().futureCall(request); // Do something. for (Backup element : future.get().iterateAll()) { // doThingsWith(element); } } -
listBackupsCallable
Returns descriptions of all backups for a backupVault.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupsRequest request = ListBackupsRequest.newBuilder() .setParent(BackupVaultName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setOrderBy("orderBy-1207110587") .setFilter("filter-1274492040") .build(); while (true) { ListBackupsResponse response = netAppClient.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; } } } -
deleteBackupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(BackupName name) Warning! This operation will permanently delete the backup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]"); netAppClient.deleteBackupAsync(name).get(); }- Parameters:
name- Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`- Throws:
ApiException- if the remote call fails
-
deleteBackupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(String name) Warning! This operation will permanently delete the backup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString(); netAppClient.deleteBackupAsync(name).get(); }- Parameters:
name- Required. The backup resource name, in the format `projects/{project_id}/locations/{location}/backupVaults/{backup_vault_id}/backups/{backup_id}`- Throws:
ApiException- if the remote call fails
-
deleteBackupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupAsync(DeleteBackupRequest request) Warning! This operation will permanently delete the backup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupRequest request = DeleteBackupRequest.newBuilder() .setName( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) .build(); netAppClient.deleteBackupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteBackupOperationCallable
public final OperationCallable<DeleteBackupRequest,com.google.protobuf.Empty, deleteBackupOperationCallable()OperationMetadata> Warning! This operation will permanently delete the backup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupRequest request = DeleteBackupRequest.newBuilder() .setName( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteBackupOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteBackupCallable
Warning! This operation will permanently delete the backup.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupRequest request = DeleteBackupRequest.newBuilder() .setName( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteBackupCallable().futureCall(request); // Do something. future.get(); } -
updateBackupAsync
public final OperationFuture<Backup,OperationMetadata> updateBackupAsync(Backup backup, com.google.protobuf.FieldMask updateMask) Update backup with full spec.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { Backup backup = Backup.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); Backup response = netAppClient.updateBackupAsync(backup, updateMask).get(); }- Parameters:
backup- Required. The backup being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Backup resource to be updated. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateBackupAsync
public final OperationFuture<Backup,OperationMetadata> updateBackupAsync(UpdateBackupRequest request) Update backup with full spec.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupRequest request = UpdateBackupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackup(Backup.newBuilder().build()) .build(); Backup response = netAppClient.updateBackupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateBackupOperationCallable
public final OperationCallable<UpdateBackupRequest,Backup, updateBackupOperationCallable()OperationMetadata> Update backup with full spec.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupRequest request = UpdateBackupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackup(Backup.newBuilder().build()) .build(); OperationFuture<Backup, OperationMetadata> future = netAppClient.updateBackupOperationCallable().futureCall(request); // Do something. Backup response = future.get(); } -
updateBackupCallable
Update backup with full spec.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupRequest request = UpdateBackupRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackup(Backup.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateBackupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
createBackupPolicyAsync
public final OperationFuture<BackupPolicy,OperationMetadata> createBackupPolicyAsync(LocationName parent, BackupPolicy backupPolicy, String backupPolicyId) Creates new backup policySample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); String backupPolicyId = "backupPolicyId-1278533169"; BackupPolicy response = netAppClient.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); }- Parameters:
parent- Required. The location to create the backup policies of, in the format `projects/{project_id}/locations/{location}`backupPolicy- Required. A backupPolicy resourcebackupPolicyId- Required. The ID to use for the backup policy. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createBackupPolicyAsync
public final OperationFuture<BackupPolicy,OperationMetadata> createBackupPolicyAsync(String parent, BackupPolicy backupPolicy, String backupPolicyId) Creates new backup policySample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); String backupPolicyId = "backupPolicyId-1278533169"; BackupPolicy response = netAppClient.createBackupPolicyAsync(parent, backupPolicy, backupPolicyId).get(); }- Parameters:
parent- Required. The location to create the backup policies of, in the format `projects/{project_id}/locations/{location}`backupPolicy- Required. A backupPolicy resourcebackupPolicyId- Required. The ID to use for the backup policy. The ID must be unique within the specified location. Must contain only letters, numbers and hyphen, with the first character a letter, the last a letter or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createBackupPolicyAsync
public final OperationFuture<BackupPolicy,OperationMetadata> createBackupPolicyAsync(CreateBackupPolicyRequest request) Creates new backup policySample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupPolicyRequest request = CreateBackupPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupPolicy(BackupPolicy.newBuilder().build()) .setBackupPolicyId("backupPolicyId-1278533169") .build(); BackupPolicy response = netAppClient.createBackupPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createBackupPolicyOperationCallable
public final OperationCallable<CreateBackupPolicyRequest,BackupPolicy, createBackupPolicyOperationCallable()OperationMetadata> Creates new backup policySample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupPolicyRequest request = CreateBackupPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupPolicy(BackupPolicy.newBuilder().build()) .setBackupPolicyId("backupPolicyId-1278533169") .build(); OperationFuture<BackupPolicy, OperationMetadata> future = netAppClient.createBackupPolicyOperationCallable().futureCall(request); // Do something. BackupPolicy response = future.get(); } -
createBackupPolicyCallable
Creates new backup policySample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateBackupPolicyRequest request = CreateBackupPolicyRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setBackupPolicy(BackupPolicy.newBuilder().build()) .setBackupPolicyId("backupPolicyId-1278533169") .build(); ApiFuture<Operation> future = netAppClient.createBackupPolicyCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getBackupPolicy
Returns the description of the specified backup policy by backup_policy_id.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); BackupPolicy response = netAppClient.getBackupPolicy(name); }- Parameters:
name- Required. The backupPolicy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`- Throws:
ApiException- if the remote call fails
-
getBackupPolicy
Returns the description of the specified backup policy by backup_policy_id.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString(); BackupPolicy response = netAppClient.getBackupPolicy(name); }- Parameters:
name- Required. The backupPolicy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`- Throws:
ApiException- if the remote call fails
-
getBackupPolicy
Returns the description of the specified backup policy by backup_policy_id.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetBackupPolicyRequest request = GetBackupPolicyRequest.newBuilder() .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) .build(); BackupPolicy response = netAppClient.getBackupPolicy(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getBackupPolicyCallable
Returns the description of the specified backup policy by backup_policy_id.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetBackupPolicyRequest request = GetBackupPolicyRequest.newBuilder() .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) .build(); ApiFuture<BackupPolicy> future = netAppClient.getBackupPolicyCallable().futureCall(request); // Do something. BackupPolicy response = future.get(); } -
listBackupPolicies
Returns list of all available backup policies.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (BackupPolicy element : netAppClient.listBackupPolicies(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListBackupPoliciesRequest- Throws:
ApiException- if the remote call fails
-
listBackupPolicies
Returns list of all available backup policies.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (BackupPolicy element : netAppClient.listBackupPolicies(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListBackupPoliciesRequest- Throws:
ApiException- if the remote call fails
-
listBackupPolicies
public final NetAppClient.ListBackupPoliciesPagedResponse listBackupPolicies(ListBackupPoliciesRequest request) Returns list of all available backup policies.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupPoliciesRequest request = ListBackupPoliciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (BackupPolicy element : netAppClient.listBackupPolicies(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listBackupPoliciesPagedCallable
public final UnaryCallable<ListBackupPoliciesRequest,NetAppClient.ListBackupPoliciesPagedResponse> listBackupPoliciesPagedCallable()Returns list of all available backup policies.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupPoliciesRequest request = ListBackupPoliciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<BackupPolicy> future = netAppClient.listBackupPoliciesPagedCallable().futureCall(request); // Do something. for (BackupPolicy element : future.get().iterateAll()) { // doThingsWith(element); } } -
listBackupPoliciesCallable
public final UnaryCallable<ListBackupPoliciesRequest,ListBackupPoliciesResponse> listBackupPoliciesCallable()Returns list of all available backup policies.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListBackupPoliciesRequest request = ListBackupPoliciesRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListBackupPoliciesResponse response = netAppClient.listBackupPoliciesCallable().call(request); for (BackupPolicy element : response.getBackupPoliciesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
updateBackupPolicyAsync
public final OperationFuture<BackupPolicy,OperationMetadata> updateBackupPolicyAsync(BackupPolicy backupPolicy, com.google.protobuf.FieldMask updateMask) Updates settings of a specific backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupPolicy backupPolicy = BackupPolicy.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); BackupPolicy response = netAppClient.updateBackupPolicyAsync(backupPolicy, updateMask).get(); }- Parameters:
backupPolicy- Required. The backup policy being updatedupdateMask- Required. Field mask is used to specify the fields to be overwritten in the Backup Policy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateBackupPolicyAsync
public final OperationFuture<BackupPolicy,OperationMetadata> updateBackupPolicyAsync(UpdateBackupPolicyRequest request) Updates settings of a specific backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupPolicyRequest request = UpdateBackupPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackupPolicy(BackupPolicy.newBuilder().build()) .build(); BackupPolicy response = netAppClient.updateBackupPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateBackupPolicyOperationCallable
public final OperationCallable<UpdateBackupPolicyRequest,BackupPolicy, updateBackupPolicyOperationCallable()OperationMetadata> Updates settings of a specific backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupPolicyRequest request = UpdateBackupPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackupPolicy(BackupPolicy.newBuilder().build()) .build(); OperationFuture<BackupPolicy, OperationMetadata> future = netAppClient.updateBackupPolicyOperationCallable().futureCall(request); // Do something. BackupPolicy response = future.get(); } -
updateBackupPolicyCallable
Updates settings of a specific backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateBackupPolicyRequest request = UpdateBackupPolicyRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setBackupPolicy(BackupPolicy.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateBackupPolicyCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteBackupPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupPolicyAsync(BackupPolicyName name) Warning! This operation will permanently delete the backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { BackupPolicyName name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]"); netAppClient.deleteBackupPolicyAsync(name).get(); }- Parameters:
name- Required. The backup policy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`- Throws:
ApiException- if the remote call fails
-
deleteBackupPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupPolicyAsync(String name) Warning! This operation will permanently delete the backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString(); netAppClient.deleteBackupPolicyAsync(name).get(); }- Parameters:
name- Required. The backup policy resource name, in the format `projects/{project_id}/locations/{location}/backupPolicies/{backup_policy_id}`- Throws:
ApiException- if the remote call fails
-
deleteBackupPolicyAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteBackupPolicyAsync(DeleteBackupPolicyRequest request) Warning! This operation will permanently delete the backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupPolicyRequest request = DeleteBackupPolicyRequest.newBuilder() .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) .build(); netAppClient.deleteBackupPolicyAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteBackupPolicyOperationCallable
public final OperationCallable<DeleteBackupPolicyRequest,com.google.protobuf.Empty, deleteBackupPolicyOperationCallable()OperationMetadata> Warning! This operation will permanently delete the backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupPolicyRequest request = DeleteBackupPolicyRequest.newBuilder() .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteBackupPolicyOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteBackupPolicyCallable
Warning! This operation will permanently delete the backup policy.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteBackupPolicyRequest request = DeleteBackupPolicyRequest.newBuilder() .setName(BackupPolicyName.of("[PROJECT]", "[LOCATION]", "[BACKUP_POLICY]").toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteBackupPolicyCallable().futureCall(request); // Do something. future.get(); } -
listQuotaRules
Returns list of all quota rules in a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); for (QuotaRule element : netAppClient.listQuotaRules(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListQuotaRulesRequest- Throws:
ApiException- if the remote call fails
-
listQuotaRules
Returns list of all quota rules in a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); for (QuotaRule element : netAppClient.listQuotaRules(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListQuotaRulesRequest- Throws:
ApiException- if the remote call fails
-
listQuotaRules
Returns list of all quota rules in a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListQuotaRulesRequest request = ListQuotaRulesRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (QuotaRule element : netAppClient.listQuotaRules(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listQuotaRulesPagedCallable
public final UnaryCallable<ListQuotaRulesRequest,NetAppClient.ListQuotaRulesPagedResponse> listQuotaRulesPagedCallable()Returns list of all quota rules in a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListQuotaRulesRequest request = ListQuotaRulesRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<QuotaRule> future = netAppClient.listQuotaRulesPagedCallable().futureCall(request); // Do something. for (QuotaRule element : future.get().iterateAll()) { // doThingsWith(element); } } -
listQuotaRulesCallable
Returns list of all quota rules in a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListQuotaRulesRequest request = ListQuotaRulesRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListQuotaRulesResponse response = netAppClient.listQuotaRulesCallable().call(request); for (QuotaRule element : response.getQuotaRulesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getQuotaRule
Returns details of the specified quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { QuotaRuleName name = QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]"); QuotaRule response = netAppClient.getQuotaRule(name); }- Parameters:
name- Required. Name of the quota rule- Throws:
ApiException- if the remote call fails
-
getQuotaRule
Returns details of the specified quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]").toString(); QuotaRule response = netAppClient.getQuotaRule(name); }- Parameters:
name- Required. Name of the quota rule- Throws:
ApiException- if the remote call fails
-
getQuotaRule
Returns details of the specified quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetQuotaRuleRequest request = GetQuotaRuleRequest.newBuilder() .setName( QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]") .toString()) .build(); QuotaRule response = netAppClient.getQuotaRule(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getQuotaRuleCallable
Returns details of the specified quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetQuotaRuleRequest request = GetQuotaRuleRequest.newBuilder() .setName( QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]") .toString()) .build(); ApiFuture<QuotaRule> future = netAppClient.getQuotaRuleCallable().futureCall(request); // Do something. QuotaRule response = future.get(); } -
createQuotaRuleAsync
public final OperationFuture<QuotaRule,OperationMetadata> createQuotaRuleAsync(VolumeName parent, QuotaRule quotaRule, String quotaRuleId) Creates a new quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { VolumeName parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]"); QuotaRule quotaRule = QuotaRule.newBuilder().build(); String quotaRuleId = "quotaRuleId1476739535"; QuotaRule response = netAppClient.createQuotaRuleAsync(parent, quotaRule, quotaRuleId).get(); }- Parameters:
parent- Required. Parent value for CreateQuotaRuleRequestquotaRule- Required. Fields of the to be created quota rule.quotaRuleId- Required. ID of the quota rule to create. Must be unique within the parent resource. Must contain only letters, numbers, underscore and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createQuotaRuleAsync
public final OperationFuture<QuotaRule,OperationMetadata> createQuotaRuleAsync(String parent, QuotaRule quotaRule, String quotaRuleId) Creates a new quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString(); QuotaRule quotaRule = QuotaRule.newBuilder().build(); String quotaRuleId = "quotaRuleId1476739535"; QuotaRule response = netAppClient.createQuotaRuleAsync(parent, quotaRule, quotaRuleId).get(); }- Parameters:
parent- Required. Parent value for CreateQuotaRuleRequestquotaRule- Required. Fields of the to be created quota rule.quotaRuleId- Required. ID of the quota rule to create. Must be unique within the parent resource. Must contain only letters, numbers, underscore and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createQuotaRuleAsync
public final OperationFuture<QuotaRule,OperationMetadata> createQuotaRuleAsync(CreateQuotaRuleRequest request) Creates a new quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateQuotaRuleRequest request = CreateQuotaRuleRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setQuotaRule(QuotaRule.newBuilder().build()) .setQuotaRuleId("quotaRuleId1476739535") .build(); QuotaRule response = netAppClient.createQuotaRuleAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createQuotaRuleOperationCallable
public final OperationCallable<CreateQuotaRuleRequest,QuotaRule, createQuotaRuleOperationCallable()OperationMetadata> Creates a new quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateQuotaRuleRequest request = CreateQuotaRuleRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setQuotaRule(QuotaRule.newBuilder().build()) .setQuotaRuleId("quotaRuleId1476739535") .build(); OperationFuture<QuotaRule, OperationMetadata> future = netAppClient.createQuotaRuleOperationCallable().futureCall(request); // Do something. QuotaRule response = future.get(); } -
createQuotaRuleCallable
Creates a new quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateQuotaRuleRequest request = CreateQuotaRuleRequest.newBuilder() .setParent(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setQuotaRule(QuotaRule.newBuilder().build()) .setQuotaRuleId("quotaRuleId1476739535") .build(); ApiFuture<Operation> future = netAppClient.createQuotaRuleCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateQuotaRuleAsync
public final OperationFuture<QuotaRule,OperationMetadata> updateQuotaRuleAsync(QuotaRule quotaRule, com.google.protobuf.FieldMask updateMask) Updates a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { QuotaRule quotaRule = QuotaRule.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); QuotaRule response = netAppClient.updateQuotaRuleAsync(quotaRule, updateMask).get(); }- Parameters:
quotaRule- Required. The quota rule being updatedupdateMask- Optional. Field mask is used to specify the fields to be overwritten in the Quota Rule resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.- Throws:
ApiException- if the remote call fails
-
updateQuotaRuleAsync
public final OperationFuture<QuotaRule,OperationMetadata> updateQuotaRuleAsync(UpdateQuotaRuleRequest request) Updates a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateQuotaRuleRequest request = UpdateQuotaRuleRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setQuotaRule(QuotaRule.newBuilder().build()) .build(); QuotaRule response = netAppClient.updateQuotaRuleAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateQuotaRuleOperationCallable
public final OperationCallable<UpdateQuotaRuleRequest,QuotaRule, updateQuotaRuleOperationCallable()OperationMetadata> Updates a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateQuotaRuleRequest request = UpdateQuotaRuleRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setQuotaRule(QuotaRule.newBuilder().build()) .build(); OperationFuture<QuotaRule, OperationMetadata> future = netAppClient.updateQuotaRuleOperationCallable().futureCall(request); // Do something. QuotaRule response = future.get(); } -
updateQuotaRuleCallable
Updates a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateQuotaRuleRequest request = UpdateQuotaRuleRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setQuotaRule(QuotaRule.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateQuotaRuleCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteQuotaRuleAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteQuotaRuleAsync(QuotaRuleName name) Deletes a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { QuotaRuleName name = QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]"); netAppClient.deleteQuotaRuleAsync(name).get(); }- Parameters:
name- Required. Name of the quota rule.- Throws:
ApiException- if the remote call fails
-
deleteQuotaRuleAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteQuotaRuleAsync(String name) Deletes a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]").toString(); netAppClient.deleteQuotaRuleAsync(name).get(); }- Parameters:
name- Required. Name of the quota rule.- Throws:
ApiException- if the remote call fails
-
deleteQuotaRuleAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteQuotaRuleAsync(DeleteQuotaRuleRequest request) Deletes a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteQuotaRuleRequest request = DeleteQuotaRuleRequest.newBuilder() .setName( QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]") .toString()) .build(); netAppClient.deleteQuotaRuleAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteQuotaRuleOperationCallable
public final OperationCallable<DeleteQuotaRuleRequest,com.google.protobuf.Empty, deleteQuotaRuleOperationCallable()OperationMetadata> Deletes a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteQuotaRuleRequest request = DeleteQuotaRuleRequest.newBuilder() .setName( QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]") .toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteQuotaRuleOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteQuotaRuleCallable
Deletes a quota rule.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteQuotaRuleRequest request = DeleteQuotaRuleRequest.newBuilder() .setName( QuotaRuleName.of("[PROJECT]", "[LOCATION]", "[VOLUME]", "[QUOTA_RULE]") .toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteQuotaRuleCallable().futureCall(request); // Do something. future.get(); } -
restoreBackupFilesAsync
public final OperationFuture<RestoreBackupFilesResponse,OperationMetadata> restoreBackupFilesAsync(RestoreBackupFilesRequest request) Restore files from a backup to a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { RestoreBackupFilesRequest request = RestoreBackupFilesRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setBackup( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) .addAllFileList(new ArrayList<String>()) .setRestoreDestinationPath("restoreDestinationPath-1614668571") .build(); RestoreBackupFilesResponse response = netAppClient.restoreBackupFilesAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
restoreBackupFilesOperationCallable
public final OperationCallable<RestoreBackupFilesRequest,RestoreBackupFilesResponse, restoreBackupFilesOperationCallable()OperationMetadata> Restore files from a backup to a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { RestoreBackupFilesRequest request = RestoreBackupFilesRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setBackup( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) .addAllFileList(new ArrayList<String>()) .setRestoreDestinationPath("restoreDestinationPath-1614668571") .build(); OperationFuture<RestoreBackupFilesResponse, OperationMetadata> future = netAppClient.restoreBackupFilesOperationCallable().futureCall(request); // Do something. RestoreBackupFilesResponse response = future.get(); } -
restoreBackupFilesCallable
Restore files from a backup to a volume.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { RestoreBackupFilesRequest request = RestoreBackupFilesRequest.newBuilder() .setName(VolumeName.of("[PROJECT]", "[LOCATION]", "[VOLUME]").toString()) .setBackup( BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_VAULT]", "[BACKUP]").toString()) .addAllFileList(new ArrayList<String>()) .setRestoreDestinationPath("restoreDestinationPath-1614668571") .build(); ApiFuture<Operation> future = netAppClient.restoreBackupFilesCallable().futureCall(request); // Do something. Operation response = future.get(); } -
listHostGroups
Returns a list of host groups in a `location`. Use `-` as location to list host groups across all locations.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (HostGroup element : netAppClient.listHostGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListHostGroupsRequest- Throws:
ApiException- if the remote call fails
-
listHostGroups
Returns a list of host groups in a `location`. Use `-` as location to list host groups across all locations.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (HostGroup element : netAppClient.listHostGroups(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. Parent value for ListHostGroupsRequest- Throws:
ApiException- if the remote call fails
-
listHostGroups
Returns a list of host groups in a `location`. Use `-` as location to list host groups across all locations.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListHostGroupsRequest request = ListHostGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); for (HostGroup element : netAppClient.listHostGroups(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listHostGroupsPagedCallable
public final UnaryCallable<ListHostGroupsRequest,NetAppClient.ListHostGroupsPagedResponse> listHostGroupsPagedCallable()Returns a list of host groups in a `location`. Use `-` as location to list host groups across all locations.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListHostGroupsRequest request = ListHostGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); ApiFuture<HostGroup> future = netAppClient.listHostGroupsPagedCallable().futureCall(request); // Do something. for (HostGroup element : future.get().iterateAll()) { // doThingsWith(element); } } -
listHostGroupsCallable
Returns a list of host groups in a `location`. Use `-` as location to list host groups across all locations.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListHostGroupsRequest request = ListHostGroupsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .setFilter("filter-1274492040") .setOrderBy("orderBy-1207110587") .build(); while (true) { ListHostGroupsResponse response = netAppClient.listHostGroupsCallable().call(request); for (HostGroup element : response.getHostGroupsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getHostGroup
Returns details of the specified host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { HostGroupName name = HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]"); HostGroup response = netAppClient.getHostGroup(name); }- Parameters:
name- Required. The resource name of the host group. Format: `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.- Throws:
ApiException- if the remote call fails
-
getHostGroup
Returns details of the specified host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]").toString(); HostGroup response = netAppClient.getHostGroup(name); }- Parameters:
name- Required. The resource name of the host group. Format: `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.- Throws:
ApiException- if the remote call fails
-
getHostGroup
Returns details of the specified host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetHostGroupRequest request = GetHostGroupRequest.newBuilder() .setName(HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]").toString()) .build(); HostGroup response = netAppClient.getHostGroup(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getHostGroupCallable
Returns details of the specified host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetHostGroupRequest request = GetHostGroupRequest.newBuilder() .setName(HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]").toString()) .build(); ApiFuture<HostGroup> future = netAppClient.getHostGroupCallable().futureCall(request); // Do something. HostGroup response = future.get(); } -
createHostGroupAsync
public final OperationFuture<HostGroup,OperationMetadata> createHostGroupAsync(LocationName parent, HostGroup hostGroup, String hostGroupId) Creates a new host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); HostGroup hostGroup = HostGroup.newBuilder().build(); String hostGroupId = "hostGroupId-1975725774"; HostGroup response = netAppClient.createHostGroupAsync(parent, hostGroup, hostGroupId).get(); }- Parameters:
parent- Required. Parent value for CreateHostGroupRequesthostGroup- Required. Fields of the host group to create.hostGroupId- Required. ID of the host group to create. Must be unique within the parent resource. Must contain only letters, numbers, and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createHostGroupAsync
public final OperationFuture<HostGroup,OperationMetadata> createHostGroupAsync(String parent, HostGroup hostGroup, String hostGroupId) Creates a new host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); HostGroup hostGroup = HostGroup.newBuilder().build(); String hostGroupId = "hostGroupId-1975725774"; HostGroup response = netAppClient.createHostGroupAsync(parent, hostGroup, hostGroupId).get(); }- Parameters:
parent- Required. Parent value for CreateHostGroupRequesthostGroup- Required. Fields of the host group to create.hostGroupId- Required. ID of the host group to create. Must be unique within the parent resource. Must contain only letters, numbers, and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.- Throws:
ApiException- if the remote call fails
-
createHostGroupAsync
public final OperationFuture<HostGroup,OperationMetadata> createHostGroupAsync(CreateHostGroupRequest request) Creates a new host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateHostGroupRequest request = CreateHostGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHostGroup(HostGroup.newBuilder().build()) .setHostGroupId("hostGroupId-1975725774") .build(); HostGroup response = netAppClient.createHostGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createHostGroupOperationCallable
public final OperationCallable<CreateHostGroupRequest,HostGroup, createHostGroupOperationCallable()OperationMetadata> Creates a new host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateHostGroupRequest request = CreateHostGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHostGroup(HostGroup.newBuilder().build()) .setHostGroupId("hostGroupId-1975725774") .build(); OperationFuture<HostGroup, OperationMetadata> future = netAppClient.createHostGroupOperationCallable().futureCall(request); // Do something. HostGroup response = future.get(); } -
createHostGroupCallable
Creates a new host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { CreateHostGroupRequest request = CreateHostGroupRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setHostGroup(HostGroup.newBuilder().build()) .setHostGroupId("hostGroupId-1975725774") .build(); ApiFuture<Operation> future = netAppClient.createHostGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
updateHostGroupAsync
public final OperationFuture<HostGroup,OperationMetadata> updateHostGroupAsync(HostGroup hostGroup, com.google.protobuf.FieldMask updateMask) Updates an existing host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { HostGroup hostGroup = HostGroup.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); HostGroup response = netAppClient.updateHostGroupAsync(hostGroup, updateMask).get(); }- Parameters:
hostGroup- Required. The host group to update. The host group's `name` field is used to identify the host group. Format: `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.updateMask- Optional. The list of fields to update.- Throws:
ApiException- if the remote call fails
-
updateHostGroupAsync
public final OperationFuture<HostGroup,OperationMetadata> updateHostGroupAsync(UpdateHostGroupRequest request) Updates an existing host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateHostGroupRequest request = UpdateHostGroupRequest.newBuilder() .setHostGroup(HostGroup.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); HostGroup response = netAppClient.updateHostGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateHostGroupOperationCallable
public final OperationCallable<UpdateHostGroupRequest,HostGroup, updateHostGroupOperationCallable()OperationMetadata> Updates an existing host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateHostGroupRequest request = UpdateHostGroupRequest.newBuilder() .setHostGroup(HostGroup.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); OperationFuture<HostGroup, OperationMetadata> future = netAppClient.updateHostGroupOperationCallable().futureCall(request); // Do something. HostGroup response = future.get(); } -
updateHostGroupCallable
Updates an existing host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { UpdateHostGroupRequest request = UpdateHostGroupRequest.newBuilder() .setHostGroup(HostGroup.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); ApiFuture<Operation> future = netAppClient.updateHostGroupCallable().futureCall(request); // Do something. Operation response = future.get(); } -
deleteHostGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHostGroupAsync(HostGroupName name) Deletes a host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { HostGroupName name = HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]"); netAppClient.deleteHostGroupAsync(name).get(); }- Parameters:
name- Required. The resource name of the host group. Format: `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.- Throws:
ApiException- if the remote call fails
-
deleteHostGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHostGroupAsync(String name) Deletes a host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { String name = HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]").toString(); netAppClient.deleteHostGroupAsync(name).get(); }- Parameters:
name- Required. The resource name of the host group. Format: `projects/{project_number}/locations/{location_id}/hostGroups/{host_group_id}`.- Throws:
ApiException- if the remote call fails
-
deleteHostGroupAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteHostGroupAsync(DeleteHostGroupRequest request) Deletes a host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteHostGroupRequest request = DeleteHostGroupRequest.newBuilder() .setName(HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]").toString()) .build(); netAppClient.deleteHostGroupAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteHostGroupOperationCallable
public final OperationCallable<DeleteHostGroupRequest,com.google.protobuf.Empty, deleteHostGroupOperationCallable()OperationMetadata> Deletes a host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteHostGroupRequest request = DeleteHostGroupRequest.newBuilder() .setName(HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = netAppClient.deleteHostGroupOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteHostGroupCallable
Deletes a host group.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { DeleteHostGroupRequest request = DeleteHostGroupRequest.newBuilder() .setName(HostGroupName.of("[PROJECT]", "[LOCATION]", "[HOST_GROUP]").toString()) .build(); ApiFuture<Operation> future = netAppClient.deleteHostGroupCallable().futureCall(request); // Do something. future.get(); } -
executeOntapPost
`ExecuteOntapPost` dispatches the ONTAP `POST` request to the `StoragePool` cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ExecuteOntapPostRequest request = ExecuteOntapPostRequest.newBuilder() .setBody(Struct.newBuilder().build()) .setOntapPath("ontapPath-1869187159") .build(); ExecuteOntapPostResponse response = netAppClient.executeOntapPost(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
executeOntapPostCallable
public final UnaryCallable<ExecuteOntapPostRequest,ExecuteOntapPostResponse> executeOntapPostCallable()`ExecuteOntapPost` dispatches the ONTAP `POST` request to the `StoragePool` cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ExecuteOntapPostRequest request = ExecuteOntapPostRequest.newBuilder() .setBody(Struct.newBuilder().build()) .setOntapPath("ontapPath-1869187159") .build(); ApiFuture<ExecuteOntapPostResponse> future = netAppClient.executeOntapPostCallable().futureCall(request); // Do something. ExecuteOntapPostResponse response = future.get(); } -
executeOntapGet
`ExecuteOntapGet` dispatches the ONTAP `GET` request to the `StoragePool` cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ExecuteOntapGetRequest request = ExecuteOntapGetRequest.newBuilder().setOntapPath("ontapPath-1869187159").build(); ExecuteOntapGetResponse response = netAppClient.executeOntapGet(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
executeOntapGetCallable
public final UnaryCallable<ExecuteOntapGetRequest,ExecuteOntapGetResponse> executeOntapGetCallable()`ExecuteOntapGet` dispatches the ONTAP `GET` request to the `StoragePool` cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ExecuteOntapGetRequest request = ExecuteOntapGetRequest.newBuilder().setOntapPath("ontapPath-1869187159").build(); ApiFuture<ExecuteOntapGetResponse> future = netAppClient.executeOntapGetCallable().futureCall(request); // Do something. ExecuteOntapGetResponse response = future.get(); } -
executeOntapDelete
`ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the `StoragePool` cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ExecuteOntapDeleteRequest request = ExecuteOntapDeleteRequest.newBuilder().setOntapPath("ontapPath-1869187159").build(); ExecuteOntapDeleteResponse response = netAppClient.executeOntapDelete(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
executeOntapDeleteCallable
public final UnaryCallable<ExecuteOntapDeleteRequest,ExecuteOntapDeleteResponse> executeOntapDeleteCallable()`ExecuteOntapDelete` dispatches the ONTAP `DELETE` request to the `StoragePool` cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ExecuteOntapDeleteRequest request = ExecuteOntapDeleteRequest.newBuilder().setOntapPath("ontapPath-1869187159").build(); ApiFuture<ExecuteOntapDeleteResponse> future = netAppClient.executeOntapDeleteCallable().futureCall(request); // Do something. ExecuteOntapDeleteResponse response = future.get(); } -
executeOntapPatch
`ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the `StoragePool` cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ExecuteOntapPatchRequest request = ExecuteOntapPatchRequest.newBuilder() .setBody(Struct.newBuilder().build()) .setOntapPath("ontapPath-1869187159") .build(); ExecuteOntapPatchResponse response = netAppClient.executeOntapPatch(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
executeOntapPatchCallable
public final UnaryCallable<ExecuteOntapPatchRequest,ExecuteOntapPatchResponse> executeOntapPatchCallable()`ExecuteOntapPatch` dispatches the ONTAP `PATCH` request to the `StoragePool` cluster.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ExecuteOntapPatchRequest request = ExecuteOntapPatchRequest.newBuilder() .setBody(Struct.newBuilder().build()) .setOntapPath("ontapPath-1869187159") .build(); ApiFuture<ExecuteOntapPatchResponse> future = netAppClient.executeOntapPatchCallable().futureCall(request); // Do something. ExecuteOntapPatchResponse response = future.get(); } -
listLocations
Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Location element : netAppClient.listLocations(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listLocationsPagedCallable
public final UnaryCallable<ListLocationsRequest,NetAppClient.ListLocationsPagedResponse> listLocationsPagedCallable()Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Location> future = netAppClient.listLocationsPagedCallable().futureCall(request); // Do something. for (Location element : future.get().iterateAll()) { // doThingsWith(element); } } -
listLocationsCallable
Lists information about the supported locations for this service.This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name][google.cloud.location.ListLocationsRequest.name] field: ***Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.
For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { ListLocationsRequest request = ListLocationsRequest.newBuilder() .setName("name3373707") .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListLocationsResponse response = netAppClient.listLocationsCallable().call(request); for (Location element : response.getLocationsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
getLocation
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = netAppClient.getLocation(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getLocationCallable
Gets information about a location.Sample code:
// This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library try (NetAppClient netAppClient = NetAppClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = netAppClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-