Class CloudRedisClusterClient (0.75.0)

GitHub RepositoryProduct Reference

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

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().

Methods
Method Description Method Variants

ListClusters

Lists all Redis clusters owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listClusters(ListClustersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listClusters(LocationName parent)

  • listClusters(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listClustersPagedCallable()

  • listClustersCallable()

ListAclPolicies

Lists all ACL policies owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listAclPolicies(ListAclPoliciesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listAclPolicies(LocationName parent)

  • listAclPolicies(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listAclPoliciesPagedCallable()

  • listAclPoliciesCallable()

GetCluster

Gets the details of a specific Redis cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getCluster(GetClusterRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getCluster(ClusterName name)

  • getCluster(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getClusterCallable()

GetAclPolicy

Gets the details of a specific Redis Cluster ACL policy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getAclPolicy(GetAclPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getAclPolicy(AclPolicyName name)

  • getAclPolicy(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getAclPolicyCallable()

UpdateCluster

Updates the metadata and configuration of a specific Redis cluster.

Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateClusterAsync(UpdateClusterRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateClusterAsync(Cluster cluster, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateClusterOperationCallable()

  • updateClusterCallable()

UpdateAclPolicy

Updates the ACL policy.

The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters.

Completed longrunning.Operation will contain the new ACL policy object in the response field.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateAclPolicyAsync(UpdateAclPolicyRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateAclPolicyAsync(AclPolicy aclPolicy, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateAclPolicyOperationCallable()

  • updateAclPolicyCallable()

DeleteCluster

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteClusterAsync(DeleteClusterRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteClusterAsync(ClusterName name)

  • deleteClusterAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteClusterOperationCallable()

  • deleteClusterCallable()

DeleteAclPolicy

Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteAclPolicyAsync(DeleteAclPolicyRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteAclPolicyAsync(AclPolicyName name)

  • deleteAclPolicyAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteAclPolicyOperationCallable()

  • deleteAclPolicyCallable()

GetAclPolicyRevision

Gets details of a specific ACL policy revision.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getAclPolicyRevision(GetAclPolicyRevisionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getAclPolicyRevision(AclPolicyRevisionName name)

  • getAclPolicyRevision(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getAclPolicyRevisionCallable()

ListAclPolicyRevisions

Lists all ACL policy revisions in a given ACL policy.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listAclPolicyRevisions(ListAclPolicyRevisionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listAclPolicyRevisions(AclPolicyName parent)

  • listAclPolicyRevisions(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listAclPolicyRevisionsPagedCallable()

  • listAclPolicyRevisionsCallable()

CreateCluster

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field.

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createClusterAsync(CreateClusterRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createClusterAsync(LocationName parent, Cluster cluster, String clusterId)

  • createClusterAsync(String parent, Cluster cluster, String clusterId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createClusterOperationCallable()

  • createClusterCallable()

CreateAclPolicy

Creates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createAclPolicy(CreateAclPolicyRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • createAclPolicy(LocationName parent, AclPolicy aclPolicy, String aclPolicyId)

  • createAclPolicy(String parent, AclPolicy aclPolicy, String aclPolicyId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createAclPolicyCallable()

GetClusterCertificateAuthority

Gets the details of certificate authority information for Redis cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getClusterCertificateAuthority(GetClusterCertificateAuthorityRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getClusterCertificateAuthority(CertificateAuthorityName name)

  • getClusterCertificateAuthority(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getClusterCertificateAuthorityCallable()

GetSharedRegionalCertificateAuthority

Gets the details of regional certificate authority information for Redis cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getSharedRegionalCertificateAuthority(GetSharedRegionalCertificateAuthorityRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getSharedRegionalCertificateAuthority(SharedRegionalCertificateAuthorityName name)

  • getSharedRegionalCertificateAuthority(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getSharedRegionalCertificateAuthorityCallable()

RescheduleClusterMaintenance

Reschedules upcoming maintenance event.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • rescheduleClusterMaintenanceAsync(RescheduleClusterMaintenanceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • rescheduleClusterMaintenanceAsync(ClusterName name, RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime)

  • rescheduleClusterMaintenanceAsync(String name, RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • rescheduleClusterMaintenanceOperationCallable()

  • rescheduleClusterMaintenanceCallable()

ListBackupCollections

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackupCollections(ListBackupCollectionsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackupCollections(LocationName parent)

  • listBackupCollections(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupCollectionsPagedCallable()

  • listBackupCollectionsCallable()

GetBackupCollection

Get a backup collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackupCollection(GetBackupCollectionRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackupCollection(BackupCollectionName name)

  • getBackupCollection(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupCollectionCallable()

ListBackups

Lists all backups owned by a backup collection.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBackups(ListBackupsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBackups(BackupCollectionName parent)

  • listBackups(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBackupsPagedCallable()

  • listBackupsCallable()

GetBackup

Gets the details of a specific backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getBackup(GetBackupRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getBackup(BackupName name)

  • getBackup(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getBackupCallable()

DeleteBackup

Deletes a specific backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteBackupAsync(DeleteBackupRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteBackupAsync(BackupName name)

  • deleteBackupAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteBackupOperationCallable()

  • deleteBackupCallable()

ExportBackup

Exports a specific backup to a customer target Cloud Storage URI.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • exportBackupAsync(ExportBackupRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • exportBackupOperationCallable()

  • exportBackupCallable()

BackupCluster

Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • backupClusterAsync(BackupClusterRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • backupClusterAsync(ClusterName name)

  • backupClusterAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • backupClusterOperationCallable()

  • backupClusterCallable()

ListTokenAuthUsers

Lists all the token auth users for a token based auth enabled cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listTokenAuthUsers(ListTokenAuthUsersRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listTokenAuthUsers(ClusterName parent)

  • listTokenAuthUsers(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listTokenAuthUsersPagedCallable()

  • listTokenAuthUsersCallable()

GetTokenAuthUser

Gets a specific token auth user for a basic auth enabled cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getTokenAuthUser(GetTokenAuthUserRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getTokenAuthUser(TokenAuthUserName name)

  • getTokenAuthUser(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getTokenAuthUserCallable()

ListAuthTokens

Lists all the auth tokens for a specific token auth user.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listAuthTokens(ListAuthTokensRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listAuthTokens(TokenAuthUserName parent)

  • listAuthTokens(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listAuthTokensPagedCallable()

  • listAuthTokensCallable()

GetAuthToken

Gets a specific auth token for a specific token auth user.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getAuthToken(GetAuthTokenRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getAuthToken(AuthTokenName name)

  • getAuthToken(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getAuthTokenCallable()

AddTokenAuthUser

Adds a token auth user for a token based auth enabled cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • addTokenAuthUserAsync(AddTokenAuthUserRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • addTokenAuthUserAsync(ClusterName cluster, TokenAuthUserName tokenAuthUser)

  • addTokenAuthUserAsync(ClusterName cluster, String tokenAuthUser)

  • addTokenAuthUserAsync(String cluster, TokenAuthUserName tokenAuthUser)

  • addTokenAuthUserAsync(String cluster, String tokenAuthUser)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • addTokenAuthUserOperationCallable()

  • addTokenAuthUserCallable()

DeleteTokenAuthUser

Deletes a token auth user for a token based auth enabled cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteTokenAuthUserAsync(DeleteTokenAuthUserRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteTokenAuthUserAsync(TokenAuthUserName name)

  • deleteTokenAuthUserAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteTokenAuthUserOperationCallable()

  • deleteTokenAuthUserCallable()

AddAuthToken

Adds a auth token for a user of a token based auth enabled cluster.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • addAuthTokenAsync(AddAuthTokenRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • addAuthTokenAsync(TokenAuthUserName tokenAuthUser, AuthToken authToken)

  • addAuthTokenAsync(String tokenAuthUser, AuthToken authToken)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • addAuthTokenOperationCallable()

  • addAuthTokenCallable()

DeleteAuthToken

Removes a auth token for a user of a token based auth enabled instance.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteAuthTokenAsync(DeleteAuthTokenRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteAuthTokenAsync(AuthTokenName name)

  • deleteAuthTokenAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteAuthTokenOperationCallable()

  • deleteAuthTokenCallable()

ListLocations

Lists information about the supported locations for this service.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

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.

Inheritance

java.lang.Object > CloudRedisClusterClient

Static Methods

create()

public static final CloudRedisClusterClient create()

Constructs an instance of CloudRedisClusterClient with default settings.

Returns
Type Description
CloudRedisClusterClient
Exceptions
Type Description
IOException

create(CloudRedisClusterSettings settings)

public static final CloudRedisClusterClient create(CloudRedisClusterSettings settings)

Constructs an instance of CloudRedisClusterClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings CloudRedisClusterSettings
Returns
Type Description
CloudRedisClusterClient
Exceptions
Type Description
IOException

create(CloudRedisClusterStub stub)

public static final CloudRedisClusterClient create(CloudRedisClusterStub stub)

Constructs an instance of CloudRedisClusterClient, using the given stub for making calls. This is for advanced usage - prefer using create(CloudRedisClusterSettings).

Parameter
Name Description
stub CloudRedisClusterStub
Returns
Type Description
CloudRedisClusterClient

Constructors

CloudRedisClusterClient(CloudRedisClusterSettings settings)

protected CloudRedisClusterClient(CloudRedisClusterSettings settings)

Constructs an instance of CloudRedisClusterClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings CloudRedisClusterSettings

CloudRedisClusterClient(CloudRedisClusterStub stub)

protected CloudRedisClusterClient(CloudRedisClusterStub stub)
Parameter
Name Description
stub CloudRedisClusterStub

Methods

addAuthTokenAsync(@Nullable TokenAuthUserName tokenAuthUser, AuthToken authToken)

public final OperationFuture<TokenAuthUser,OperationMetadata> addAuthTokenAsync(@Nullable TokenAuthUserName tokenAuthUser, AuthToken authToken)

Adds a auth token for a user of a token based auth enabled cluster.

Sample code:


 // 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()) {
   TokenAuthUserName tokenAuthUser =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]");
   AuthToken authToken = AuthToken.newBuilder().build();
   TokenAuthUser response =
       cloudRedisClusterClient.addAuthTokenAsync(tokenAuthUser, authToken).get();
 }
 
Parameters
Name Description
tokenAuthUser @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.TokenAuthUserName

Required. The name of the token auth user resource that this auth token will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

authToken AuthToken

Required. The auth token to add.

Returns
Type Description
OperationFuture<TokenAuthUser,OperationMetadata>

addAuthTokenAsync(AddAuthTokenRequest request)

public final OperationFuture<TokenAuthUser,OperationMetadata> addAuthTokenAsync(AddAuthTokenRequest request)

Adds a auth token for a user of a token based auth enabled cluster.

Sample code:


 // 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()) {
   AddAuthTokenRequest request =
       AddAuthTokenRequest.newBuilder()
           .setTokenAuthUser(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setAuthToken(AuthToken.newBuilder().build())
           .build();
   TokenAuthUser response = cloudRedisClusterClient.addAuthTokenAsync(request).get();
 }
 
Parameter
Name Description
request AddAuthTokenRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<TokenAuthUser,OperationMetadata>

addAuthTokenAsync(String tokenAuthUser, AuthToken authToken)

public final OperationFuture<TokenAuthUser,OperationMetadata> addAuthTokenAsync(String tokenAuthUser, AuthToken authToken)

Adds a auth token for a user of a token based auth enabled cluster.

Sample code:


 // 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()) {
   String tokenAuthUser =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
           .toString();
   AuthToken authToken = AuthToken.newBuilder().build();
   TokenAuthUser response =
       cloudRedisClusterClient.addAuthTokenAsync(tokenAuthUser, authToken).get();
 }
 
Parameters
Name Description
tokenAuthUser String

Required. The name of the token auth user resource that this auth token will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

authToken AuthToken

Required. The auth token to add.

Returns
Type Description
OperationFuture<TokenAuthUser,OperationMetadata>

addAuthTokenCallable()

public final UnaryCallable<AddAuthTokenRequest,Operation> addAuthTokenCallable()

Adds a auth token for a user of a token based auth enabled cluster.

Sample code:


 // 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()) {
   AddAuthTokenRequest request =
       AddAuthTokenRequest.newBuilder()
           .setTokenAuthUser(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setAuthToken(AuthToken.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.addAuthTokenCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<AddAuthTokenRequest,Operation>

addAuthTokenOperationCallable()

public final OperationCallable<AddAuthTokenRequest,TokenAuthUser,OperationMetadata> addAuthTokenOperationCallable()

Adds a auth token for a user of a token based auth enabled cluster.

Sample code:


 // 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()) {
   AddAuthTokenRequest request =
       AddAuthTokenRequest.newBuilder()
           .setTokenAuthUser(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setAuthToken(AuthToken.newBuilder().build())
           .build();
   OperationFuture<TokenAuthUser, OperationMetadata> future =
       cloudRedisClusterClient.addAuthTokenOperationCallable().futureCall(request);
   // Do something.
   TokenAuthUser response = future.get();
 }
 
Returns
Type Description
OperationCallable<AddAuthTokenRequest,TokenAuthUser,OperationMetadata>

addTokenAuthUserAsync(@Nullable ClusterName cluster, @Nullable TokenAuthUserName tokenAuthUser)

public final OperationFuture<Cluster,OperationMetadata> addTokenAuthUserAsync(@Nullable ClusterName cluster, @Nullable TokenAuthUserName tokenAuthUser)

Adds a token auth user for a token based auth enabled cluster.

Sample code:


 // 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 cluster = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
   TokenAuthUserName tokenAuthUser =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]");
   Cluster response =
       cloudRedisClusterClient.addTokenAuthUserAsync(cluster, tokenAuthUser).get();
 }
 
Parameters
Name Description
cluster @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.ClusterName

Required. The cluster resource that this token auth user will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}

tokenAuthUser @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.TokenAuthUserName

Required. The id of the token auth user to add.

Returns
Type Description
OperationFuture<Cluster,OperationMetadata>

addTokenAuthUserAsync(@Nullable ClusterName cluster, String tokenAuthUser)

public final OperationFuture<Cluster,OperationMetadata> addTokenAuthUserAsync(@Nullable ClusterName cluster, String tokenAuthUser)

Adds a token auth user for a token based auth enabled cluster.

Sample code:


 // 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 cluster = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
   String tokenAuthUser =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
           .toString();
   Cluster response =
       cloudRedisClusterClient.addTokenAuthUserAsync(cluster, tokenAuthUser).get();
 }
 
Parameters
Name Description
cluster @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.ClusterName

Required. The cluster resource that this token auth user will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}

tokenAuthUser String

Required. The id of the token auth user to add.

Returns
Type Description
OperationFuture<Cluster,OperationMetadata>

addTokenAuthUserAsync(AddTokenAuthUserRequest request)

public final OperationFuture<Cluster,OperationMetadata> addTokenAuthUserAsync(AddTokenAuthUserRequest request)

Adds a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   AddTokenAuthUserRequest request =
       AddTokenAuthUserRequest.newBuilder()
           .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setTokenAuthUser(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .build();
   Cluster response = cloudRedisClusterClient.addTokenAuthUserAsync(request).get();
 }
 
Parameter
Name Description
request AddTokenAuthUserRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Cluster,OperationMetadata>

addTokenAuthUserAsync(String cluster, @Nullable TokenAuthUserName tokenAuthUser)

public final OperationFuture<Cluster,OperationMetadata> addTokenAuthUserAsync(String cluster, @Nullable TokenAuthUserName tokenAuthUser)

Adds a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   String cluster = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
   TokenAuthUserName tokenAuthUser =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]");
   Cluster response =
       cloudRedisClusterClient.addTokenAuthUserAsync(cluster, tokenAuthUser).get();
 }
 
Parameters
Name Description
cluster String

Required. The cluster resource that this token auth user will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}

tokenAuthUser @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.TokenAuthUserName

Required. The id of the token auth user to add.

Returns
Type Description
OperationFuture<Cluster,OperationMetadata>

addTokenAuthUserAsync(String cluster, String tokenAuthUser)

public final OperationFuture<Cluster,OperationMetadata> addTokenAuthUserAsync(String cluster, String tokenAuthUser)

Adds a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   String cluster = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
   String tokenAuthUser =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
           .toString();
   Cluster response =
       cloudRedisClusterClient.addTokenAuthUserAsync(cluster, tokenAuthUser).get();
 }
 
Parameters
Name Description
cluster String

Required. The cluster resource that this token auth user will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}

tokenAuthUser String

Required. The id of the token auth user to add.

Returns
Type Description
OperationFuture<Cluster,OperationMetadata>

addTokenAuthUserCallable()

public final UnaryCallable<AddTokenAuthUserRequest,Operation> addTokenAuthUserCallable()

Adds a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   AddTokenAuthUserRequest request =
       AddTokenAuthUserRequest.newBuilder()
           .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setTokenAuthUser(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.addTokenAuthUserCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<AddTokenAuthUserRequest,Operation>

addTokenAuthUserOperationCallable()

public final OperationCallable<AddTokenAuthUserRequest,Cluster,OperationMetadata> addTokenAuthUserOperationCallable()

Adds a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   AddTokenAuthUserRequest request =
       AddTokenAuthUserRequest.newBuilder()
           .setCluster(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setTokenAuthUser(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .build();
   OperationFuture<Cluster, OperationMetadata> future =
       cloudRedisClusterClient.addTokenAuthUserOperationCallable().futureCall(request);
   // Do something.
   Cluster response = future.get();
 }
 
Returns
Type Description
OperationCallable<AddTokenAuthUserRequest,Cluster,OperationMetadata>

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

backupClusterAsync(@Nullable ClusterName name)

public final OperationFuture<Cluster,Any> backupClusterAsync(@Nullable ClusterName name)

Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Sample code:


 // 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.backupClusterAsync(name).get();
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.ClusterName

Required. Redis cluster resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id} where location_id refers to a GCP region.

Returns
Type Description
OperationFuture<Cluster,Any>

backupClusterAsync(BackupClusterRequest request)

public final OperationFuture<Cluster,Any> backupClusterAsync(BackupClusterRequest request)

Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Sample code:


 // 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()) {
   BackupClusterRequest request =
       BackupClusterRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setTtl(Duration.newBuilder().build())
           .setBackupId("backupId2121930365")
           .build();
   Cluster response = cloudRedisClusterClient.backupClusterAsync(request).get();
 }
 
Parameter
Name Description
request BackupClusterRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Cluster,Any>

backupClusterAsync(String name)

public final OperationFuture<Cluster,Any> backupClusterAsync(String name)

Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Sample code:


 // 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()) {
   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
   Cluster response = cloudRedisClusterClient.backupClusterAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Redis cluster resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id} where location_id refers to a GCP region.

Returns
Type Description
OperationFuture<Cluster,Any>

backupClusterCallable()

public final UnaryCallable<BackupClusterRequest,Operation> backupClusterCallable()

Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Sample code:


 // 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()) {
   BackupClusterRequest request =
       BackupClusterRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setTtl(Duration.newBuilder().build())
           .setBackupId("backupId2121930365")
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.backupClusterCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<BackupClusterRequest,Operation>

backupClusterOperationCallable()

public final OperationCallable<BackupClusterRequest,Cluster,Any> backupClusterOperationCallable()

Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.

Sample code:


 // 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()) {
   BackupClusterRequest request =
       BackupClusterRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setTtl(Duration.newBuilder().build())
           .setBackupId("backupId2121930365")
           .build();
   OperationFuture<Cluster, Any> future =
       cloudRedisClusterClient.backupClusterOperationCallable().futureCall(request);
   // Do something.
   Cluster response = future.get();
 }
 
Returns
Type Description
OperationCallable<BackupClusterRequest,Cluster,Any>

close()

public final void close()

createAclPolicy(@Nullable LocationName parent, AclPolicy aclPolicy, String aclPolicyId)

public final AclPolicy createAclPolicy(@Nullable LocationName parent, AclPolicy aclPolicy, String aclPolicyId)

Creates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.

Sample code:


 // 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   AclPolicy aclPolicy = AclPolicy.newBuilder().build();
   String aclPolicyId = "aclPolicyId-1805591401";
   AclPolicy response = cloudRedisClusterClient.createAclPolicy(parent, aclPolicy, aclPolicyId);
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.LocationName

Required. The resource name of the cluster location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a Google Cloud region.

aclPolicy AclPolicy

Required. The ACL policy that is to be created.

aclPolicyId String

Required. The logical name of the ACL policy in the customer project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location

Returns
Type Description
AclPolicy

createAclPolicy(CreateAclPolicyRequest request)

public final AclPolicy createAclPolicy(CreateAclPolicyRequest request)

Creates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.

Sample code:


 // 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()) {
   CreateAclPolicyRequest request =
       CreateAclPolicyRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setAclPolicyId("aclPolicyId-1805591401")
           .setAclPolicy(AclPolicy.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   AclPolicy response = cloudRedisClusterClient.createAclPolicy(request);
 }
 
Parameter
Name Description
request CreateAclPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
AclPolicy

createAclPolicy(String parent, AclPolicy aclPolicy, String aclPolicyId)

public final AclPolicy createAclPolicy(String parent, AclPolicy aclPolicy, String aclPolicyId)

Creates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.

Sample code:


 // 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()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   AclPolicy aclPolicy = AclPolicy.newBuilder().build();
   String aclPolicyId = "aclPolicyId-1805591401";
   AclPolicy response = cloudRedisClusterClient.createAclPolicy(parent, aclPolicy, aclPolicyId);
 }
 
Parameters
Name Description
parent String

Required. The resource name of the cluster location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a Google Cloud region.

aclPolicy AclPolicy

Required. The ACL policy that is to be created.

aclPolicyId String

Required. The logical name of the ACL policy in the customer project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location

Returns
Type Description
AclPolicy

createAclPolicyCallable()

public final UnaryCallable<CreateAclPolicyRequest,AclPolicy> createAclPolicyCallable()

Creates an ACL policy. The creation is executed synchronously and the policy is available for use immediately after the RPC returns.

Sample code:


 // 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()) {
   CreateAclPolicyRequest request =
       CreateAclPolicyRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setAclPolicyId("aclPolicyId-1805591401")
           .setAclPolicy(AclPolicy.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<AclPolicy> future =
       cloudRedisClusterClient.createAclPolicyCallable().futureCall(request);
   // Do something.
   AclPolicy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateAclPolicyRequest,AclPolicy>

createClusterAsync(@Nullable LocationName parent, Cluster cluster, String clusterId)

public final OperationFuture<Cluster,Any> createClusterAsync(@Nullable LocationName parent, Cluster cluster, String clusterId)

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field.

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Cluster cluster = Cluster.newBuilder().build();
   String clusterId = "clusterId561939637";
   Cluster response =
       cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get();
 }
 
Parameters
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.LocationName

Required. The resource name of the cluster location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a GCP region.

cluster Cluster

Required. The cluster that is to be created.

clusterId String

Required. The logical name of the Redis cluster in the customer project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location

Returns
Type Description
OperationFuture<Cluster,Any>

createClusterAsync(CreateClusterRequest request)

public final OperationFuture<Cluster,Any> createClusterAsync(CreateClusterRequest request)

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field.

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   CreateClusterRequest request =
       CreateClusterRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setClusterId("clusterId561939637")
           .setCluster(Cluster.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Cluster response = cloudRedisClusterClient.createClusterAsync(request).get();
 }
 
Parameter
Name Description
request CreateClusterRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Cluster,Any>

createClusterAsync(String parent, Cluster cluster, String clusterId)

public final OperationFuture<Cluster,Any> createClusterAsync(String parent, Cluster cluster, String clusterId)

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field.

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Cluster cluster = Cluster.newBuilder().build();
   String clusterId = "clusterId561939637";
   Cluster response =
       cloudRedisClusterClient.createClusterAsync(parent, cluster, clusterId).get();
 }
 
Parameters
Name Description
parent String

Required. The resource name of the cluster location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a GCP region.

cluster Cluster

Required. The cluster that is to be created.

clusterId String

Required. The logical name of the Redis cluster in the customer project with the following restrictions:

  • Must contain only lowercase letters, numbers, and hyphens.
  • Must start with a letter.
  • Must be between 1-63 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location

Returns
Type Description
OperationFuture<Cluster,Any>

createClusterCallable()

public final UnaryCallable<CreateClusterRequest,Operation> createClusterCallable()

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field.

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   CreateClusterRequest request =
       CreateClusterRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setClusterId("clusterId561939637")
           .setCluster(Cluster.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.createClusterCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateClusterRequest,Operation>

createClusterOperationCallable()

public final OperationCallable<CreateClusterRequest,Cluster,Any> createClusterOperationCallable()

Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field.

The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   CreateClusterRequest request =
       CreateClusterRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setClusterId("clusterId561939637")
           .setCluster(Cluster.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Cluster, Any> future =
       cloudRedisClusterClient.createClusterOperationCallable().futureCall(request);
   // Do something.
   Cluster response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateClusterRequest,Cluster,Any>

deleteAclPolicyAsync(@Nullable AclPolicyName name)

public final OperationFuture<Empty,OperationMetadata> deleteAclPolicyAsync(@Nullable AclPolicyName name)

Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.

Sample code:


 // 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()) {
   AclPolicyName name = AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]");
   cloudRedisClusterClient.deleteAclPolicyAsync(name).get();
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.AclPolicyName

Required. Redis ACL policy resource name using the form: projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id} where location_id refers to a Google Cloud region.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteAclPolicyAsync(DeleteAclPolicyRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteAclPolicyAsync(DeleteAclPolicyRequest request)

Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.

Sample code:


 // 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()) {
   DeleteAclPolicyRequest request =
       DeleteAclPolicyRequest.newBuilder()
           .setName(AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString())
           .setRequestId("requestId693933066")
           .setEtag("etag3123477")
           .build();
   cloudRedisClusterClient.deleteAclPolicyAsync(request).get();
 }
 
Parameter
Name Description
request DeleteAclPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteAclPolicyAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteAclPolicyAsync(String name)

Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.

Sample code:


 // 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()) {
   String name = AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString();
   cloudRedisClusterClient.deleteAclPolicyAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Redis ACL policy resource name using the form: projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id} where location_id refers to a Google Cloud region.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteAclPolicyCallable()

public final UnaryCallable<DeleteAclPolicyRequest,Operation> deleteAclPolicyCallable()

Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.

Sample code:


 // 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()) {
   DeleteAclPolicyRequest request =
       DeleteAclPolicyRequest.newBuilder()
           .setName(AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString())
           .setRequestId("requestId693933066")
           .setEtag("etag3123477")
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.deleteAclPolicyCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteAclPolicyRequest,Operation>

deleteAclPolicyOperationCallable()

public final OperationCallable<DeleteAclPolicyRequest,Empty,OperationMetadata> deleteAclPolicyOperationCallable()

Deletes a specific ACL policy. This action will delete the ACL policy and all the rules associated with it. An ACL policy cannot be deleted if it is attached to a cluster.

Sample code:


 // 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()) {
   DeleteAclPolicyRequest request =
       DeleteAclPolicyRequest.newBuilder()
           .setName(AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString())
           .setRequestId("requestId693933066")
           .setEtag("etag3123477")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       cloudRedisClusterClient.deleteAclPolicyOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteAclPolicyRequest,Empty,OperationMetadata>

deleteAuthTokenAsync(@Nullable AuthTokenName name)

public final OperationFuture<Empty,OperationMetadata> deleteAuthTokenAsync(@Nullable AuthTokenName name)

Removes a auth token for a user of a token based auth enabled instance.

Sample code:


 // 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()) {
   AuthTokenName name =
       AuthTokenName.of(
           "[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]", "[AUTH_TOKEN]");
   cloudRedisClusterClient.deleteAuthTokenAsync(name).get();
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.AuthTokenName

Required. The name of the token auth user resource that this auth token will be deleted from. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteAuthTokenAsync(DeleteAuthTokenRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteAuthTokenAsync(DeleteAuthTokenRequest request)

Removes a auth token for a user of a token based auth enabled instance.

Sample code:


 // 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()) {
   DeleteAuthTokenRequest request =
       DeleteAuthTokenRequest.newBuilder()
           .setName(
               AuthTokenName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[CLUSTER]",
                       "[TOKEN_AUTH_USER]",
                       "[AUTH_TOKEN]")
                   .toString())
           .build();
   cloudRedisClusterClient.deleteAuthTokenAsync(request).get();
 }
 
Parameter
Name Description
request DeleteAuthTokenRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteAuthTokenAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteAuthTokenAsync(String name)

Removes a auth token for a user of a token based auth enabled instance.

Sample code:


 // 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()) {
   String name =
       AuthTokenName.of(
               "[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]", "[AUTH_TOKEN]")
           .toString();
   cloudRedisClusterClient.deleteAuthTokenAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the token auth user resource that this auth token will be deleted from. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteAuthTokenCallable()

public final UnaryCallable<DeleteAuthTokenRequest,Operation> deleteAuthTokenCallable()

Removes a auth token for a user of a token based auth enabled instance.

Sample code:


 // 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()) {
   DeleteAuthTokenRequest request =
       DeleteAuthTokenRequest.newBuilder()
           .setName(
               AuthTokenName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[CLUSTER]",
                       "[TOKEN_AUTH_USER]",
                       "[AUTH_TOKEN]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.deleteAuthTokenCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteAuthTokenRequest,Operation>

deleteAuthTokenOperationCallable()

public final OperationCallable<DeleteAuthTokenRequest,Empty,OperationMetadata> deleteAuthTokenOperationCallable()

Removes a auth token for a user of a token based auth enabled instance.

Sample code:


 // 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()) {
   DeleteAuthTokenRequest request =
       DeleteAuthTokenRequest.newBuilder()
           .setName(
               AuthTokenName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[CLUSTER]",
                       "[TOKEN_AUTH_USER]",
                       "[AUTH_TOKEN]")
                   .toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       cloudRedisClusterClient.deleteAuthTokenOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteAuthTokenRequest,Empty,OperationMetadata>

deleteBackupAsync(@Nullable BackupName name)

public final OperationFuture<Empty,Any> deleteBackupAsync(@Nullable BackupName name)

Deletes a specific backup.

Sample code:


 // 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()) {
   BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]");
   cloudRedisClusterClient.deleteBackupAsync(name).get();
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.BackupName

Required. Redis backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

Returns
Type Description
OperationFuture<Empty,Any>

deleteBackupAsync(DeleteBackupRequest request)

public final OperationFuture<Empty,Any> deleteBackupAsync(DeleteBackupRequest request)

Deletes a specific backup.

Sample code:


 // 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()) {
   DeleteBackupRequest request =
       DeleteBackupRequest.newBuilder()
           .setName(
               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   cloudRedisClusterClient.deleteBackupAsync(request).get();
 }
 
Parameter
Name Description
request DeleteBackupRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,Any>

deleteBackupAsync(String name)

public final OperationFuture<Empty,Any> deleteBackupAsync(String name)

Deletes a specific backup.

Sample code:


 // 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()) {
   String name =
       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]").toString();
   cloudRedisClusterClient.deleteBackupAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Redis backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

Returns
Type Description
OperationFuture<Empty,Any>

deleteBackupCallable()

public final UnaryCallable<DeleteBackupRequest,Operation> deleteBackupCallable()

Deletes a specific backup.

Sample code:


 // 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()) {
   DeleteBackupRequest request =
       DeleteBackupRequest.newBuilder()
           .setName(
               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.deleteBackupCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteBackupRequest,Operation>

deleteBackupOperationCallable()

public final OperationCallable<DeleteBackupRequest,Empty,Any> deleteBackupOperationCallable()

Deletes a specific backup.

Sample code:


 // 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()) {
   DeleteBackupRequest request =
       DeleteBackupRequest.newBuilder()
           .setName(
               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]")
                   .toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, Any> future =
       cloudRedisClusterClient.deleteBackupOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteBackupRequest,Empty,Any>

deleteClusterAsync(@Nullable ClusterName name)

public final OperationFuture<Empty,Any> deleteClusterAsync(@Nullable ClusterName name)

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

Sample code:


 // 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]");
   cloudRedisClusterClient.deleteClusterAsync(name).get();
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.ClusterName

Required. Redis cluster resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id} where location_id refers to a GCP region.

Returns
Type Description
OperationFuture<Empty,Any>

deleteClusterAsync(DeleteClusterRequest request)

public final OperationFuture<Empty,Any> deleteClusterAsync(DeleteClusterRequest request)

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

Sample code:


 // 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()) {
   DeleteClusterRequest request =
       DeleteClusterRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setRequestId("requestId693933066")
           .build();
   cloudRedisClusterClient.deleteClusterAsync(request).get();
 }
 
Parameter
Name Description
request DeleteClusterRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,Any>

deleteClusterAsync(String name)

public final OperationFuture<Empty,Any> deleteClusterAsync(String name)

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

Sample code:


 // 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()) {
   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
   cloudRedisClusterClient.deleteClusterAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. Redis cluster resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id} where location_id refers to a GCP region.

Returns
Type Description
OperationFuture<Empty,Any>

deleteClusterCallable()

public final UnaryCallable<DeleteClusterRequest,Operation> deleteClusterCallable()

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

Sample code:


 // 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()) {
   DeleteClusterRequest request =
       DeleteClusterRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.deleteClusterCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteClusterRequest,Operation>

deleteClusterOperationCallable()

public final OperationCallable<DeleteClusterRequest,Empty,Any> deleteClusterOperationCallable()

Deletes a specific Redis cluster. Cluster stops serving and data is deleted.

Sample code:


 // 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()) {
   DeleteClusterRequest request =
       DeleteClusterRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, Any> future =
       cloudRedisClusterClient.deleteClusterOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteClusterRequest,Empty,Any>

deleteTokenAuthUserAsync(@Nullable TokenAuthUserName name)

public final OperationFuture<Empty,OperationMetadata> deleteTokenAuthUserAsync(@Nullable TokenAuthUserName name)

Deletes a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   TokenAuthUserName name =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]");
   cloudRedisClusterClient.deleteTokenAuthUserAsync(name).get();
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.TokenAuthUserName

Required. The name of the token auth user to delete. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTokenAuthUserAsync(DeleteTokenAuthUserRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteTokenAuthUserAsync(DeleteTokenAuthUserRequest request)

Deletes a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   DeleteTokenAuthUserRequest request =
       DeleteTokenAuthUserRequest.newBuilder()
           .setName(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   cloudRedisClusterClient.deleteTokenAuthUserAsync(request).get();
 }
 
Parameter
Name Description
request DeleteTokenAuthUserRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTokenAuthUserAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteTokenAuthUserAsync(String name)

Deletes a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   String name =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
           .toString();
   cloudRedisClusterClient.deleteTokenAuthUserAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The name of the token auth user to delete. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteTokenAuthUserCallable()

public final UnaryCallable<DeleteTokenAuthUserRequest,Operation> deleteTokenAuthUserCallable()

Deletes a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   DeleteTokenAuthUserRequest request =
       DeleteTokenAuthUserRequest.newBuilder()
           .setName(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.deleteTokenAuthUserCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteTokenAuthUserRequest,Operation>

deleteTokenAuthUserOperationCallable()

public final OperationCallable<DeleteTokenAuthUserRequest,Empty,OperationMetadata> deleteTokenAuthUserOperationCallable()

Deletes a token auth user for a token based auth enabled cluster.

Sample code:


 // 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()) {
   DeleteTokenAuthUserRequest request =
       DeleteTokenAuthUserRequest.newBuilder()
           .setName(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       cloudRedisClusterClient.deleteTokenAuthUserOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteTokenAuthUserRequest,Empty,OperationMetadata>

exportBackupAsync(ExportBackupRequest request)

public final OperationFuture<Backup,Any> exportBackupAsync(ExportBackupRequest request)

Exports a specific backup to a customer target Cloud Storage URI.

Sample code:


 // 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()) {
   ExportBackupRequest request =
       ExportBackupRequest.newBuilder()
           .setName(
               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]")
                   .toString())
           .build();
   Backup response = cloudRedisClusterClient.exportBackupAsync(request).get();
 }
 
Parameter
Name Description
request ExportBackupRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Backup,Any>

exportBackupCallable()

public final UnaryCallable<ExportBackupRequest,Operation> exportBackupCallable()

Exports a specific backup to a customer target Cloud Storage URI.

Sample code:


 // 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()) {
   ExportBackupRequest request =
       ExportBackupRequest.newBuilder()
           .setName(
               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.exportBackupCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<ExportBackupRequest,Operation>

exportBackupOperationCallable()

public final OperationCallable<ExportBackupRequest,Backup,Any> exportBackupOperationCallable()

Exports a specific backup to a customer target Cloud Storage URI.

Sample code:


 // 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()) {
   ExportBackupRequest request =
       ExportBackupRequest.newBuilder()
           .setName(
               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]")
                   .toString())
           .build();
   OperationFuture<Backup, Any> future =
       cloudRedisClusterClient.exportBackupOperationCallable().futureCall(request);
   // Do something.
   Backup response = future.get();
 }
 
Returns
Type Description
OperationCallable<ExportBackupRequest,Backup,Any>

getAclPolicy(@Nullable AclPolicyName name)

public final AclPolicy getAclPolicy(@Nullable AclPolicyName name)

Gets the details of a specific Redis Cluster ACL policy.

Sample code:


 // 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()) {
   AclPolicyName name = AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]");
   AclPolicy response = cloudRedisClusterClient.getAclPolicy(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.AclPolicyName

Required. Redis ACL policy resource name using the form: projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id} where location_id refers to a Google Cloud region.

Returns
Type Description
AclPolicy

getAclPolicy(GetAclPolicyRequest request)

public final AclPolicy getAclPolicy(GetAclPolicyRequest request)

Gets the details of a specific Redis Cluster ACL policy.

Sample code:


 // 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()) {
   GetAclPolicyRequest request =
       GetAclPolicyRequest.newBuilder()
           .setName(AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString())
           .build();
   AclPolicy response = cloudRedisClusterClient.getAclPolicy(request);
 }
 
Parameter
Name Description
request GetAclPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
AclPolicy

getAclPolicy(String name)

public final AclPolicy getAclPolicy(String name)

Gets the details of a specific Redis Cluster ACL policy.

Sample code:


 // 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()) {
   String name = AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString();
   AclPolicy response = cloudRedisClusterClient.getAclPolicy(name);
 }
 
Parameter
Name Description
name String

Required. Redis ACL policy resource name using the form: projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id} where location_id refers to a Google Cloud region.

Returns
Type Description
AclPolicy

getAclPolicyCallable()

public final UnaryCallable<GetAclPolicyRequest,AclPolicy> getAclPolicyCallable()

Gets the details of a specific Redis Cluster ACL policy.

Sample code:


 // 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()) {
   GetAclPolicyRequest request =
       GetAclPolicyRequest.newBuilder()
           .setName(AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString())
           .build();
   ApiFuture<AclPolicy> future =
       cloudRedisClusterClient.getAclPolicyCallable().futureCall(request);
   // Do something.
   AclPolicy response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetAclPolicyRequest,AclPolicy>

getAclPolicyRevision(@Nullable AclPolicyRevisionName name)

public final AclPolicyRevision getAclPolicyRevision(@Nullable AclPolicyRevisionName name)

Gets details of a specific ACL policy revision.

Sample code:


 // 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()) {
   AclPolicyRevisionName name =
       AclPolicyRevisionName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]", "[REVISION]");
   AclPolicyRevision response = cloudRedisClusterClient.getAclPolicyRevision(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.AclPolicyRevisionName

Required. Redis ACL policy revision resource name using the form: projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}/revisions/{revision_id} where location_id refers to a Google Cloud region.

Returns
Type Description
AclPolicyRevision

getAclPolicyRevision(GetAclPolicyRevisionRequest request)

public final AclPolicyRevision getAclPolicyRevision(GetAclPolicyRevisionRequest request)

Gets details of a specific ACL policy revision.

Sample code:


 // 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()) {
   GetAclPolicyRevisionRequest request =
       GetAclPolicyRevisionRequest.newBuilder()
           .setName(
               AclPolicyRevisionName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]", "[REVISION]")
                   .toString())
           .build();
   AclPolicyRevision response = cloudRedisClusterClient.getAclPolicyRevision(request);
 }
 
Parameter
Name Description
request GetAclPolicyRevisionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
AclPolicyRevision

getAclPolicyRevision(String name)

public final AclPolicyRevision getAclPolicyRevision(String name)

Gets details of a specific ACL policy revision.

Sample code:


 // 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()) {
   String name =
       AclPolicyRevisionName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]", "[REVISION]")
           .toString();
   AclPolicyRevision response = cloudRedisClusterClient.getAclPolicyRevision(name);
 }
 
Parameter
Name Description
name String

Required. Redis ACL policy revision resource name using the form: projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}/revisions/{revision_id} where location_id refers to a Google Cloud region.

Returns
Type Description
AclPolicyRevision

getAclPolicyRevisionCallable()

public final UnaryCallable<GetAclPolicyRevisionRequest,AclPolicyRevision> getAclPolicyRevisionCallable()

Gets details of a specific ACL policy revision.

Sample code:


 // 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()) {
   GetAclPolicyRevisionRequest request =
       GetAclPolicyRevisionRequest.newBuilder()
           .setName(
               AclPolicyRevisionName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]", "[REVISION]")
                   .toString())
           .build();
   ApiFuture<AclPolicyRevision> future =
       cloudRedisClusterClient.getAclPolicyRevisionCallable().futureCall(request);
   // Do something.
   AclPolicyRevision response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetAclPolicyRevisionRequest,AclPolicyRevision>

getAuthToken(@Nullable AuthTokenName name)

public final AuthToken getAuthToken(@Nullable AuthTokenName name)

Gets a specific auth token for a specific token auth user.

Sample code:


 // 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()) {
   AuthTokenName name =
       AuthTokenName.of(
           "[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]", "[AUTH_TOKEN]");
   AuthToken response = cloudRedisClusterClient.getAuthToken(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.AuthTokenName

Required. The name of auth token for a token based auth enabled cluster. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}

Returns
Type Description
AuthToken

getAuthToken(GetAuthTokenRequest request)

public final AuthToken getAuthToken(GetAuthTokenRequest request)

Gets a specific auth token for a specific token auth user.

Sample code:


 // 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()) {
   GetAuthTokenRequest request =
       GetAuthTokenRequest.newBuilder()
           .setName(
               AuthTokenName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[CLUSTER]",
                       "[TOKEN_AUTH_USER]",
                       "[AUTH_TOKEN]")
                   .toString())
           .build();
   AuthToken response = cloudRedisClusterClient.getAuthToken(request);
 }
 
Parameter
Name Description
request GetAuthTokenRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
AuthToken

getAuthToken(String name)

public final AuthToken getAuthToken(String name)

Gets a specific auth token for a specific token auth user.

Sample code:


 // 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()) {
   String name =
       AuthTokenName.of(
               "[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]", "[AUTH_TOKEN]")
           .toString();
   AuthToken response = cloudRedisClusterClient.getAuthToken(name);
 }
 
Parameter
Name Description
name String

Required. The name of auth token for a token based auth enabled cluster. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}/authTokens/{auth_token}

Returns
Type Description
AuthToken

getAuthTokenCallable()

public final UnaryCallable<GetAuthTokenRequest,AuthToken> getAuthTokenCallable()

Gets a specific auth token for a specific token auth user.

Sample code:


 // 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()) {
   GetAuthTokenRequest request =
       GetAuthTokenRequest.newBuilder()
           .setName(
               AuthTokenName.of(
                       "[PROJECT]",
                       "[LOCATION]",
                       "[CLUSTER]",
                       "[TOKEN_AUTH_USER]",
                       "[AUTH_TOKEN]")
                   .toString())
           .build();
   ApiFuture<AuthToken> future =
       cloudRedisClusterClient.getAuthTokenCallable().futureCall(request);
   // Do something.
   AuthToken response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetAuthTokenRequest,AuthToken>

getBackup(@Nullable BackupName name)

public final Backup getBackup(@Nullable BackupName name)

Gets the details of a specific backup.

Sample code:


 // 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()) {
   BackupName name = BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]");
   Backup response = cloudRedisClusterClient.getBackup(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.BackupName

Required. Redis backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

Returns
Type Description
Backup

getBackup(GetBackupRequest request)

public final Backup getBackup(GetBackupRequest request)

Gets the details of a specific backup.

Sample code:


 // 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()) {
   GetBackupRequest request =
       GetBackupRequest.newBuilder()
           .setName(
               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]")
                   .toString())
           .build();
   Backup response = cloudRedisClusterClient.getBackup(request);
 }
 
Parameter
Name Description
request GetBackupRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Backup

getBackup(String name)

public final Backup getBackup(String name)

Gets the details of a specific backup.

Sample code:


 // 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()) {
   String name =
       BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]").toString();
   Backup response = cloudRedisClusterClient.getBackup(name);
 }
 
Parameter
Name Description
name String

Required. Redis backup resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}

Returns
Type Description
Backup

getBackupCallable()

public final UnaryCallable<GetBackupRequest,Backup> getBackupCallable()

Gets the details of a specific backup.

Sample code:


 // 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()) {
   GetBackupRequest request =
       GetBackupRequest.newBuilder()
           .setName(
               BackupName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]", "[BACKUP]")
                   .toString())
           .build();
   ApiFuture<Backup> future = cloudRedisClusterClient.getBackupCallable().futureCall(request);
   // Do something.
   Backup response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetBackupRequest,Backup>

getBackupCollection(@Nullable BackupCollectionName name)

public final BackupCollection getBackupCollection(@Nullable BackupCollectionName name)

Get a backup collection.

Sample code:


 // 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()) {
   BackupCollectionName name =
       BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]");
   BackupCollection response = cloudRedisClusterClient.getBackupCollection(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.BackupCollectionName

Required. Redis backupCollection resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} where location_id refers to a GCP region.

Returns
Type Description
BackupCollection

getBackupCollection(GetBackupCollectionRequest request)

public final BackupCollection getBackupCollection(GetBackupCollectionRequest request)

Get a backup collection.

Sample code:


 // 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()) {
   GetBackupCollectionRequest request =
       GetBackupCollectionRequest.newBuilder()
           .setName(
               BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]")
                   .toString())
           .build();
   BackupCollection response = cloudRedisClusterClient.getBackupCollection(request);
 }
 
Parameter
Name Description
request GetBackupCollectionRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BackupCollection

getBackupCollection(String name)

public final BackupCollection getBackupCollection(String name)

Get a backup collection.

Sample code:


 // 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()) {
   String name =
       BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]").toString();
   BackupCollection response = cloudRedisClusterClient.getBackupCollection(name);
 }
 
Parameter
Name Description
name String

Required. Redis backupCollection resource name using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id} where location_id refers to a GCP region.

Returns
Type Description
BackupCollection

getBackupCollectionCallable()

public final UnaryCallable<GetBackupCollectionRequest,BackupCollection> getBackupCollectionCallable()

Get a backup collection.

Sample code:


 // 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()) {
   GetBackupCollectionRequest request =
       GetBackupCollectionRequest.newBuilder()
           .setName(
               BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]")
                   .toString())
           .build();
   ApiFuture<BackupCollection> future =
       cloudRedisClusterClient.getBackupCollectionCallable().futureCall(request);
   // Do something.
   BackupCollection response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetBackupCollectionRequest,BackupCollection>

getCluster(@Nullable ClusterName name)

public final Cluster getCluster(@Nullable ClusterName name)

Gets the details of a specific Redis cluster.

Sample code:


 // 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);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.ClusterName

Required. Redis cluster resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id} where location_id refers to a GCP region.

Returns
Type Description
Cluster

getCluster(GetClusterRequest request)

public final Cluster getCluster(GetClusterRequest request)

Gets the details of a specific Redis cluster.

Sample code:


 // 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()) {
   GetClusterRequest request =
       GetClusterRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .build();
   Cluster response = cloudRedisClusterClient.getCluster(request);
 }
 
