- 2.56.0 (latest)
- 2.55.0
- 2.54.0
- 2.52.0
- 2.51.0
- 2.50.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.40.0
- 2.39.0
- 2.38.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.5
- 2.5.0
- 2.4.1
- 2.3.0
- 2.2.0
- 2.1.1
A client to Google Cloud Memorystore for Redis API
The interfaces provided are listed below, along with usage samples.
CloudRedisClient
Service Description: Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1beta1
The redis.googleapis.com
service implements the Google Cloud Memorystore for Redis API and
defines the following resource model for managing Redis 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 Redis instances, named:
/instances/*
- As such, Redis instances are resources of the form:
/projects/{project_id}/locations/{location_id}/instances/{instance_id}
Note that location_id must be referring to a GCP region
; for example:
projects/redpepper-1290/locations/us-central1/instances/my-redis
Sample for CloudRedisClient:
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = cloudRedisClient.getInstance(name);
}
Classes
CloudRedisClient
Service Description: Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1beta1
The redis.googleapis.com
service implements the Google Cloud Memorystore for Redis API and
defines the following resource model for managing Redis 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 Redis instances, named:
/instances/*
- As such, Redis instances are resources of the form:
/projects/{project_id}/locations/{location_id}/instances/{instance_id}
Note that location_id must be referring to a GCP region
; for example:
projects/redpepper-1290/locations/us-central1/instances/my-redis
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:
try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Instance response = cloudRedisClient.getInstance(name);
}
Note: close() needs to be called on the CloudRedisClient 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:
- 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.
- 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.
- 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 CloudRedisSettings to create(). For example:
To customize credentials:
CloudRedisSettings cloudRedisSettings =
CloudRedisSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
CloudRedisClient cloudRedisClient = CloudRedisClient.create(cloudRedisSettings);
To customize the endpoint:
CloudRedisSettings cloudRedisSettings =
CloudRedisSettings.newBuilder().setEndpoint(myEndpoint).build();
CloudRedisClient cloudRedisClient = CloudRedisClient.create(cloudRedisSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
CloudRedisClient.ListInstancesFixedSizeCollection
CloudRedisClient.ListInstancesPage
CloudRedisClient.ListInstancesPagedResponse
CloudRedisGrpc
Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1beta1
The redis.googleapis.com
service implements the Google Cloud Memorystore
for Redis API and defines the following resource model for managing Redis
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 Redis instances, named:
/instances/*
- As such, Redis instances are resources of the form:
/projects/{project_id}/locations/{location_id}/instances/{instance_id}
Note that location_id must be referring to a GCPregion
; for example: projects/redpepper-1290/locations/us-central1/instances/my-redis
CloudRedisGrpc.CloudRedisBlockingStub
Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1beta1
The redis.googleapis.com
service implements the Google Cloud Memorystore
for Redis API and defines the following resource model for managing Redis
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 Redis instances, named:
/instances/*
- As such, Redis instances are resources of the form:
/projects/{project_id}/locations/{location_id}/instances/{instance_id}
Note that location_id must be referring to a GCPregion
; for example: projects/redpepper-1290/locations/us-central1/instances/my-redis
CloudRedisGrpc.CloudRedisFutureStub
Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1beta1
The redis.googleapis.com
service implements the Google Cloud Memorystore
for Redis API and defines the following resource model for managing Redis
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 Redis instances, named:
/instances/*
- As such, Redis instances are resources of the form:
/projects/{project_id}/locations/{location_id}/instances/{instance_id}
Note that location_id must be referring to a GCPregion
; for example: projects/redpepper-1290/locations/us-central1/instances/my-redis
CloudRedisGrpc.CloudRedisImplBase
Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1beta1
The redis.googleapis.com
service implements the Google Cloud Memorystore
for Redis API and defines the following resource model for managing Redis
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 Redis instances, named:
/instances/*
- As such, Redis instances are resources of the form:
/projects/{project_id}/locations/{location_id}/instances/{instance_id}
Note that location_id must be referring to a GCPregion
; for example: projects/redpepper-1290/locations/us-central1/instances/my-redis
CloudRedisGrpc.CloudRedisStub
Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1beta1
The redis.googleapis.com
service implements the Google Cloud Memorystore
for Redis API and defines the following resource model for managing Redis
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 Redis instances, named:
/instances/*
- As such, Redis instances are resources of the form:
/projects/{project_id}/locations/{location_id}/instances/{instance_id}
Note that location_id must be referring to a GCPregion
; for example: projects/redpepper-1290/locations/us-central1/instances/my-redis
CloudRedisServiceBetaProto
CloudRedisSettings
Settings class to configure an instance of CloudRedisClient.
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 getInstance to 30 seconds:
CloudRedisSettings.Builder cloudRedisSettingsBuilder = CloudRedisSettings.newBuilder();
cloudRedisSettingsBuilder
.getInstanceSettings()
.setRetrySettings(
cloudRedisSettingsBuilder
.getInstanceSettings()
.getRetrySettings()
.toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
CloudRedisSettings cloudRedisSettings = cloudRedisSettingsBuilder.build();
CloudRedisSettings.Builder
Builder for CloudRedisSettings.
CreateInstanceRequest
Request for CreateInstance.
Protobuf type google.cloud.redis.v1beta1.CreateInstanceRequest
CreateInstanceRequest.Builder
Request for CreateInstance.
Protobuf type google.cloud.redis.v1beta1.CreateInstanceRequest
DeleteInstanceRequest
Request for DeleteInstance.
Protobuf type google.cloud.redis.v1beta1.DeleteInstanceRequest
DeleteInstanceRequest.Builder
Request for DeleteInstance.
Protobuf type google.cloud.redis.v1beta1.DeleteInstanceRequest
ExportInstanceRequest
Request for Export.
Protobuf type google.cloud.redis.v1beta1.ExportInstanceRequest
ExportInstanceRequest.Builder
Request for Export.
Protobuf type google.cloud.redis.v1beta1.ExportInstanceRequest
FailoverInstanceRequest
Request for Failover.
Protobuf type google.cloud.redis.v1beta1.FailoverInstanceRequest
FailoverInstanceRequest.Builder
Request for Failover.
Protobuf type google.cloud.redis.v1beta1.FailoverInstanceRequest
GcsDestination
The Cloud Storage location for the output content
Protobuf type google.cloud.redis.v1beta1.GcsDestination
GcsDestination.Builder
The Cloud Storage location for the output content
Protobuf type google.cloud.redis.v1beta1.GcsDestination
GcsSource
The Cloud Storage location for the input content
Protobuf type google.cloud.redis.v1beta1.GcsSource
GcsSource.Builder
The Cloud Storage location for the input content
Protobuf type google.cloud.redis.v1beta1.GcsSource
GetInstanceAuthStringRequest
Request for GetInstanceAuthString.
Protobuf type google.cloud.redis.v1beta1.GetInstanceAuthStringRequest
GetInstanceAuthStringRequest.Builder
Request for GetInstanceAuthString.
Protobuf type google.cloud.redis.v1beta1.GetInstanceAuthStringRequest
GetInstanceRequest
Request for GetInstance.
Protobuf type google.cloud.redis.v1beta1.GetInstanceRequest
GetInstanceRequest.Builder
Request for GetInstance.
Protobuf type google.cloud.redis.v1beta1.GetInstanceRequest
ImportInstanceRequest
Request for Import.
Protobuf type google.cloud.redis.v1beta1.ImportInstanceRequest
ImportInstanceRequest.Builder
Request for Import.
Protobuf type google.cloud.redis.v1beta1.ImportInstanceRequest
InputConfig
The input content
Protobuf type google.cloud.redis.v1beta1.InputConfig
InputConfig.Builder
The input content
Protobuf type google.cloud.redis.v1beta1.InputConfig
Instance
A Google Cloud Redis instance.
Protobuf type google.cloud.redis.v1beta1.Instance
Instance.Builder
A Google Cloud Redis instance.
Protobuf type google.cloud.redis.v1beta1.Instance
InstanceAuthString
Instance AUTH string details.
Protobuf type google.cloud.redis.v1beta1.InstanceAuthString
InstanceAuthString.Builder
Instance AUTH string details.
Protobuf type google.cloud.redis.v1beta1.InstanceAuthString
InstanceName
InstanceName.Builder
Builder for projects/{project}/locations/{location}/instances/{instance}.
ListInstancesRequest
Request for ListInstances.
Protobuf type google.cloud.redis.v1beta1.ListInstancesRequest
ListInstancesRequest.Builder
Request for ListInstances.
Protobuf type google.cloud.redis.v1beta1.ListInstancesRequest
ListInstancesResponse
Response for ListInstances.
Protobuf type google.cloud.redis.v1beta1.ListInstancesResponse
ListInstancesResponse.Builder
Response for ListInstances.
Protobuf type google.cloud.redis.v1beta1.ListInstancesResponse
LocationMetadata
This location metadata represents additional configuration options for a
given location where a Redis instance may be created. All fields are output
only. It is returned as content of the
google.cloud.location.Location.metadata
field.
Protobuf type google.cloud.redis.v1beta1.LocationMetadata
LocationMetadata.Builder
This location metadata represents additional configuration options for a
given location where a Redis instance may be created. All fields are output
only. It is returned as content of the
google.cloud.location.Location.metadata
field.
Protobuf type google.cloud.redis.v1beta1.LocationMetadata
LocationName
LocationName.Builder
Builder for projects/{project}/locations/{location}.
MaintenancePolicy
Maintenance policy for an instance.
Protobuf type google.cloud.redis.v1beta1.MaintenancePolicy
MaintenancePolicy.Builder
Maintenance policy for an instance.
Protobuf type google.cloud.redis.v1beta1.MaintenancePolicy
MaintenanceSchedule
Upcoming maintenance schedule. If no maintenance is scheduled, fields are not populated.
Protobuf type google.cloud.redis.v1beta1.MaintenanceSchedule
MaintenanceSchedule.Builder
Upcoming maintenance schedule. If no maintenance is scheduled, fields are not populated.
Protobuf type google.cloud.redis.v1beta1.MaintenanceSchedule
NodeInfo
Node specific properties.
Protobuf type google.cloud.redis.v1beta1.NodeInfo
NodeInfo.Builder
Node specific properties.
Protobuf type google.cloud.redis.v1beta1.NodeInfo
OutputConfig
The output content
Protobuf type google.cloud.redis.v1beta1.OutputConfig
OutputConfig.Builder
The output content
Protobuf type google.cloud.redis.v1beta1.OutputConfig
PersistenceConfig
Configuration of the persistence functionality.
Protobuf type google.cloud.redis.v1beta1.PersistenceConfig
PersistenceConfig.Builder
Configuration of the persistence functionality.
Protobuf type google.cloud.redis.v1beta1.PersistenceConfig
RescheduleMaintenanceRequest
Request for RescheduleMaintenance.
Protobuf type google.cloud.redis.v1beta1.RescheduleMaintenanceRequest
RescheduleMaintenanceRequest.Builder
Request for RescheduleMaintenance.
Protobuf type google.cloud.redis.v1beta1.RescheduleMaintenanceRequest
TlsCertificate
TlsCertificate Resource
Protobuf type google.cloud.redis.v1beta1.TlsCertificate
TlsCertificate.Builder
TlsCertificate Resource
Protobuf type google.cloud.redis.v1beta1.TlsCertificate
UpdateInstanceRequest
Request for UpdateInstance.
Protobuf type google.cloud.redis.v1beta1.UpdateInstanceRequest
UpdateInstanceRequest.Builder
Request for UpdateInstance.
Protobuf type google.cloud.redis.v1beta1.UpdateInstanceRequest
UpgradeInstanceRequest
Request for UpgradeInstance.
Protobuf type google.cloud.redis.v1beta1.UpgradeInstanceRequest
UpgradeInstanceRequest.Builder
Request for UpgradeInstance.
Protobuf type google.cloud.redis.v1beta1.UpgradeInstanceRequest
WeeklyMaintenanceWindow
Time window in which disruptive maintenance updates occur. Non-disruptive updates can occur inside or outside this window.
Protobuf type google.cloud.redis.v1beta1.WeeklyMaintenanceWindow
WeeklyMaintenanceWindow.Builder
Time window in which disruptive maintenance updates occur. Non-disruptive updates can occur inside or outside this window.
Protobuf type google.cloud.redis.v1beta1.WeeklyMaintenanceWindow
ZoneMetadata
Defines specific information for a particular zone. Currently empty and reserved for future use only.
Protobuf type google.cloud.redis.v1beta1.ZoneMetadata
ZoneMetadata.Builder
Defines specific information for a particular zone. Currently empty and reserved for future use only.
Protobuf type google.cloud.redis.v1beta1.ZoneMetadata
Interfaces
CreateInstanceRequestOrBuilder
DeleteInstanceRequestOrBuilder
ExportInstanceRequestOrBuilder
FailoverInstanceRequestOrBuilder
GcsDestinationOrBuilder
GcsSourceOrBuilder
GetInstanceAuthStringRequestOrBuilder
GetInstanceRequestOrBuilder
ImportInstanceRequestOrBuilder
InputConfigOrBuilder
InstanceAuthStringOrBuilder
InstanceOrBuilder
ListInstancesRequestOrBuilder
ListInstancesResponseOrBuilder
LocationMetadataOrBuilder
MaintenancePolicyOrBuilder
MaintenanceScheduleOrBuilder
NodeInfoOrBuilder
OutputConfigOrBuilder
PersistenceConfigOrBuilder
RescheduleMaintenanceRequestOrBuilder
TlsCertificateOrBuilder
UpdateInstanceRequestOrBuilder
UpgradeInstanceRequestOrBuilder
WeeklyMaintenanceWindowOrBuilder
ZoneMetadataOrBuilder
Enums
FailoverInstanceRequest.DataProtectionMode
Specifies different modes of operation in relation to the data retention.
Protobuf enum google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode
InputConfig.SourceCase
Instance.ConnectMode
Available connection modes.
Protobuf enum google.cloud.redis.v1beta1.Instance.ConnectMode
Instance.ReadReplicasMode
Read replicas mode.
Protobuf enum google.cloud.redis.v1beta1.Instance.ReadReplicasMode
Instance.State
Represents the different states of a Redis instance.
Protobuf enum google.cloud.redis.v1beta1.Instance.State
Instance.Tier
Available service tiers to choose from
Protobuf enum google.cloud.redis.v1beta1.Instance.Tier
Instance.TransitEncryptionMode
Available TLS modes.
Protobuf enum google.cloud.redis.v1beta1.Instance.TransitEncryptionMode
OutputConfig.DestinationCase
PersistenceConfig.PersistenceMode
Available Persistence modes.
Protobuf enum google.cloud.redis.v1beta1.PersistenceConfig.PersistenceMode
PersistenceConfig.SnapshotPeriod
Available snapshot periods for scheduling.
Protobuf enum google.cloud.redis.v1beta1.PersistenceConfig.SnapshotPeriod
RescheduleMaintenanceRequest.RescheduleType
Reschedule options.
Protobuf enum google.cloud.redis.v1beta1.RescheduleMaintenanceRequest.RescheduleType