Package com.google.cloud.filestore.v1 (1.15.0)

A client to Cloud Filestore API

The interfaces provided are listed below, along with usage samples.

CloudFilestoreManagerClient

Service Description: Configures and manages Filestore resources.

Filestore Manager v1.

The file.googleapis.com service implements the Filestore API and defines the following resource model for managing instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of instances and backups, named: /instances/* and /backups/* respectively.
  • As such, Filestore instances are resources of the form: /projects/{project_number}/locations/{location_id}/instances/{instance_id} and backups are resources of the form: /projects/{project_number}/locations/{location_id}/backup/{backup_id}

Note that location_id must be a Google Cloud zone for instances, but a Google Cloud region for backups; for example:

  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

Sample for CloudFilestoreManagerClient:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
     CloudFilestoreManagerClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   Instance response = cloudFilestoreManagerClient.getInstance(name);
 }
 

Classes

Backup

A Filestore backup.

Protobuf type google.cloud.filestore.v1.Backup

Backup.Builder

A Filestore backup.

Protobuf type google.cloud.filestore.v1.Backup

BackupName

BackupName.Builder

Builder for projects/{project}/locations/{location}/backups/{backup}.

CloudFilestoreManagerClient

Service Description: Configures and manages Filestore resources.

Filestore Manager v1.

The file.googleapis.com service implements the Filestore API and defines the following resource model for managing instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of instances and backups, named: /instances/* and /backups/* respectively.
  • As such, Filestore instances are resources of the form: /projects/{project_number}/locations/{location_id}/instances/{instance_id} and backups are resources of the form: /projects/{project_number}/locations/{location_id}/backup/{backup_id}

Note that location_id must be a Google Cloud zone for instances, but a Google Cloud region for backups; for example:

  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (CloudFilestoreManagerClient cloudFilestoreManagerClient =
     CloudFilestoreManagerClient.create()) {
   InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
   Instance response = cloudFilestoreManagerClient.getInstance(name);
 }
 

Note: close() needs to be called on the CloudFilestoreManagerClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of CloudFilestoreManagerSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
     CloudFilestoreManagerSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 CloudFilestoreManagerClient cloudFilestoreManagerClient =
     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
     CloudFilestoreManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
 CloudFilestoreManagerClient cloudFilestoreManagerClient =
     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
     CloudFilestoreManagerSettings.newHttpJsonBuilder().build();
 CloudFilestoreManagerClient cloudFilestoreManagerClient =
     CloudFilestoreManagerClient.create(cloudFilestoreManagerSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

CloudFilestoreManagerClient.ListBackupsFixedSizeCollection

CloudFilestoreManagerClient.ListBackupsPage

CloudFilestoreManagerClient.ListBackupsPagedResponse

CloudFilestoreManagerClient.ListInstancesFixedSizeCollection

CloudFilestoreManagerClient.ListInstancesPage

CloudFilestoreManagerClient.ListInstancesPagedResponse

CloudFilestoreManagerClient.ListSnapshotsFixedSizeCollection

CloudFilestoreManagerClient.ListSnapshotsPage

CloudFilestoreManagerClient.ListSnapshotsPagedResponse

CloudFilestoreManagerGrpc

Configures and manages Filestore resources. Filestore Manager v1. The file.googleapis.com service implements the Filestore API and defines the following resource model for managing instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of instances and backups, named: /instances/* and /backups/* respectively.
  • As such, Filestore instances are resources of the form: /projects/{project_number}/locations/{location_id}/instances/{instance_id} and backups are resources of the form: /projects/{project_number}/locations/{location_id}/backup/{backup_id} Note that location_id must be a Google Cloud zone for instances, but a Google Cloud region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerGrpc.CloudFilestoreManagerBlockingStub

A stub to allow clients to do synchronous rpc calls to service CloudFilestoreManager.

Configures and manages Filestore resources. Filestore Manager v1. The file.googleapis.com service implements the Filestore API and defines the following resource model for managing instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of instances and backups, named: /instances/* and /backups/* respectively.
  • As such, Filestore instances are resources of the form: /projects/{project_number}/locations/{location_id}/instances/{instance_id} and backups are resources of the form: /projects/{project_number}/locations/{location_id}/backup/{backup_id} Note that location_id must be a Google Cloud zone for instances, but a Google Cloud region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerGrpc.CloudFilestoreManagerFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service CloudFilestoreManager.

Configures and manages Filestore resources. Filestore Manager v1. The file.googleapis.com service implements the Filestore API and defines the following resource model for managing instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of instances and backups, named: /instances/* and /backups/* respectively.
  • As such, Filestore instances are resources of the form: /projects/{project_number}/locations/{location_id}/instances/{instance_id} and backups are resources of the form: /projects/{project_number}/locations/{location_id}/backup/{backup_id} Note that location_id must be a Google Cloud zone for instances, but a Google Cloud region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerGrpc.CloudFilestoreManagerImplBase

Base class for the server implementation of the service CloudFilestoreManager.

Configures and manages Filestore resources. Filestore Manager v1. The file.googleapis.com service implements the Filestore API and defines the following resource model for managing instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of instances and backups, named: /instances/* and /backups/* respectively.
  • As such, Filestore instances are resources of the form: /projects/{project_number}/locations/{location_id}/instances/{instance_id} and backups are resources of the form: /projects/{project_number}/locations/{location_id}/backup/{backup_id} Note that location_id must be a Google Cloud zone for instances, but a Google Cloud region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerGrpc.CloudFilestoreManagerStub

A stub to allow clients to do asynchronous rpc calls to service CloudFilestoreManager.

Configures and manages Filestore resources. Filestore Manager v1. The file.googleapis.com service implements the Filestore API and defines the following resource model for managing instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of instances and backups, named: /instances/* and /backups/* respectively.
  • As such, Filestore instances are resources of the form: /projects/{project_number}/locations/{location_id}/instances/{instance_id} and backups are resources of the form: /projects/{project_number}/locations/{location_id}/backup/{backup_id} Note that location_id must be a Google Cloud zone for instances, but a Google Cloud region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerSettings

Settings class to configure an instance of CloudFilestoreManagerClient.

The default instance has everything set to sensible defaults:

  • The default service address (file.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of getInstance to 30 seconds:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 CloudFilestoreManagerSettings.Builder cloudFilestoreManagerSettingsBuilder =
     CloudFilestoreManagerSettings.newBuilder();
 cloudFilestoreManagerSettingsBuilder
     .getInstanceSettings()
     .setRetrySettings(
         cloudFilestoreManagerSettingsBuilder
             .getInstanceSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 CloudFilestoreManagerSettings cloudFilestoreManagerSettings =
     cloudFilestoreManagerSettingsBuilder.build();
 

CloudFilestoreManagerSettings.Builder

Builder for CloudFilestoreManagerSettings.

CloudFilestoreServiceProto

CreateBackupRequest

CreateBackupRequest creates a backup.

Protobuf type google.cloud.filestore.v1.CreateBackupRequest

CreateBackupRequest.Builder

CreateBackupRequest creates a backup.

Protobuf type google.cloud.filestore.v1.CreateBackupRequest

CreateInstanceRequest

CreateInstanceRequest creates an instance.

Protobuf type google.cloud.filestore.v1.CreateInstanceRequest

CreateInstanceRequest.Builder

CreateInstanceRequest creates an instance.

Protobuf type google.cloud.filestore.v1.CreateInstanceRequest

CreateSnapshotRequest

CreateSnapshotRequest creates a snapshot.

Protobuf type google.cloud.filestore.v1.CreateSnapshotRequest

CreateSnapshotRequest.Builder

CreateSnapshotRequest creates a snapshot.

Protobuf type google.cloud.filestore.v1.CreateSnapshotRequest

DeleteBackupRequest

DeleteBackupRequest deletes a backup.

Protobuf type google.cloud.filestore.v1.DeleteBackupRequest

DeleteBackupRequest.Builder

DeleteBackupRequest deletes a backup.

Protobuf type google.cloud.filestore.v1.DeleteBackupRequest

DeleteInstanceRequest

DeleteInstanceRequest deletes an instance.

Protobuf type google.cloud.filestore.v1.DeleteInstanceRequest

DeleteInstanceRequest.Builder

DeleteInstanceRequest deletes an instance.

Protobuf type google.cloud.filestore.v1.DeleteInstanceRequest

DeleteSnapshotRequest

DeleteSnapshotRequest deletes a snapshot.

Protobuf type google.cloud.filestore.v1.DeleteSnapshotRequest

DeleteSnapshotRequest.Builder

DeleteSnapshotRequest deletes a snapshot.

Protobuf type google.cloud.filestore.v1.DeleteSnapshotRequest

FileShareConfig

File share configuration for the instance.

Protobuf type google.cloud.filestore.v1.FileShareConfig

FileShareConfig.Builder

File share configuration for the instance.

Protobuf type google.cloud.filestore.v1.FileShareConfig

GetBackupRequest

GetBackupRequest gets the state of a backup.

Protobuf type google.cloud.filestore.v1.GetBackupRequest

GetBackupRequest.Builder

GetBackupRequest gets the state of a backup.

Protobuf type google.cloud.filestore.v1.GetBackupRequest

GetInstanceRequest

GetInstanceRequest gets the state of an instance.

Protobuf type google.cloud.filestore.v1.GetInstanceRequest

GetInstanceRequest.Builder

GetInstanceRequest gets the state of an instance.

Protobuf type google.cloud.filestore.v1.GetInstanceRequest

GetSnapshotRequest

GetSnapshotRequest gets the state of a snapshot.

Protobuf type google.cloud.filestore.v1.GetSnapshotRequest

GetSnapshotRequest.Builder

GetSnapshotRequest gets the state of a snapshot.

Protobuf type google.cloud.filestore.v1.GetSnapshotRequest

Instance

A Filestore instance.

Protobuf type google.cloud.filestore.v1.Instance

Instance.Builder

A Filestore instance.

Protobuf type google.cloud.filestore.v1.Instance

InstanceName

InstanceName.Builder

Builder for projects/{project}/locations/{location}/instances/{instance}.

ListBackupsRequest

ListBackupsRequest lists backups.

Protobuf type google.cloud.filestore.v1.ListBackupsRequest

ListBackupsRequest.Builder

ListBackupsRequest lists backups.

Protobuf type google.cloud.filestore.v1.ListBackupsRequest

ListBackupsResponse

ListBackupsResponse is the result of ListBackupsRequest.

Protobuf type google.cloud.filestore.v1.ListBackupsResponse

ListBackupsResponse.Builder

ListBackupsResponse is the result of ListBackupsRequest.

Protobuf type google.cloud.filestore.v1.ListBackupsResponse

ListInstancesRequest

ListInstancesRequest lists instances.

Protobuf type google.cloud.filestore.v1.ListInstancesRequest

ListInstancesRequest.Builder

ListInstancesRequest lists instances.

Protobuf type google.cloud.filestore.v1.ListInstancesRequest

ListInstancesResponse

ListInstancesResponse is the result of ListInstancesRequest.

Protobuf type google.cloud.filestore.v1.ListInstancesResponse

ListInstancesResponse.Builder

ListInstancesResponse is the result of ListInstancesRequest.

Protobuf type google.cloud.filestore.v1.ListInstancesResponse

ListSnapshotsRequest

ListSnapshotsRequest lists snapshots.

Protobuf type google.cloud.filestore.v1.ListSnapshotsRequest

ListSnapshotsRequest.Builder

ListSnapshotsRequest lists snapshots.

Protobuf type google.cloud.filestore.v1.ListSnapshotsRequest

ListSnapshotsResponse

ListSnapshotsResponse is the result of ListSnapshotsRequest.

Protobuf type google.cloud.filestore.v1.ListSnapshotsResponse

ListSnapshotsResponse.Builder

ListSnapshotsResponse is the result of ListSnapshotsRequest.

Protobuf type google.cloud.filestore.v1.ListSnapshotsResponse

LocationName

LocationName.Builder

Builder for projects/{project}/locations/{location}.

NetworkConfig

Network configuration for the instance.

Protobuf type google.cloud.filestore.v1.NetworkConfig

NetworkConfig.Builder

Network configuration for the instance.

Protobuf type google.cloud.filestore.v1.NetworkConfig

NfsExportOptions

NFS export options specifications.

Protobuf type google.cloud.filestore.v1.NfsExportOptions

NfsExportOptions.Builder

NFS export options specifications.

Protobuf type google.cloud.filestore.v1.NfsExportOptions

RestoreInstanceRequest

RestoreInstanceRequest restores an existing instance's file share from a backup.

Protobuf type google.cloud.filestore.v1.RestoreInstanceRequest

RestoreInstanceRequest.Builder

RestoreInstanceRequest restores an existing instance's file share from a backup.

Protobuf type google.cloud.filestore.v1.RestoreInstanceRequest

Snapshot

A Filestore snapshot.

Protobuf type google.cloud.filestore.v1.Snapshot

Snapshot.Builder

A Filestore snapshot.

Protobuf type google.cloud.filestore.v1.Snapshot

SnapshotName

SnapshotName.Builder

Builder for projects/{project}/locations/{location}/instances/{instance}/snapshots/{snapshot}.

UpdateBackupRequest

UpdateBackupRequest updates description and/or labels for a backup.

Protobuf type google.cloud.filestore.v1.UpdateBackupRequest

UpdateBackupRequest.Builder

UpdateBackupRequest updates description and/or labels for a backup.

Protobuf type google.cloud.filestore.v1.UpdateBackupRequest

UpdateInstanceRequest

UpdateInstanceRequest updates the settings of an instance.

Protobuf type google.cloud.filestore.v1.UpdateInstanceRequest

UpdateInstanceRequest.Builder

UpdateInstanceRequest updates the settings of an instance.

Protobuf type google.cloud.filestore.v1.UpdateInstanceRequest

UpdateSnapshotRequest

UpdateSnapshotRequest updates description and/or labels for a snapshot.

Protobuf type google.cloud.filestore.v1.UpdateSnapshotRequest

UpdateSnapshotRequest.Builder

UpdateSnapshotRequest updates description and/or labels for a snapshot.

Protobuf type google.cloud.filestore.v1.UpdateSnapshotRequest

Interfaces

BackupOrBuilder

CloudFilestoreManagerGrpc.AsyncService

Configures and manages Filestore resources. Filestore Manager v1. The file.googleapis.com service implements the Filestore API and defines the following resource model for managing instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of instances and backups, named: /instances/* and /backups/* respectively.
  • As such, Filestore instances are resources of the form: /projects/{project_number}/locations/{location_id}/instances/{instance_id} and backups are resources of the form: /projects/{project_number}/locations/{location_id}/backup/{backup_id} Note that location_id must be a Google Cloud zone for instances, but a Google Cloud region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CreateBackupRequestOrBuilder

CreateInstanceRequestOrBuilder

CreateSnapshotRequestOrBuilder

DeleteBackupRequestOrBuilder

DeleteInstanceRequestOrBuilder

DeleteSnapshotRequestOrBuilder

FileShareConfigOrBuilder

GetBackupRequestOrBuilder

GetInstanceRequestOrBuilder

GetSnapshotRequestOrBuilder

InstanceOrBuilder

ListBackupsRequestOrBuilder

ListBackupsResponseOrBuilder

ListInstancesRequestOrBuilder

ListInstancesResponseOrBuilder

ListSnapshotsRequestOrBuilder

ListSnapshotsResponseOrBuilder

NetworkConfigOrBuilder

NfsExportOptionsOrBuilder

RestoreInstanceRequestOrBuilder

SnapshotOrBuilder

UpdateBackupRequestOrBuilder

UpdateInstanceRequestOrBuilder

UpdateSnapshotRequestOrBuilder

Enums

Backup.State

The backup state.

Protobuf enum google.cloud.filestore.v1.Backup.State

FileShareConfig.SourceCase

Instance.State

The instance state.

Protobuf enum google.cloud.filestore.v1.Instance.State

Instance.SuspensionReason

SuspensionReason contains the possible reasons for a suspension.

Protobuf enum google.cloud.filestore.v1.Instance.SuspensionReason

Instance.Tier

Available service tiers.

Protobuf enum google.cloud.filestore.v1.Instance.Tier

NetworkConfig.AddressMode

Internet protocol versions supported by Filestore.

Protobuf enum google.cloud.filestore.v1.NetworkConfig.AddressMode

NetworkConfig.ConnectMode

Available connection modes.

Protobuf enum google.cloud.filestore.v1.NetworkConfig.ConnectMode

NfsExportOptions.AccessMode

The access mode.

Protobuf enum google.cloud.filestore.v1.NfsExportOptions.AccessMode

NfsExportOptions.SquashMode

The squash mode.

Protobuf enum google.cloud.filestore.v1.NfsExportOptions.SquashMode

RestoreInstanceRequest.SourceCase

Snapshot.State

The snapshot state.

Protobuf enum google.cloud.filestore.v1.Snapshot.State