google-cloud-redis overview (2.3.0)

com.google.cloud.redis.v1

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

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(CloudRedisClientcloudRedisClient=CloudRedisClient.create()){
InstanceNamename=InstanceName.of("[PROJECT]","[LOCATION]","[INSTANCE]");
Instanceresponse=cloudRedisClient.getInstance(name);
}

com.google.cloud.redis.v1.stub

com.google.cloud.redis.v1beta1

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(CloudRedisClientcloudRedisClient=CloudRedisClient.create()){
InstanceNamename=InstanceName.of("[PROJECT]","[LOCATION]","[INSTANCE]");
Instanceresponse=cloudRedisClient.getInstance(name);
}

com.google.cloud.redis.v1beta1.stub

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.