Parameter
Name Description
request GetClusterRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Cluster

getCluster(String name)

public final Cluster getCluster(String name)

Gets the details of a specific Redis cluster.

Sample code:


 // 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()) {
   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
   Cluster response = cloudRedisClusterClient.getCluster(name);
 }
 
Parameter
Name Description
name String

Required. Redis cluster resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id} where location_id refers to a GCP region.

Returns
Type Description
Cluster

getClusterCallable()

public final UnaryCallable<GetClusterRequest,Cluster> getClusterCallable()

Gets the details of a specific Redis cluster.

Sample code:


 // 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()) {
   GetClusterRequest request =
       GetClusterRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .build();
   ApiFuture<Cluster> future = cloudRedisClusterClient.getClusterCallable().futureCall(request);
   // Do something.
   Cluster response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetClusterRequest,Cluster>

getClusterCertificateAuthority(@Nullable CertificateAuthorityName name)

public final CertificateAuthority getClusterCertificateAuthority(@Nullable CertificateAuthorityName name)

Gets the details of certificate authority information for Redis cluster.

Sample code:


 // 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()) {
   CertificateAuthorityName name =
       CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
   CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.CertificateAuthorityName

Required. Redis cluster certificate authority resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority where location_id refers to a GCP region.

Returns
Type Description
CertificateAuthority

