Class CloudRedisClusterClient

java.lang.Object
com.google.cloud.redis.cluster.v1beta1.CloudRedisClusterClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@BetaApi @Generated("by gapic-generator-java") public class CloudRedisClusterClient extends Object implements BackgroundResource
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()

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

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

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

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

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

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.

  • Constructor Details

    • CloudRedisClusterClient

      protected CloudRedisClusterClient(CloudRedisClusterSettings settings) throws IOException
      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.
      Throws:
      IOException
    • CloudRedisClusterClient

      protected CloudRedisClusterClient(CloudRedisClusterStub stub)
  • Method Details

    • create

      public static final CloudRedisClusterClient create() throws IOException
      Constructs an instance of CloudRedisClusterClient with default settings.
      Throws:
      IOException
    • create

      public static final CloudRedisClusterClient create(CloudRedisClusterSettings settings) throws IOException
      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.
      Throws:
      IOException
    • create

      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).
    • getSettings

      public final CloudRedisClusterSettings getSettings()
    • getStub

      public CloudRedisClusterStub getStub()
    • 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.
    • getHttpJsonOperationsClient

      @BetaApi 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.
    • 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.

      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);
         }
       }
       
      Parameters:
      parent - 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.
      Throws:
      ApiException - if the remote call fails
    • listClusters

      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);
         }
       }
       
      Parameters:
      parent - 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.
      Throws:
      ApiException - if the remote call fails
    • 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.

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • getCluster

      public final Cluster getCluster(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);
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • getCluster

      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);
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • getCluster

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • updateClusterAsync

      public final OperationFuture<Cluster,com.google.protobuf.Any> updateClusterAsync(Cluster cluster, com.google.protobuf.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:
      cluster - Required. Update description. Only fields specified in update_mask are updated.
      updateMask - 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][google.cloud.redis.cluster.v1beta1.Cluster]:

      * `size_gb` * `replica_count`

      Throws:
      ApiException - if the remote call fails
    • updateClusterAsync

      public final OperationFuture<Cluster,com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateClusterOperationCallable

      public final OperationCallable<UpdateClusterRequest,Cluster,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • deleteClusterAsync

      public final OperationFuture<com.google.protobuf.Empty,com.google.protobuf.Any> deleteClusterAsync(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();
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • deleteClusterAsync

      public final OperationFuture<com.google.protobuf.Empty,com.google.protobuf.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();
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • deleteClusterAsync

      public final OperationFuture<com.google.protobuf.Empty,com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteClusterOperationCallable

      public final OperationCallable<DeleteClusterRequest,com.google.protobuf.Empty,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • createClusterAsync

      public final OperationFuture<Cluster,com.google.protobuf.Any> createClusterAsync(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:
      parent - 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 - Required. The cluster that is to be created.
      clusterId - 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
      Throws:
      ApiException - if the remote call fails
    • createClusterAsync

      public final OperationFuture<Cluster,com.google.protobuf.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:
      parent - 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 - Required. The cluster that is to be created.
      clusterId - 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
      Throws:
      ApiException - if the remote call fails
    • createClusterAsync

      public final OperationFuture<Cluster,com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createClusterOperationCallable

      public final OperationCallable<CreateClusterRequest,Cluster,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • getClusterCertificateAuthority

      public final CertificateAuthority getClusterCertificateAuthority(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);
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • getClusterCertificateAuthority

      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);
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • getClusterCertificateAuthority

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • getSharedRegionalCertificateAuthority

      public final SharedRegionalCertificateAuthority getSharedRegionalCertificateAuthority(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);
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • getSharedRegionalCertificateAuthority

      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);
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • getSharedRegionalCertificateAuthority

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • rescheduleClusterMaintenanceAsync

      public final OperationFuture<Cluster,com.google.protobuf.Any> rescheduleClusterMaintenanceAsync(ClusterName name, RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType, com.google.protobuf.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 - 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 - Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
      scheduleTime - 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`.
      Throws:
      ApiException - if the remote call fails
    • rescheduleClusterMaintenanceAsync

      public final OperationFuture<Cluster,com.google.protobuf.Any> rescheduleClusterMaintenanceAsync(String name, RescheduleClusterMaintenanceRequest.RescheduleType rescheduleType, com.google.protobuf.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 - 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 - Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
      scheduleTime - 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`.
      Throws:
      ApiException - if the remote call fails
    • rescheduleClusterMaintenanceAsync

      public final OperationFuture<Cluster,com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • rescheduleClusterMaintenanceOperationCallable

      public final OperationCallable<RescheduleClusterMaintenanceRequest,Cluster,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • listBackupCollections

      public final CloudRedisClusterClient.ListBackupCollectionsPagedResponse listBackupCollections(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);
         }
       }
       
      Parameters:
      parent - 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.
      Throws:
      ApiException - if the remote call fails
    • listBackupCollections

      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);
         }
       }
       
      Parameters:
      parent - 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.
      Throws:
      ApiException - if the remote call fails
    • 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.

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • getBackupCollection

      public final BackupCollection getBackupCollection(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);
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • getBackupCollection

      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);
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • getBackupCollection

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • listBackups

      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);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the backupCollection using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
      Throws:
      ApiException - if the remote call fails
    • listBackups

      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);
         }
       }
       
      Parameters:
      parent - Required. The resource name of the backupCollection using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
      Throws:
      ApiException - if the remote call fails
    • listBackups

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • getBackup

      public final Backup getBackup(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);
       }
       
      Parameters:
      name - Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
      Throws:
      ApiException - if the remote call fails
    • getBackup

      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);
       }
       
      Parameters:
      name - Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
      Throws:
      ApiException - if the remote call fails
    • getBackup

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • deleteBackupAsync

      public final OperationFuture<com.google.protobuf.Empty,com.google.protobuf.Any> deleteBackupAsync(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();
       }
       
      Parameters:
      name - Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
      Throws:
      ApiException - if the remote call fails
    • deleteBackupAsync

      public final OperationFuture<com.google.protobuf.Empty,com.google.protobuf.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();
       }
       
      Parameters:
      name - Required. Redis backup resource name using the form: `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
      Throws:
      ApiException - if the remote call fails
    • deleteBackupAsync

      public final OperationFuture<com.google.protobuf.Empty,com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteBackupOperationCallable

      public final OperationCallable<DeleteBackupRequest,com.google.protobuf.Empty,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • exportBackupAsync

      public final OperationFuture<Backup,com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • exportBackupOperationCallable

      public final OperationCallable<ExportBackupRequest,Backup,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • backupClusterAsync

      public final OperationFuture<Cluster,com.google.protobuf.Any> backupClusterAsync(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();
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • backupClusterAsync

      public final OperationFuture<Cluster,com.google.protobuf.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();
       }
       
      Parameters:
      name - 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.
      Throws:
      ApiException - if the remote call fails
    • backupClusterAsync

      public final OperationFuture<Cluster,com.google.protobuf.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();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • backupClusterOperationCallable

      public final OperationCallable<BackupClusterRequest,Cluster,com.google.protobuf.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();
       }
       
    • 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();
       }
       
    • listLocations

      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);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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);
         }
       }
       
    • 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;
           }
         }
       }
       
    • getLocation

      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);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • 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();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException