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

A client to Cloud Filestore API

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

CloudFilestoreManagerClient

Service Description: Configures and manages Cloud Filestore resources.

Cloud Filestore Manager v1.

The file.googleapis.com service implements the Cloud 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, Cloud 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 GCP zone for instances and but to a GCP 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 Cloud Filestore backup.

Protobuf type google.cloud.filestore.v1.Backup

Backup.Builder

A Cloud 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 Cloud Filestore resources.

Cloud Filestore Manager v1.

The file.googleapis.com service implements the Cloud 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, Cloud 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 GCP zone for instances and but to a GCP 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

CloudFilestoreManagerGrpc

Configures and manages Cloud Filestore resources. Cloud Filestore Manager v1. The file.googleapis.com service implements the Cloud 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, Cloud 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 GCP zone for instances and but to a GCP region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerGrpc.CloudFilestoreManagerBlockingStub

Configures and manages Cloud Filestore resources. Cloud Filestore Manager v1. The file.googleapis.com service implements the Cloud 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, Cloud 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 GCP zone for instances and but to a GCP region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerGrpc.CloudFilestoreManagerFutureStub

Configures and manages Cloud Filestore resources. Cloud Filestore Manager v1. The file.googleapis.com service implements the Cloud 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, Cloud 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 GCP zone for instances and but to a GCP region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerGrpc.CloudFilestoreManagerImplBase

Configures and manages Cloud Filestore resources. Cloud Filestore Manager v1. The file.googleapis.com service implements the Cloud 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, Cloud 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 GCP zone for instances and but to a GCP region for backups; for example:
  • projects/12345/locations/us-central1-c/instances/my-filestore
  • projects/12345/locations/us-central1/backups/my-backup

CloudFilestoreManagerGrpc.CloudFilestoreManagerStub

Configures and manages Cloud Filestore resources. Cloud Filestore Manager v1. The file.googleapis.com service implements the Cloud 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, Cloud 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 GCP zone for instances and but to a GCP 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

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

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

Instance

A Cloud Filestore instance.

Protobuf type google.cloud.filestore.v1.Instance

Instance.Builder

A Cloud 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

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 instances's file share from a backup.

Protobuf type google.cloud.filestore.v1.RestoreInstanceRequest

RestoreInstanceRequest.Builder

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

Protobuf type google.cloud.filestore.v1.RestoreInstanceRequest

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

Interfaces

BackupOrBuilder

CreateBackupRequestOrBuilder

CreateInstanceRequestOrBuilder

DeleteBackupRequestOrBuilder

DeleteInstanceRequestOrBuilder

FileShareConfigOrBuilder

GetBackupRequestOrBuilder

GetInstanceRequestOrBuilder

InstanceOrBuilder

ListBackupsRequestOrBuilder

ListBackupsResponseOrBuilder

ListInstancesRequestOrBuilder

ListInstancesResponseOrBuilder

NetworkConfigOrBuilder

NfsExportOptionsOrBuilder

RestoreInstanceRequestOrBuilder

UpdateBackupRequestOrBuilder

UpdateInstanceRequestOrBuilder

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.Tier

Available service tiers.

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

NetworkConfig.AddressMode

Internet protocol versions supported by Cloud Filestore.

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

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