getClusterCertificateAuthority(GetClusterCertificateAuthorityRequest request)

public final CertificateAuthority getClusterCertificateAuthority(GetClusterCertificateAuthorityRequest request)

Gets the details of certificate authority information for Redis cluster.

Sample code:


 // 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()) {
   GetClusterCertificateAuthorityRequest request =
       GetClusterCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .build();
   CertificateAuthority response =
       cloudRedisClusterClient.getClusterCertificateAuthority(request);
 }
 
Parameter
Name Description
request GetClusterCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CertificateAuthority

getClusterCertificateAuthority(String name)

public final CertificateAuthority getClusterCertificateAuthority(String name)

Gets the details of certificate authority information for Redis cluster.

Sample code:


 // 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()) {
   String name = CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
   CertificateAuthority response = cloudRedisClusterClient.getClusterCertificateAuthority(name);
 }
 
Parameter
Name Description
name String

Required. Redis cluster certificate authority resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority where location_id refers to a GCP region.

Returns
Type Description
CertificateAuthority

getClusterCertificateAuthorityCallable()

public final UnaryCallable<GetClusterCertificateAuthorityRequest,CertificateAuthority> getClusterCertificateAuthorityCallable()

Gets the details of certificate authority information for Redis cluster.

Sample code:


 // 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()) {
   GetClusterCertificateAuthorityRequest request =
       GetClusterCertificateAuthorityRequest.newBuilder()
           .setName(
               CertificateAuthorityName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .build();
   ApiFuture<CertificateAuthority> future =
       cloudRedisClusterClient.getClusterCertificateAuthorityCallable().futureCall(request);
   // Do something.
   CertificateAuthority response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetClusterCertificateAuthorityRequest,CertificateAuthority>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


 // 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()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = cloudRedisClusterClient.getLocation(request);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


 // 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()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future =
       cloudRedisClusterClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getSettings()

public final @Nullable CloudRedisClusterSettings getSettings()
Returns
Type Description
@org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.CloudRedisClusterSettings

getSharedRegionalCertificateAuthority(@Nullable SharedRegionalCertificateAuthorityName name)

public final SharedRegionalCertificateAuthority getSharedRegionalCertificateAuthority(@Nullable SharedRegionalCertificateAuthorityName name)

Gets the details of regional certificate authority information for Redis cluster.

Sample code:


 // 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()) {
   SharedRegionalCertificateAuthorityName name =
       SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]");
   SharedRegionalCertificateAuthority response =
       cloudRedisClusterClient.getSharedRegionalCertificateAuthority(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthorityName

Required. Regional certificate authority resource name using the form: projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority where location_id refers to a Google Cloud region.

Returns
Type Description
SharedRegionalCertificateAuthority

getSharedRegionalCertificateAuthority(GetSharedRegionalCertificateAuthorityRequest request)

public final SharedRegionalCertificateAuthority getSharedRegionalCertificateAuthority(GetSharedRegionalCertificateAuthorityRequest request)

Gets the details of regional certificate authority information for Redis cluster.

Sample code:


 // 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()) {
   GetSharedRegionalCertificateAuthorityRequest request =
       GetSharedRegionalCertificateAuthorityRequest.newBuilder()
           .setName(
               SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString())
           .build();
   SharedRegionalCertificateAuthority response =
       cloudRedisClusterClient.getSharedRegionalCertificateAuthority(request);
 }
 
