Package com.google.cloud.redis.v1 (2.8.0) Stay organized with collections Save and categorize content based on your preferences.
- 2.81.0 (latest)
- 2.79.0
- 2.78.0
- 2.77.0
- 2.76.0
- 2.75.0
- 2.73.0
- 2.71.0
- 2.70.0
- 2.67.0
- 2.66.0
- 2.65.0
- 2.63.0
- 2.62.0
- 2.61.0
- 2.60.0
- 2.59.0
- 2.58.0
- 2.57.0
- 2.56.0
- 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 v1
Theredis.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
Sample for CloudRedisClient:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_librarytry(CloudRedisClientcloudRedisClient=CloudRedisClient.create()){InstanceNamename=InstanceName.of("[PROJECT]","[LOCATION]","[INSTANCE]");Instanceresponse=cloudRedisClient.getInstance(name);}Classes
CloudRedisClient
Service Description: Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1
Theredis.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
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_librarytry(CloudRedisClientcloudRedisClient=CloudRedisClient.create()){InstanceNamename=InstanceName.of("[PROJECT]","[LOCATION]","[INSTANCE]");Instanceresponse=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:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_libraryCloudRedisSettingscloudRedisSettings=CloudRedisSettings.newBuilder().setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)).build();CloudRedisClientcloudRedisClient=CloudRedisClient.create(cloudRedisSettings);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_libraryCloudRedisSettingscloudRedisSettings=CloudRedisSettings.newBuilder().setEndpoint(myEndpoint).build();CloudRedisClientcloudRedisClient=CloudRedisClient.create(cloudRedisSettings);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_libraryCloudRedisSettingscloudRedisSettings=CloudRedisSettings.newBuilder().setTransportChannelProvider(CloudRedisSettings.defaultHttpJsonTransportProviderBuilder().build()).build();CloudRedisClientcloudRedisClient=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 v1 Theredis.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 v1 Theredis.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 v1 Theredis.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 v1 Theredis.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 v1 Theredis.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
CloudRedisServiceV1Proto
CloudRedisSettings
Settings class to configure an instance ofCloudRedisClient.
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:
// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_libraryCloudRedisSettings.BuildercloudRedisSettingsBuilder=CloudRedisSettings.newBuilder();cloudRedisSettingsBuilder.getInstanceSettings().setRetrySettings(cloudRedisSettingsBuilder.getInstanceSettings().getRetrySettings().toBuilder().setTotalTimeout(Duration.ofSeconds(30)).build());CloudRedisSettingscloudRedisSettings=cloudRedisSettingsBuilder.build();CloudRedisSettings.Builder
Builder for CloudRedisSettings.
CreateInstanceRequest
Request forCreateInstance.
Protobuf typegoogle.cloud.redis.v1.CreateInstanceRequest
CreateInstanceRequest.Builder
Request forCreateInstance.
Protobuf typegoogle.cloud.redis.v1.CreateInstanceRequest
DeleteInstanceRequest
Request forDeleteInstance.
Protobuf typegoogle.cloud.redis.v1.DeleteInstanceRequest
DeleteInstanceRequest.Builder
Request forDeleteInstance.
Protobuf typegoogle.cloud.redis.v1.DeleteInstanceRequest
ExportInstanceRequest
Request forExport.
Protobuf typegoogle.cloud.redis.v1.ExportInstanceRequest
ExportInstanceRequest.Builder
Request forExport.
Protobuf typegoogle.cloud.redis.v1.ExportInstanceRequest
FailoverInstanceRequest
Request forFailover.
Protobuf typegoogle.cloud.redis.v1.FailoverInstanceRequest
FailoverInstanceRequest.Builder
Request forFailover.
Protobuf typegoogle.cloud.redis.v1.FailoverInstanceRequest
GcsDestination
The Cloud Storage location for the output content
Protobuf typegoogle.cloud.redis.v1.GcsDestination
GcsDestination.Builder
The Cloud Storage location for the output content
Protobuf typegoogle.cloud.redis.v1.GcsDestination
GcsSource
The Cloud Storage location for the input content
Protobuf typegoogle.cloud.redis.v1.GcsSource
GcsSource.Builder
The Cloud Storage location for the input content
Protobuf typegoogle.cloud.redis.v1.GcsSource
GetInstanceAuthStringRequest
Request forGetInstanceAuthString.
Protobuf typegoogle.cloud.redis.v1.GetInstanceAuthStringRequest
GetInstanceAuthStringRequest.Builder
Request forGetInstanceAuthString.
Protobuf typegoogle.cloud.redis.v1.GetInstanceAuthStringRequest
GetInstanceRequest
Request forGetInstance.
Protobuf typegoogle.cloud.redis.v1.GetInstanceRequest
GetInstanceRequest.Builder
Request forGetInstance.
Protobuf typegoogle.cloud.redis.v1.GetInstanceRequest
ImportInstanceRequest
Request forImport.
Protobuf typegoogle.cloud.redis.v1.ImportInstanceRequest
ImportInstanceRequest.Builder
Request forImport.
Protobuf typegoogle.cloud.redis.v1.ImportInstanceRequest
InputConfig
The input content
Protobuf typegoogle.cloud.redis.v1.InputConfig
InputConfig.Builder
The input content
Protobuf typegoogle.cloud.redis.v1.InputConfig
Instance
A Memorystore for Redis instance.
Protobuf typegoogle.cloud.redis.v1.Instance
Instance.Builder
A Memorystore for Redis instance.
Protobuf typegoogle.cloud.redis.v1.Instance
InstanceAuthString
Instance AUTH string details.
Protobuf typegoogle.cloud.redis.v1.InstanceAuthString
InstanceAuthString.Builder
Instance AUTH string details.
Protobuf typegoogle.cloud.redis.v1.InstanceAuthString
InstanceName
InstanceName.Builder
Builder for projects/{project}/locations/{location}/instances/{instance}.
ListInstancesRequest
Request forListInstances.
Protobuf typegoogle.cloud.redis.v1.ListInstancesRequest
ListInstancesRequest.Builder
Request forListInstances.
Protobuf typegoogle.cloud.redis.v1.ListInstancesRequest
ListInstancesResponse
Response forListInstances.
Protobuf typegoogle.cloud.redis.v1.ListInstancesResponse
ListInstancesResponse.Builder
Response forListInstances.
Protobuf typegoogle.cloud.redis.v1.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 thegoogle.cloud.location.Location.metadata field.
Protobuf typegoogle.cloud.redis.v1.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 thegoogle.cloud.location.Location.metadata field.
Protobuf typegoogle.cloud.redis.v1.LocationMetadata
LocationName
LocationName.Builder
Builder for projects/{project}/locations/{location}.
MaintenancePolicy
Maintenance policy for an instance.
Protobuf typegoogle.cloud.redis.v1.MaintenancePolicy
MaintenancePolicy.Builder
Maintenance policy for an instance.
Protobuf typegoogle.cloud.redis.v1.MaintenancePolicy
MaintenanceSchedule
Upcoming maintenance schedule. If no maintenance is scheduled, fields are not populated.
Protobuf typegoogle.cloud.redis.v1.MaintenanceSchedule
MaintenanceSchedule.Builder
Upcoming maintenance schedule. If no maintenance is scheduled, fields are not populated.
Protobuf typegoogle.cloud.redis.v1.MaintenanceSchedule
NodeInfo
Node specific properties.
Protobuf typegoogle.cloud.redis.v1.NodeInfo
NodeInfo.Builder
Node specific properties.
Protobuf typegoogle.cloud.redis.v1.NodeInfo
OperationMetadata
Represents the v1 metadata of the long-running operation.
Protobuf typegoogle.cloud.redis.v1.OperationMetadata
OperationMetadata.Builder
Represents the v1 metadata of the long-running operation.
Protobuf typegoogle.cloud.redis.v1.OperationMetadata
OutputConfig
The output content
Protobuf typegoogle.cloud.redis.v1.OutputConfig
OutputConfig.Builder
The output content
Protobuf typegoogle.cloud.redis.v1.OutputConfig
RescheduleMaintenanceRequest
Request forRescheduleMaintenance.
Protobuf typegoogle.cloud.redis.v1.RescheduleMaintenanceRequest
RescheduleMaintenanceRequest.Builder
Request forRescheduleMaintenance.
Protobuf typegoogle.cloud.redis.v1.RescheduleMaintenanceRequest
TlsCertificate
TlsCertificate Resource
Protobuf typegoogle.cloud.redis.v1.TlsCertificate
TlsCertificate.Builder
TlsCertificate Resource
Protobuf typegoogle.cloud.redis.v1.TlsCertificate
UpdateInstanceRequest
Request forUpdateInstance.
Protobuf typegoogle.cloud.redis.v1.UpdateInstanceRequest
UpdateInstanceRequest.Builder
Request forUpdateInstance.
Protobuf typegoogle.cloud.redis.v1.UpdateInstanceRequest
UpgradeInstanceRequest
Request forUpgradeInstance.
Protobuf typegoogle.cloud.redis.v1.UpgradeInstanceRequest
UpgradeInstanceRequest.Builder
Request forUpgradeInstance.
Protobuf typegoogle.cloud.redis.v1.UpgradeInstanceRequest
WeeklyMaintenanceWindow
Time window in which disruptive maintenance updates occur. Non-disruptive updates can occur inside or outside this window.
Protobuf typegoogle.cloud.redis.v1.WeeklyMaintenanceWindow
WeeklyMaintenanceWindow.Builder
Time window in which disruptive maintenance updates occur. Non-disruptive updates can occur inside or outside this window.
Protobuf typegoogle.cloud.redis.v1.WeeklyMaintenanceWindow
ZoneMetadata
Defines specific information for a particular zone. Currently empty and reserved for future use only.
Protobuf typegoogle.cloud.redis.v1.ZoneMetadata
ZoneMetadata.Builder
Defines specific information for a particular zone. Currently empty and reserved for future use only.
Protobuf typegoogle.cloud.redis.v1.ZoneMetadata
Interfaces
CreateInstanceRequestOrBuilder
DeleteInstanceRequestOrBuilder
ExportInstanceRequestOrBuilder
FailoverInstanceRequestOrBuilder
GcsDestinationOrBuilder
GcsSourceOrBuilder
GetInstanceAuthStringRequestOrBuilder
GetInstanceRequestOrBuilder
ImportInstanceRequestOrBuilder
InputConfigOrBuilder
InstanceAuthStringOrBuilder
InstanceOrBuilder
ListInstancesRequestOrBuilder
ListInstancesResponseOrBuilder
LocationMetadataOrBuilder
MaintenancePolicyOrBuilder
MaintenanceScheduleOrBuilder
NodeInfoOrBuilder
OperationMetadataOrBuilder
OutputConfigOrBuilder
RescheduleMaintenanceRequestOrBuilder
TlsCertificateOrBuilder
UpdateInstanceRequestOrBuilder
UpgradeInstanceRequestOrBuilder
WeeklyMaintenanceWindowOrBuilder
ZoneMetadataOrBuilder
Enums
FailoverInstanceRequest.DataProtectionMode
Specifies different modes of operation in relation to the data retention.
Protobuf enumgoogle.cloud.redis.v1.FailoverInstanceRequest.DataProtectionMode
InputConfig.SourceCase
Instance.ConnectMode
Available connection modes.
Protobuf enumgoogle.cloud.redis.v1.Instance.ConnectMode
Instance.ReadReplicasMode
Read replicas mode.
Protobuf enumgoogle.cloud.redis.v1.Instance.ReadReplicasMode
Instance.State
Represents the different states of a Redis instance.
Protobuf enumgoogle.cloud.redis.v1.Instance.State
Instance.Tier
Available service tiers to choose from
Protobuf enumgoogle.cloud.redis.v1.Instance.Tier
Instance.TransitEncryptionMode
Available TLS modes.
Protobuf enumgoogle.cloud.redis.v1.Instance.TransitEncryptionMode
OutputConfig.DestinationCase
RescheduleMaintenanceRequest.RescheduleType
Reschedule options.
Protobuf enumgoogle.cloud.redis.v1.RescheduleMaintenanceRequest.RescheduleType
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.