Package com.google.cloud.redis.cluster.v1 (0.1.0)

A client to Google Cloud Memorystore for Redis API

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

CloudRedisClusterClient

Service Description: Configures and manages Cloud Memorystore for Redis clusters

Google Cloud Memorystore for Redis Cluster

The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters:

  • 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 Redis clusters, named: /clusters/*
  • As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id}

Note that location_id must be a GCP region; for example:

  • projects/redpepper-1290/locations/us-central1/clusters/my-redis

We use API version selector for Flex APIs

  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

Sample for CloudRedisClusterClient:


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

Classes

CloudRedisClusterClient

Service Description: Configures and manages Cloud Memorystore for Redis clusters

Google Cloud Memorystore for Redis Cluster

The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters:

  • 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 Redis clusters, named: /clusters/*
  • As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id}

Note that location_id must be a GCP region; for example:

  • projects/redpepper-1290/locations/us-central1/clusters/my-redis

We use API version selector for Flex APIs

  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

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 (CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.create()) {
   ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
   Cluster response = cloudRedisClusterClient.getCluster(name);
 }
 

Note: close() needs to be called on the CloudRedisClusterClient 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 CloudRedisClusterSettings 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
 CloudRedisClusterSettings cloudRedisClusterSettings =
     CloudRedisClusterSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 CloudRedisClusterClient cloudRedisClusterClient =
     CloudRedisClusterClient.create(cloudRedisClusterSettings);
 

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
 CloudRedisClusterSettings cloudRedisClusterSettings =
     CloudRedisClusterSettings.newBuilder().setEndpoint(myEndpoint).build();
 CloudRedisClusterClient cloudRedisClusterClient =
     CloudRedisClusterClient.create(cloudRedisClusterSettings);
 

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
 CloudRedisClusterSettings cloudRedisClusterSettings =
     CloudRedisClusterSettings.newHttpJsonBuilder().build();
 CloudRedisClusterClient cloudRedisClusterClient =
     CloudRedisClusterClient.create(cloudRedisClusterSettings);
 

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

CloudRedisClusterClient.ListClustersFixedSizeCollection

CloudRedisClusterClient.ListClustersPage

CloudRedisClusterClient.ListClustersPagedResponse

CloudRedisClusterClient.ListLocationsFixedSizeCollection

CloudRedisClusterClient.ListLocationsPage

CloudRedisClusterClient.ListLocationsPagedResponse

CloudRedisClusterGrpc

Configures and manages Cloud Memorystore for Redis clusters Google Cloud Memorystore for Redis Cluster The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters:

  • 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 Redis clusters, named: /clusters/*
  • As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id} Note that location_id must be a GCP region; for example:
  • projects/redpepper-1290/locations/us-central1/clusters/my-redis We use API version selector for Flex APIs
  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

CloudRedisClusterGrpc.CloudRedisClusterBlockingStub

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

Configures and manages Cloud Memorystore for Redis clusters Google Cloud Memorystore for Redis Cluster The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters:

  • 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 Redis clusters, named: /clusters/*
  • As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id} Note that location_id must be a GCP region; for example:
  • projects/redpepper-1290/locations/us-central1/clusters/my-redis We use API version selector for Flex APIs
  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

CloudRedisClusterGrpc.CloudRedisClusterFutureStub

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

Configures and manages Cloud Memorystore for Redis clusters Google Cloud Memorystore for Redis Cluster The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters:

  • 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 Redis clusters, named: /clusters/*
  • As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id} Note that location_id must be a GCP region; for example:
  • projects/redpepper-1290/locations/us-central1/clusters/my-redis We use API version selector for Flex APIs
  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

CloudRedisClusterGrpc.CloudRedisClusterImplBase

Base class for the server implementation of the service CloudRedisCluster.

Configures and manages Cloud Memorystore for Redis clusters Google Cloud Memorystore for Redis Cluster The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters:

  • 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 Redis clusters, named: /clusters/*
  • As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id} Note that location_id must be a GCP region; for example:
  • projects/redpepper-1290/locations/us-central1/clusters/my-redis We use API version selector for Flex APIs
  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

CloudRedisClusterGrpc.CloudRedisClusterStub

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

Configures and manages Cloud Memorystore for Redis clusters Google Cloud Memorystore for Redis Cluster The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters:

  • 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 Redis clusters, named: /clusters/*
  • As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id} Note that location_id must be a GCP region; for example:
  • projects/redpepper-1290/locations/us-central1/clusters/my-redis We use API version selector for Flex APIs
  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

CloudRedisClusterProto

CloudRedisClusterSettings

Settings class to configure an instance of CloudRedisClusterClient.

The default instance has everything set to sensible defaults:

  • The default service address (redis.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 getCluster 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
 CloudRedisClusterSettings.Builder cloudRedisClusterSettingsBuilder =
     CloudRedisClusterSettings.newBuilder();
 cloudRedisClusterSettingsBuilder
     .getClusterSettings()
     .setRetrySettings(
         cloudRedisClusterSettingsBuilder
             .getClusterSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 CloudRedisClusterSettings cloudRedisClusterSettings = cloudRedisClusterSettingsBuilder.build();
 

CloudRedisClusterSettings.Builder

Builder for CloudRedisClusterSettings.

Cluster

A cluster instance.

Protobuf type google.cloud.redis.cluster.v1.Cluster

Cluster.Builder

A cluster instance.

Protobuf type google.cloud.redis.cluster.v1.Cluster

Cluster.StateInfo

Represents additional information about the state of the cluster.

Protobuf type google.cloud.redis.cluster.v1.Cluster.StateInfo

Cluster.StateInfo.Builder

Represents additional information about the state of the cluster.

Protobuf type google.cloud.redis.cluster.v1.Cluster.StateInfo

Cluster.StateInfo.UpdateInfo

Represents information about an updating cluster.

Protobuf type google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo

Cluster.StateInfo.UpdateInfo.Builder

Represents information about an updating cluster.

Protobuf type google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo

ClusterName

ClusterName.Builder

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

CreateClusterRequest

Request for CreateCluster.

Protobuf type google.cloud.redis.cluster.v1.CreateClusterRequest

CreateClusterRequest.Builder

Request for CreateCluster.

Protobuf type google.cloud.redis.cluster.v1.CreateClusterRequest

DeleteClusterRequest

Request for DeleteCluster.

Protobuf type google.cloud.redis.cluster.v1.DeleteClusterRequest

DeleteClusterRequest.Builder

Request for DeleteCluster.

Protobuf type google.cloud.redis.cluster.v1.DeleteClusterRequest

DiscoveryEndpoint

Endpoints on each network, for Redis clients to connect to the cluster.

Protobuf type google.cloud.redis.cluster.v1.DiscoveryEndpoint

DiscoveryEndpoint.Builder

Endpoints on each network, for Redis clients to connect to the cluster.

Protobuf type google.cloud.redis.cluster.v1.DiscoveryEndpoint

GetClusterRequest

Request for GetCluster.

Protobuf type google.cloud.redis.cluster.v1.GetClusterRequest

GetClusterRequest.Builder

Request for GetCluster.

Protobuf type google.cloud.redis.cluster.v1.GetClusterRequest

ListClustersRequest

Request for ListClusters.

Protobuf type google.cloud.redis.cluster.v1.ListClustersRequest

ListClustersRequest.Builder

Request for ListClusters.

Protobuf type google.cloud.redis.cluster.v1.ListClustersRequest

ListClustersResponse

Response for ListClusters.

Protobuf type google.cloud.redis.cluster.v1.ListClustersResponse

ListClustersResponse.Builder

Response for ListClusters.

Protobuf type google.cloud.redis.cluster.v1.ListClustersResponse

LocationName

LocationName.Builder

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

OperationMetadata

Pre-defined metadata fields.

Protobuf type google.cloud.redis.cluster.v1.OperationMetadata

OperationMetadata.Builder

Pre-defined metadata fields.

Protobuf type google.cloud.redis.cluster.v1.OperationMetadata

PscConfig

Protobuf type google.cloud.redis.cluster.v1.PscConfig

PscConfig.Builder

Protobuf type google.cloud.redis.cluster.v1.PscConfig

PscConnection

Details of consumer resources in a PSC connection.

Protobuf type google.cloud.redis.cluster.v1.PscConnection

PscConnection.Builder

Details of consumer resources in a PSC connection.

Protobuf type google.cloud.redis.cluster.v1.PscConnection

UpdateClusterRequest

Request for UpdateCluster.

Protobuf type google.cloud.redis.cluster.v1.UpdateClusterRequest

UpdateClusterRequest.Builder

Request for UpdateCluster.

Protobuf type google.cloud.redis.cluster.v1.UpdateClusterRequest

Interfaces

CloudRedisClusterGrpc.AsyncService

Configures and manages Cloud Memorystore for Redis clusters Google Cloud Memorystore for Redis Cluster The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis clusters:

  • 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 Redis clusters, named: /clusters/*
  • As such, Redis clusters are resources of the form: /projects/{project_id}/locations/{location_id}/clusters/{instance_id} Note that location_id must be a GCP region; for example:
  • projects/redpepper-1290/locations/us-central1/clusters/my-redis We use API version selector for Flex APIs
  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

Cluster.StateInfo.UpdateInfoOrBuilder

Cluster.StateInfoOrBuilder

ClusterOrBuilder

CreateClusterRequestOrBuilder

DeleteClusterRequestOrBuilder

DiscoveryEndpointOrBuilder

GetClusterRequestOrBuilder

ListClustersRequestOrBuilder

ListClustersResponseOrBuilder

OperationMetadataOrBuilder

PscConfigOrBuilder

PscConnectionOrBuilder

UpdateClusterRequestOrBuilder

Enums

AuthorizationMode

Available authorization mode of a Redis cluster.

Protobuf enum google.cloud.redis.cluster.v1.AuthorizationMode

Cluster.State

Represents the different states of a Redis cluster.

Protobuf enum google.cloud.redis.cluster.v1.Cluster.State

Cluster.StateInfo.InfoCase

TransitEncryptionMode

Available mode of in-transit encryption.

Protobuf enum google.cloud.redis.cluster.v1.TransitEncryptionMode