Parameter
Name Description
request GetSharedRegionalCertificateAuthorityRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
SharedRegionalCertificateAuthority

getSharedRegionalCertificateAuthority(String name)

public final SharedRegionalCertificateAuthority getSharedRegionalCertificateAuthority(String name)

Gets the details of regional certificate authority information for Redis cluster.

Sample code:


 // 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()) {
   String name = SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString();
   SharedRegionalCertificateAuthority response =
       cloudRedisClusterClient.getSharedRegionalCertificateAuthority(name);
 }
 
Parameter
Name Description
name String

Required. Regional certificate authority resource name using the form: projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority where location_id refers to a Google Cloud region.

Returns
Type Description
SharedRegionalCertificateAuthority

getSharedRegionalCertificateAuthorityCallable()

public final UnaryCallable<GetSharedRegionalCertificateAuthorityRequest,SharedRegionalCertificateAuthority> getSharedRegionalCertificateAuthorityCallable()

Gets the details of regional certificate authority information for Redis cluster.

Sample code:


 // 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()) {
   GetSharedRegionalCertificateAuthorityRequest request =
       GetSharedRegionalCertificateAuthorityRequest.newBuilder()
           .setName(
               SharedRegionalCertificateAuthorityName.of("[PROJECT]", "[LOCATION]").toString())
           .build();
   ApiFuture<SharedRegionalCertificateAuthority> future =
       cloudRedisClusterClient
           .getSharedRegionalCertificateAuthorityCallable()
           .futureCall(request);
   // Do something.
   SharedRegionalCertificateAuthority response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetSharedRegionalCertificateAuthorityRequest,SharedRegionalCertificateAuthority>

getStub()

public CloudRedisClusterStub getStub()
Returns
Type Description
CloudRedisClusterStub

getTokenAuthUser(@Nullable TokenAuthUserName name)

public final TokenAuthUser getTokenAuthUser(@Nullable TokenAuthUserName name)

Gets a specific token auth user for a basic auth enabled cluster.

Sample code:


 // 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()) {
   TokenAuthUserName name =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]");
   TokenAuthUser response = cloudRedisClusterClient.getTokenAuthUser(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.TokenAuthUserName

Required. The name of token auth user for a token based auth enabled cluster. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

Returns
Type Description
TokenAuthUser

getTokenAuthUser(GetTokenAuthUserRequest request)

public final TokenAuthUser getTokenAuthUser(GetTokenAuthUserRequest request)

Gets a specific token auth user for a basic auth enabled cluster.

Sample code:


 // 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()) {
   GetTokenAuthUserRequest request =
       GetTokenAuthUserRequest.newBuilder()
           .setName(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .build();
   TokenAuthUser response = cloudRedisClusterClient.getTokenAuthUser(request);
 }
 
Parameter
Name Description
request GetTokenAuthUserRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
TokenAuthUser

getTokenAuthUser(String name)

public final TokenAuthUser getTokenAuthUser(String name)

Gets a specific token auth user for a basic auth enabled cluster.

Sample code:


 // 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()) {
   String name =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
           .toString();
   TokenAuthUser response = cloudRedisClusterClient.getTokenAuthUser(name);
 }
 
Parameter
Name Description
name String

Required. The name of token auth user for a token based auth enabled cluster. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

Returns
Type Description
TokenAuthUser

getTokenAuthUserCallable()

public final UnaryCallable<GetTokenAuthUserRequest,TokenAuthUser> getTokenAuthUserCallable()

Gets a specific token auth user for a basic auth enabled cluster.

Sample code:


 // 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()) {
   GetTokenAuthUserRequest request =
       GetTokenAuthUserRequest.newBuilder()
           .setName(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .build();
   ApiFuture<TokenAuthUser> future =
       cloudRedisClusterClient.getTokenAuthUserCallable().futureCall(request);
   // Do something.
   TokenAuthUser response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetTokenAuthUserRequest,TokenAuthUser>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listAclPolicies(@Nullable LocationName parent)

public final CloudRedisClusterClient.ListAclPoliciesPagedResponse listAclPolicies(@Nullable LocationName parent)

Lists all ACL policies owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (AclPolicy element : cloudRedisClusterClient.listAclPolicies(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.LocationName

Required. The resource name of the ACL policy location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a Google Cloud region.

Returns
Type Description
CloudRedisClusterClient.ListAclPoliciesPagedResponse

listAclPolicies(ListAclPoliciesRequest request)

public final CloudRedisClusterClient.ListAclPoliciesPagedResponse listAclPolicies(ListAclPoliciesRequest request)

Lists all ACL policies owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListAclPoliciesRequest request =
       ListAclPoliciesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (AclPolicy element : cloudRedisClusterClient.listAclPolicies(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListAclPoliciesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CloudRedisClusterClient.ListAclPoliciesPagedResponse

listAclPolicies(String parent)

public final CloudRedisClusterClient.ListAclPoliciesPagedResponse listAclPolicies(String parent)

Lists all ACL policies owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (AclPolicy element : cloudRedisClusterClient.listAclPolicies(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The resource name of the ACL policy location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a Google Cloud region.

Returns
Type Description
CloudRedisClusterClient.ListAclPoliciesPagedResponse

listAclPoliciesCallable()

public final UnaryCallable<ListAclPoliciesRequest,ListAclPoliciesResponse> listAclPoliciesCallable()

Lists all ACL policies owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListAclPoliciesRequest request =
       ListAclPoliciesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListAclPoliciesResponse response =
         cloudRedisClusterClient.listAclPoliciesCallable().call(request);
     for (AclPolicy element : response.getAclPoliciesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListAclPoliciesRequest,ListAclPoliciesResponse>

listAclPoliciesPagedCallable()

public final UnaryCallable<ListAclPoliciesRequest,CloudRedisClusterClient.ListAclPoliciesPagedResponse> listAclPoliciesPagedCallable()

Lists all ACL policies owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListAclPoliciesRequest request =
       ListAclPoliciesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<AclPolicy> future =
       cloudRedisClusterClient.listAclPoliciesPagedCallable().futureCall(request);
   // Do something.
   for (AclPolicy element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListAclPoliciesRequest,ListAclPoliciesPagedResponse>

listAclPolicyRevisions(@Nullable AclPolicyName parent)

public final CloudRedisClusterClient.ListAclPolicyRevisionsPagedResponse listAclPolicyRevisions(@Nullable AclPolicyName parent)

Lists all ACL policy revisions in a given ACL policy.

Sample code:


 // 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()) {
   AclPolicyName parent = AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]");
   for (AclPolicyRevision element :
       cloudRedisClusterClient.listAclPolicyRevisions(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.AclPolicyName

Required. The name of the ACL policy to list revisions for. Format: "projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}"

Returns
Type Description
CloudRedisClusterClient.ListAclPolicyRevisionsPagedResponse

listAclPolicyRevisions(ListAclPolicyRevisionsRequest request)

public final CloudRedisClusterClient.ListAclPolicyRevisionsPagedResponse listAclPolicyRevisions(ListAclPolicyRevisionsRequest request)

Lists all ACL policy revisions in a given ACL policy.

Sample code:


 // 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()) {
   ListAclPolicyRevisionsRequest request =
       ListAclPolicyRevisionsRequest.newBuilder()
           .setParent(AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (AclPolicyRevision element :
       cloudRedisClusterClient.listAclPolicyRevisions(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListAclPolicyRevisionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CloudRedisClusterClient.ListAclPolicyRevisionsPagedResponse

listAclPolicyRevisions(String parent)

public final CloudRedisClusterClient.ListAclPolicyRevisionsPagedResponse listAclPolicyRevisions(String parent)

Lists all ACL policy revisions in a given ACL policy.

Sample code:


 // 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()) {
   String parent = AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString();
   for (AclPolicyRevision element :
       cloudRedisClusterClient.listAclPolicyRevisions(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The name of the ACL policy to list revisions for. Format: "projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}"

Returns
Type Description
CloudRedisClusterClient.ListAclPolicyRevisionsPagedResponse

listAclPolicyRevisionsCallable()

public final UnaryCallable<ListAclPolicyRevisionsRequest,ListAclPolicyRevisionsResponse> listAclPolicyRevisionsCallable()

Lists all ACL policy revisions in a given ACL policy.

Sample code:


 // 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()) {
   ListAclPolicyRevisionsRequest request =
       ListAclPolicyRevisionsRequest.newBuilder()
           .setParent(AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListAclPolicyRevisionsResponse response =
         cloudRedisClusterClient.listAclPolicyRevisionsCallable().call(request);
     for (AclPolicyRevision element : response.getAclPolicyRevisionsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListAclPolicyRevisionsRequest,ListAclPolicyRevisionsResponse>

listAclPolicyRevisionsPagedCallable()

public final UnaryCallable<ListAclPolicyRevisionsRequest,CloudRedisClusterClient.ListAclPolicyRevisionsPagedResponse> listAclPolicyRevisionsPagedCallable()

Lists all ACL policy revisions in a given ACL policy.

Sample code:


 // 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()) {
   ListAclPolicyRevisionsRequest request =
       ListAclPolicyRevisionsRequest.newBuilder()
           .setParent(AclPolicyName.of("[PROJECT]", "[LOCATION]", "[ACL_POLICY]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<AclPolicyRevision> future =
       cloudRedisClusterClient.listAclPolicyRevisionsPagedCallable().futureCall(request);
   // Do something.
   for (AclPolicyRevision element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListAclPolicyRevisionsRequest,ListAclPolicyRevisionsPagedResponse>

listAuthTokens(@Nullable TokenAuthUserName parent)

public final CloudRedisClusterClient.ListAuthTokensPagedResponse listAuthTokens(@Nullable TokenAuthUserName parent)

Lists all the auth tokens for a specific token auth user.

Sample code:


 // 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()) {
   TokenAuthUserName parent =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]");
   for (AuthToken element : cloudRedisClusterClient.listAuthTokens(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.TokenAuthUserName

Required. The parent resource that this auth token will be listed for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

Returns
Type Description
CloudRedisClusterClient.ListAuthTokensPagedResponse

listAuthTokens(ListAuthTokensRequest request)

public final CloudRedisClusterClient.ListAuthTokensPagedResponse listAuthTokens(ListAuthTokensRequest request)

Lists all the auth tokens for a specific token auth user.

Sample code:


 // 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()) {
   ListAuthTokensRequest request =
       ListAuthTokensRequest.newBuilder()
           .setParent(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (AuthToken element : cloudRedisClusterClient.listAuthTokens(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListAuthTokensRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CloudRedisClusterClient.ListAuthTokensPagedResponse

listAuthTokens(String parent)

public final CloudRedisClusterClient.ListAuthTokensPagedResponse listAuthTokens(String parent)

Lists all the auth tokens for a specific token auth user.

Sample code:


 // 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()) {
   String parent =
       TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
           .toString();
   for (AuthToken element : cloudRedisClusterClient.listAuthTokens(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent resource that this auth token will be listed for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

Returns
Type Description
CloudRedisClusterClient.ListAuthTokensPagedResponse

listAuthTokensCallable()

public final UnaryCallable<ListAuthTokensRequest,ListAuthTokensResponse> listAuthTokensCallable()

Lists all the auth tokens for a specific token auth user.

Sample code:


 // 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()) {
   ListAuthTokensRequest request =
       ListAuthTokensRequest.newBuilder()
           .setParent(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListAuthTokensResponse response =
         cloudRedisClusterClient.listAuthTokensCallable().call(request);
     for (AuthToken element : response.getAuthTokensList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListAuthTokensRequest,ListAuthTokensResponse>

listAuthTokensPagedCallable()

public final UnaryCallable<ListAuthTokensRequest,CloudRedisClusterClient.ListAuthTokensPagedResponse> listAuthTokensPagedCallable()

Lists all the auth tokens for a specific token auth user.

Sample code:


 // 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()) {
   ListAuthTokensRequest request =
       ListAuthTokensRequest.newBuilder()
           .setParent(
               TokenAuthUserName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]", "[TOKEN_AUTH_USER]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<AuthToken> future =
       cloudRedisClusterClient.listAuthTokensPagedCallable().futureCall(request);
   // Do something.
   for (AuthToken element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListAuthTokensRequest,ListAuthTokensPagedResponse>

listBackupCollections(@Nullable LocationName parent)

public final CloudRedisClusterClient.ListBackupCollectionsPagedResponse listBackupCollections(@Nullable LocationName parent)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (BackupCollection element :
       cloudRedisClusterClient.listBackupCollections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.LocationName

Required. The resource name of the backupCollection location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a GCP region.

Returns
Type Description
CloudRedisClusterClient.ListBackupCollectionsPagedResponse

listBackupCollections(ListBackupCollectionsRequest request)

public final CloudRedisClusterClient.ListBackupCollectionsPagedResponse listBackupCollections(ListBackupCollectionsRequest request)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListBackupCollectionsRequest request =
       ListBackupCollectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (BackupCollection element :
       cloudRedisClusterClient.listBackupCollections(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListBackupCollectionsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CloudRedisClusterClient.ListBackupCollectionsPagedResponse

listBackupCollections(String parent)

public final CloudRedisClusterClient.ListBackupCollectionsPagedResponse listBackupCollections(String parent)

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (BackupCollection element :
       cloudRedisClusterClient.listBackupCollections(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The resource name of the backupCollection location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a GCP region.

Returns
Type Description
CloudRedisClusterClient.ListBackupCollectionsPagedResponse

listBackupCollectionsCallable()

public final UnaryCallable<ListBackupCollectionsRequest,ListBackupCollectionsResponse> listBackupCollectionsCallable()

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListBackupCollectionsRequest request =
       ListBackupCollectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListBackupCollectionsResponse response =
         cloudRedisClusterClient.listBackupCollectionsCallable().call(request);
     for (BackupCollection element : response.getBackupCollectionsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupCollectionsRequest,ListBackupCollectionsResponse>

listBackupCollectionsPagedCallable()

public final UnaryCallable<ListBackupCollectionsRequest,CloudRedisClusterClient.ListBackupCollectionsPagedResponse> listBackupCollectionsPagedCallable()

Lists all backup collections owned by a consumer project in either the specified location (region) or all locations.

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListBackupCollectionsRequest request =
       ListBackupCollectionsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<BackupCollection> future =
       cloudRedisClusterClient.listBackupCollectionsPagedCallable().futureCall(request);
   // Do something.
   for (BackupCollection element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupCollectionsRequest,ListBackupCollectionsPagedResponse>

listBackups(@Nullable BackupCollectionName parent)

public final CloudRedisClusterClient.ListBackupsPagedResponse listBackups(@Nullable BackupCollectionName parent)

Lists all backups owned by a backup collection.

Sample code:


 // 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()) {
   BackupCollectionName parent =
       BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]");
   for (Backup element : cloudRedisClusterClient.listBackups(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.BackupCollectionName

Required. The resource name of the backupCollection using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}

Returns
Type Description
CloudRedisClusterClient.ListBackupsPagedResponse

listBackups(ListBackupsRequest request)

public final CloudRedisClusterClient.ListBackupsPagedResponse listBackups(ListBackupsRequest request)

Lists all backups owned by a backup collection.

Sample code:


 // 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()) {
   ListBackupsRequest request =
       ListBackupsRequest.newBuilder()
           .setParent(
               BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Backup element : cloudRedisClusterClient.listBackups(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListBackupsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CloudRedisClusterClient.ListBackupsPagedResponse

listBackups(String parent)

public final CloudRedisClusterClient.ListBackupsPagedResponse listBackups(String parent)

Lists all backups owned by a backup collection.

Sample code:


 // 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()) {
   String parent =
       BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]").toString();
   for (Backup element : cloudRedisClusterClient.listBackups(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The resource name of the backupCollection using the form: projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}

Returns
Type Description
CloudRedisClusterClient.ListBackupsPagedResponse

listBackupsCallable()

public final UnaryCallable<ListBackupsRequest,ListBackupsResponse> listBackupsCallable()

Lists all backups owned by a backup collection.

Sample code:


 // 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()) {
   ListBackupsRequest request =
       ListBackupsRequest.newBuilder()
           .setParent(
               BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListBackupsResponse response = cloudRedisClusterClient.listBackupsCallable().call(request);
     for (Backup element : response.getBackupsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupsRequest,ListBackupsResponse>

listBackupsPagedCallable()

public final UnaryCallable<ListBackupsRequest,CloudRedisClusterClient.ListBackupsPagedResponse> listBackupsPagedCallable()

Lists all backups owned by a backup collection.

Sample code:


 // 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()) {
   ListBackupsRequest request =
       ListBackupsRequest.newBuilder()
           .setParent(
               BackupCollectionName.of("[PROJECT]", "[LOCATION]", "[BACKUP_COLLECTION]")
                   .toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Backup> future =
       cloudRedisClusterClient.listBackupsPagedCallable().futureCall(request);
   // Do something.
   for (Backup element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListBackupsRequest,ListBackupsPagedResponse>

listClusters(@Nullable LocationName parent)

public final CloudRedisClusterClient.ListClustersPagedResponse listClusters(@Nullable LocationName parent)

Lists all Redis clusters owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.LocationName

Required. The resource name of the cluster location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a GCP region.

Returns
Type Description
CloudRedisClusterClient.ListClustersPagedResponse

listClusters(ListClustersRequest request)

public final CloudRedisClusterClient.ListClustersPagedResponse listClusters(ListClustersRequest request)

Lists all Redis clusters owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListClustersRequest request =
       ListClustersRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Cluster element : cloudRedisClusterClient.listClusters(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListClustersRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CloudRedisClusterClient.ListClustersPagedResponse

listClusters(String parent)

public final CloudRedisClusterClient.ListClustersPagedResponse listClusters(String parent)

Lists all Redis clusters owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Cluster element : cloudRedisClusterClient.listClusters(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The resource name of the cluster location using the form: projects/{project_id}/locations/{location_id} where location_id refers to a GCP region.

Returns
Type Description
CloudRedisClusterClient.ListClustersPagedResponse

listClustersCallable()

public final UnaryCallable<ListClustersRequest,ListClustersResponse> listClustersCallable()

Lists all Redis clusters owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListClustersRequest request =
       ListClustersRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListClustersResponse response =
         cloudRedisClusterClient.listClustersCallable().call(request);
     for (Cluster element : response.getClustersList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListClustersRequest,ListClustersResponse>

listClustersPagedCallable()

public final UnaryCallable<ListClustersRequest,CloudRedisClusterClient.ListClustersPagedResponse> listClustersPagedCallable()

Lists all Redis clusters owned by a project in either the specified location (region) or all locations.

The location should have the following format:

  • projects/{project_id}/locations/{location_id}

If location_id is specified as - (wildcard), then all regions available to the project are queried, and the results are aggregated.

Sample code:


 // 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()) {
   ListClustersRequest request =
       ListClustersRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Cluster> future =
       cloudRedisClusterClient.listClustersPagedCallable().futureCall(request);
   // Do something.
   for (Cluster element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListClustersRequest,ListClustersPagedResponse>

listLocations(ListLocationsRequest request)

public final CloudRedisClusterClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample code:


 // 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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : cloudRedisClusterClient.listLocations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CloudRedisClusterClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response =
         cloudRedisClusterClient.listLocationsCallable().call(request);
     for (Location element : response.getLocationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,CloudRedisClusterClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample code:


 // 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()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future =
       cloudRedisClusterClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

listTokenAuthUsers(@Nullable ClusterName parent)

public final CloudRedisClusterClient.ListTokenAuthUsersPagedResponse listTokenAuthUsers(@Nullable ClusterName parent)

Lists all the token auth users for a token based auth enabled cluster.

Sample code:


 // 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 parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]");
   for (TokenAuthUser element :
       cloudRedisClusterClient.listTokenAuthUsers(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.ClusterName

Required. The parent resource that this token based auth user will be listed for. Format: projects/{project}/locations/{location}/clusters/{cluster}

Returns
Type Description
CloudRedisClusterClient.ListTokenAuthUsersPagedResponse

listTokenAuthUsers(ListTokenAuthUsersRequest request)

public final CloudRedisClusterClient.ListTokenAuthUsersPagedResponse listTokenAuthUsers(ListTokenAuthUsersRequest request)

Lists all the token auth users for a token based auth enabled cluster.

Sample code:


 // 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()) {
   ListTokenAuthUsersRequest request =
       ListTokenAuthUsersRequest.newBuilder()
           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (TokenAuthUser element :
       cloudRedisClusterClient.listTokenAuthUsers(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListTokenAuthUsersRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
CloudRedisClusterClient.ListTokenAuthUsersPagedResponse

listTokenAuthUsers(String parent)

public final CloudRedisClusterClient.ListTokenAuthUsersPagedResponse listTokenAuthUsers(String parent)

Lists all the token auth users for a token based auth enabled cluster.

Sample code:


 // 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()) {
   String parent = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
   for (TokenAuthUser element :
       cloudRedisClusterClient.listTokenAuthUsers(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent resource that this token based auth user will be listed for. Format: projects/{project}/locations/{location}/clusters/{cluster}

Returns
Type Description
CloudRedisClusterClient.ListTokenAuthUsersPagedResponse

listTokenAuthUsersCallable()

public final UnaryCallable<ListTokenAuthUsersRequest,ListTokenAuthUsersResponse> listTokenAuthUsersCallable()

Lists all the token auth users for a token based auth enabled cluster.

Sample code:


 // 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()) {
   ListTokenAuthUsersRequest request =
       ListTokenAuthUsersRequest.newBuilder()
           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListTokenAuthUsersResponse response =
         cloudRedisClusterClient.listTokenAuthUsersCallable().call(request);
     for (TokenAuthUser element : response.getTokenAuthUsersList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListTokenAuthUsersRequest,ListTokenAuthUsersResponse>

listTokenAuthUsersPagedCallable()

public final UnaryCallable<ListTokenAuthUsersRequest,CloudRedisClusterClient.ListTokenAuthUsersPagedResponse> listTokenAuthUsersPagedCallable()

Lists all the token auth users for a token based auth enabled cluster.

Sample code:


 // 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()) {
   ListTokenAuthUsersRequest request =
       ListTokenAuthUsersRequest.newBuilder()
           .setParent(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<TokenAuthUser> future =
       cloudRedisClusterClient.listTokenAuthUsersPagedCallable().futureCall(request);
   // Do something.
   for (TokenAuthUser element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListTokenAuthUsersRequest,ListTokenAuthUsersPagedResponse>

rescheduleClusterMaintenanceAsync(@Nullable ClusterName name, RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime)

public final OperationFuture<Cluster,Any> rescheduleClusterMaintenanceAsync(@Nullable ClusterName name, RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime)

Reschedules upcoming maintenance event.

Sample code:


 // 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]");
   RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType =
       RescheduleClusterMaintenanceRequest.RescheduleType.forNumber(0);
   Timestamp scheduleTime = Timestamp.newBuilder().build();
   Cluster response =
       cloudRedisClusterClient
           .rescheduleClusterMaintenanceAsync(name, rescheduleType, scheduleTime)
           .get();
 }
 
Parameters
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.redis.cluster.v1.ClusterName

Required. Redis Cluster instance resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id} where location_id refers to a GCP region.

rescheduleType RescheduleClusterMaintenanceRequest.RescheduleType

Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.

scheduleTime Timestamp

Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

Returns
Type Description
OperationFuture<Cluster,Any>

rescheduleClusterMaintenanceAsync(RescheduleClusterMaintenanceRequest request)

public final OperationFuture<Cluster,Any> rescheduleClusterMaintenanceAsync(RescheduleClusterMaintenanceRequest request)

Reschedules upcoming maintenance event.

Sample code:


 // 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()) {
   RescheduleClusterMaintenanceRequest request =
       RescheduleClusterMaintenanceRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setScheduleTime(Timestamp.newBuilder().build())
           .build();
   Cluster response = cloudRedisClusterClient.rescheduleClusterMaintenanceAsync(request).get();
 }
 
Parameter
Name Description
request RescheduleClusterMaintenanceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Cluster,Any>

rescheduleClusterMaintenanceAsync(String name, RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime)

public final OperationFuture<Cluster,Any> rescheduleClusterMaintenanceAsync(String name, RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType, Timestamp scheduleTime)

Reschedules upcoming maintenance event.

Sample code:


 // 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()) {
   String name = ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString();
   RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType =
       RescheduleClusterMaintenanceRequest.RescheduleType.forNumber(0);
   Timestamp scheduleTime = Timestamp.newBuilder().build();
   Cluster response =
       cloudRedisClusterClient
           .rescheduleClusterMaintenanceAsync(name, rescheduleType, scheduleTime)
           .get();
 }
 
Parameters
Name Description
name String

Required. Redis Cluster instance resource name using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id} where location_id refers to a GCP region.

rescheduleType RescheduleClusterMaintenanceRequest.RescheduleType

Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.

scheduleTime Timestamp

Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example 2012-11-15T16:19:00.094Z.

Returns
Type Description
OperationFuture<Cluster,Any>

rescheduleClusterMaintenanceCallable()

public final UnaryCallable<RescheduleClusterMaintenanceRequest,Operation> rescheduleClusterMaintenanceCallable()

Reschedules upcoming maintenance event.

Sample code:


 // 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()) {
   RescheduleClusterMaintenanceRequest request =
       RescheduleClusterMaintenanceRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setScheduleTime(Timestamp.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.rescheduleClusterMaintenanceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<RescheduleClusterMaintenanceRequest,Operation>

rescheduleClusterMaintenanceOperationCallable()

public final OperationCallable<RescheduleClusterMaintenanceRequest,Cluster,Any> rescheduleClusterMaintenanceOperationCallable()

Reschedules upcoming maintenance event.

Sample code:


 // 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()) {
   RescheduleClusterMaintenanceRequest request =
       RescheduleClusterMaintenanceRequest.newBuilder()
           .setName(ClusterName.of("[PROJECT]", "[LOCATION]", "[CLUSTER]").toString())
           .setScheduleTime(Timestamp.newBuilder().build())
           .build();
   OperationFuture<Cluster, Any> future =
       cloudRedisClusterClient
           .rescheduleClusterMaintenanceOperationCallable()
           .futureCall(request);
   // Do something.
   Cluster response = future.get();
 }
 
Returns
Type Description
OperationCallable<RescheduleClusterMaintenanceRequest,Cluster,Any>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateAclPolicyAsync(AclPolicy aclPolicy, FieldMask updateMask)

public final OperationFuture<AclPolicy,OperationMetadata> updateAclPolicyAsync(AclPolicy aclPolicy, FieldMask updateMask)

Updates the ACL policy.

The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters.

Completed longrunning.Operation will contain the new ACL policy object in the response field.

Sample code:


 // 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()) {
   AclPolicy aclPolicy = AclPolicy.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   AclPolicy response =
       cloudRedisClusterClient.updateAclPolicyAsync(aclPolicy, updateMask).get();
 }
 
Parameters
Name Description
aclPolicy AclPolicy

Required. The ACL policy to be updated.

updateMask FieldMask

Optional. Mask of fields to be updated. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from AclPolicy:

* rules

Returns
Type Description
OperationFuture<AclPolicy,OperationMetadata>

updateAclPolicyAsync(UpdateAclPolicyRequest request)

public final OperationFuture<AclPolicy,OperationMetadata> updateAclPolicyAsync(UpdateAclPolicyRequest request)

Updates the ACL policy.

The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters.

Completed longrunning.Operation will contain the new ACL policy object in the response field.

Sample code:


 // 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()) {
   UpdateAclPolicyRequest request =
       UpdateAclPolicyRequest.newBuilder()
           .setAclPolicy(AclPolicy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   AclPolicy response = cloudRedisClusterClient.updateAclPolicyAsync(request).get();
 }
 
Parameter
Name Description
request UpdateAclPolicyRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<AclPolicy,OperationMetadata>

updateAclPolicyCallable()

public final UnaryCallable<UpdateAclPolicyRequest,Operation> updateAclPolicyCallable()

Updates the ACL policy.

The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters.

Completed longrunning.Operation will contain the new ACL policy object in the response field.

Sample code:


 // 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()) {
   UpdateAclPolicyRequest request =
       UpdateAclPolicyRequest.newBuilder()
           .setAclPolicy(AclPolicy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.updateAclPolicyCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateAclPolicyRequest,Operation>

updateAclPolicyOperationCallable()

public final OperationCallable<UpdateAclPolicyRequest,AclPolicy,OperationMetadata> updateAclPolicyOperationCallable()

Updates the ACL policy.

The operation applies the updated ACL policy to all of the linked clusters. If Memorystore can apply the policy to all clusters, then the operation returns a SUCCESS status. If Memorystore can't apply the policy to all clusters, then to ensure eventual consistency, Memorystore uses reconciliation to apply the policy to the failed clusters.

Completed longrunning.Operation will contain the new ACL policy object in the response field.

Sample code:


 // 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()) {
   UpdateAclPolicyRequest request =
       UpdateAclPolicyRequest.newBuilder()
           .setAclPolicy(AclPolicy.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<AclPolicy, OperationMetadata> future =
       cloudRedisClusterClient.updateAclPolicyOperationCallable().futureCall(request);
   // Do something.
   AclPolicy response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateAclPolicyRequest,AclPolicy,OperationMetadata>

updateClusterAsync(Cluster cluster, FieldMask updateMask)

public final OperationFuture<Cluster,Any> updateClusterAsync(Cluster cluster, FieldMask updateMask)

Updates the metadata and configuration of a specific Redis cluster.

Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   Cluster cluster = Cluster.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Cluster response = cloudRedisClusterClient.updateClusterAsync(cluster, updateMask).get();
 }
 
Parameters
Name Description
cluster Cluster

Required. Update description. Only fields specified in update_mask are updated.

updateMask FieldMask

Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster:

* size_gb * replica_count

Returns
Type Description
OperationFuture<Cluster,Any>

updateClusterAsync(UpdateClusterRequest request)

public final OperationFuture<Cluster,Any> updateClusterAsync(UpdateClusterRequest request)

Updates the metadata and configuration of a specific Redis cluster.

Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   UpdateClusterRequest request =
       UpdateClusterRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setCluster(Cluster.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Cluster response = cloudRedisClusterClient.updateClusterAsync(request).get();
 }
 
Parameter
Name Description
request UpdateClusterRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Cluster,Any>

updateClusterCallable()

public final UnaryCallable<UpdateClusterRequest,Operation> updateClusterCallable()

Updates the metadata and configuration of a specific Redis cluster.

Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   UpdateClusterRequest request =
       UpdateClusterRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setCluster(Cluster.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future =
       cloudRedisClusterClient.updateClusterCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateClusterRequest,Operation>

updateClusterOperationCallable()

public final OperationCallable<UpdateClusterRequest,Cluster,Any> updateClusterOperationCallable()

Updates the metadata and configuration of a specific Redis cluster.

Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.

Sample code:


 // 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()) {
   UpdateClusterRequest request =
       UpdateClusterRequest.newBuilder()
           .setUpdateMask(FieldMask.newBuilder().build())
           .setCluster(Cluster.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Cluster, Any> future =
       cloudRedisClusterClient.updateClusterOperationCallable().futureCall(request);
   // Do something.
   Cluster response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateClusterRequest,Cluster,Any>