Google Cloud Memorystore for Redis (cluster management) v1 API - Class CloudRedisClusterClient (1.3.0)

public abstract class CloudRedisClusterClient

Reference documentation and code samples for the Google Cloud Memorystore for Redis (cluster management) v1 API class CloudRedisClusterClient.

CloudRedisCluster client wrapper, for convenient use.

Inheritance

object > CloudRedisClusterClient

Namespace

Google.Cloud.Redis.Cluster.V1

Assembly

Google.Cloud.Redis.Cluster.V1.dll

Remarks

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

We use API version selector for Flex APIs

  • The versioning strategy is release-based versioning
  • Our backend CLH only deals with the superset version (called v1main)
  • Existing backend for Redis Gen1 and MRR is not touched.
  • More details in go/redis-flex-api-versioning

Properties

CreateClusterOperationsClient

public virtual OperationsClient CreateClusterOperationsClient { get; }

The long-running operations client for CreateCluster.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the CloudRedisCluster service, which is a host of "redis.googleapis.com" and a port of 443.

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default CloudRedisCluster scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default CloudRedisCluster scopes are:

DeleteClusterOperationsClient

public virtual OperationsClient DeleteClusterOperationsClient { get; }

The long-running operations client for DeleteCluster.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual CloudRedisCluster.CloudRedisClusterClient GrpcClient { get; }

The underlying gRPC CloudRedisCluster client

Property Value
Type Description
CloudRedisClusterCloudRedisClusterClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateClusterOperationsClient

public virtual OperationsClient UpdateClusterOperationsClient { get; }

The long-running operations client for UpdateCluster.

Property Value
Type Description
OperationsClient

Methods

Create()

public static CloudRedisClusterClient Create()

Synchronously creates a CloudRedisClusterClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudRedisClusterClientBuilder.

Returns
Type Description
CloudRedisClusterClient

The created CloudRedisClusterClient.

CreateAsync(CancellationToken)

public static Task<CloudRedisClusterClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a CloudRedisClusterClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudRedisClusterClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskCloudRedisClusterClient

The task representing the created CloudRedisClusterClient.

CreateCluster(LocationName, Cluster, string, CallSettings)

public virtual Operation<Cluster, Any> CreateCluster(LocationName parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

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.

Parameters
Name Description
parent LocationName

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

cluster Cluster

Required. The cluster that is to be created.

clusterId string

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

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

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterAny

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, Any> response = cloudRedisClusterClient.CreateCluster(parent, cluster, clusterId);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = cloudRedisClusterClient.PollOnceCreateCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateCluster(CreateClusterRequest, CallSettings)

public virtual Operation<Cluster, Any> CreateCluster(CreateClusterRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request CreateClusterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterAny

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
};
// Make the request
Operation<Cluster, Any> response = cloudRedisClusterClient.CreateCluster(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = cloudRedisClusterClient.PollOnceCreateCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateCluster(string, Cluster, string, CallSettings)

public virtual Operation<Cluster, Any> CreateCluster(string parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

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.

Parameters
Name Description
parent string

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

cluster Cluster

Required. The cluster that is to be created.

clusterId string

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

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

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterAny

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, Any> response = cloudRedisClusterClient.CreateCluster(parent, cluster, clusterId);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = cloudRedisClusterClient.PollOnceCreateCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(LocationName, Cluster, string, CallSettings)

public virtual Task<Operation<Cluster, Any>> CreateClusterAsync(LocationName parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

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.

Parameters
Name Description
parent LocationName

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

cluster Cluster

Required. The cluster that is to be created.

clusterId string

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

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

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.CreateClusterAsync(parent, cluster, clusterId);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(LocationName, Cluster, string, CancellationToken)

public virtual Task<Operation<Cluster, Any>> CreateClusterAsync(LocationName parent, Cluster cluster, string clusterId, CancellationToken cancellationToken)

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.

Parameters
Name Description
parent LocationName

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

cluster Cluster

Required. The cluster that is to be created.

clusterId string

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

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

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.CreateClusterAsync(parent, cluster, clusterId);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(CreateClusterRequest, CallSettings)

public virtual Task<Operation<Cluster, Any>> CreateClusterAsync(CreateClusterRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request CreateClusterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
};
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.CreateClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(CreateClusterRequest, CancellationToken)

public virtual Task<Operation<Cluster, Any>> CreateClusterAsync(CreateClusterRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request CreateClusterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
CreateClusterRequest request = new CreateClusterRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClusterId = "",
    Cluster = new Cluster(),
    RequestId = "",
};
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.CreateClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(string, Cluster, string, CallSettings)

public virtual Task<Operation<Cluster, Any>> CreateClusterAsync(string parent, Cluster cluster, string clusterId, CallSettings callSettings = null)

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.

Parameters
Name Description
parent string

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

cluster Cluster

Required. The cluster that is to be created.

clusterId string

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

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

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.CreateClusterAsync(parent, cluster, clusterId);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

CreateClusterAsync(string, Cluster, string, CancellationToken)

public virtual Task<Operation<Cluster, Any>> CreateClusterAsync(string parent, Cluster cluster, string clusterId, CancellationToken cancellationToken)

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.

Parameters
Name Description
parent string

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

cluster Cluster

Required. The cluster that is to be created.

clusterId string

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

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

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Cluster cluster = new Cluster();
string clusterId = "";
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.CreateClusterAsync(parent, cluster, clusterId);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceCreateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

DeleteCluster(ClusterName, CallSettings)

public virtual Operation<Empty, Any> DeleteCluster(ClusterName name, CallSettings callSettings = null)

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

Parameters
Name Description
name ClusterName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyAny

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Operation<Empty, Any> response = cloudRedisClusterClient.DeleteCluster(name);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = cloudRedisClusterClient.PollOnceDeleteCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteCluster(DeleteClusterRequest, CallSettings)

public virtual Operation<Empty, Any> DeleteCluster(DeleteClusterRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request DeleteClusterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyAny

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
};
// Make the request
Operation<Empty, Any> response = cloudRedisClusterClient.DeleteCluster(request);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = cloudRedisClusterClient.PollOnceDeleteCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteCluster(string, CallSettings)

public virtual Operation<Empty, Any> DeleteCluster(string name, CallSettings callSettings = null)

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

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyAny

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Operation<Empty, Any> response = cloudRedisClusterClient.DeleteCluster(name);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = cloudRedisClusterClient.PollOnceDeleteCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(ClusterName, CallSettings)

public virtual Task<Operation<Empty, Any>> DeleteClusterAsync(ClusterName name, CallSettings callSettings = null)

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

Parameters
Name Description
name ClusterName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Operation<Empty, Any> response = await cloudRedisClusterClient.DeleteClusterAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(ClusterName, CancellationToken)

public virtual Task<Operation<Empty, Any>> DeleteClusterAsync(ClusterName name, CancellationToken cancellationToken)

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

Parameters
Name Description
name ClusterName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Operation<Empty, Any> response = await cloudRedisClusterClient.DeleteClusterAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(DeleteClusterRequest, CallSettings)

public virtual Task<Operation<Empty, Any>> DeleteClusterAsync(DeleteClusterRequest request, CallSettings callSettings = null)

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

Parameters
Name Description
request DeleteClusterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
};
// Make the request
Operation<Empty, Any> response = await cloudRedisClusterClient.DeleteClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(DeleteClusterRequest, CancellationToken)

public virtual Task<Operation<Empty, Any>> DeleteClusterAsync(DeleteClusterRequest request, CancellationToken cancellationToken)

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

Parameters
Name Description
request DeleteClusterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
DeleteClusterRequest request = new DeleteClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
    RequestId = "",
};
// Make the request
Operation<Empty, Any> response = await cloudRedisClusterClient.DeleteClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(string, CallSettings)

public virtual Task<Operation<Empty, Any>> DeleteClusterAsync(string name, CallSettings callSettings = null)

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

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Operation<Empty, Any> response = await cloudRedisClusterClient.DeleteClusterAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteClusterAsync(string, CancellationToken)

public virtual Task<Operation<Empty, Any>> DeleteClusterAsync(string name, CancellationToken cancellationToken)

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

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Operation<Empty, Any> response = await cloudRedisClusterClient.DeleteClusterAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceDeleteClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

GetCluster(ClusterName, CallSettings)

public virtual Cluster GetCluster(ClusterName name, CallSettings callSettings = null)

Gets the details of a specific Redis cluster.

Parameters
Name Description
name ClusterName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Cluster

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Cluster response = cloudRedisClusterClient.GetCluster(name);

GetCluster(GetClusterRequest, CallSettings)

public virtual Cluster GetCluster(GetClusterRequest request, CallSettings callSettings = null)

Gets the details of a specific Redis cluster.

Parameters
Name Description
request GetClusterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Cluster

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
Cluster response = cloudRedisClusterClient.GetCluster(request);

GetCluster(string, CallSettings)

public virtual Cluster GetCluster(string name, CallSettings callSettings = null)

Gets the details of a specific Redis cluster.

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Cluster

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Cluster response = cloudRedisClusterClient.GetCluster(name);

GetClusterAsync(ClusterName, CallSettings)

public virtual Task<Cluster> GetClusterAsync(ClusterName name, CallSettings callSettings = null)

Gets the details of a specific Redis cluster.

Parameters
Name Description
name ClusterName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Cluster response = await cloudRedisClusterClient.GetClusterAsync(name);

GetClusterAsync(ClusterName, CancellationToken)

public virtual Task<Cluster> GetClusterAsync(ClusterName name, CancellationToken cancellationToken)

Gets the details of a specific Redis cluster.

Parameters
Name Description
name ClusterName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
ClusterName name = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
Cluster response = await cloudRedisClusterClient.GetClusterAsync(name);

GetClusterAsync(GetClusterRequest, CallSettings)

public virtual Task<Cluster> GetClusterAsync(GetClusterRequest request, CallSettings callSettings = null)

Gets the details of a specific Redis cluster.

Parameters
Name Description
request GetClusterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
Cluster response = await cloudRedisClusterClient.GetClusterAsync(request);

GetClusterAsync(GetClusterRequest, CancellationToken)

public virtual Task<Cluster> GetClusterAsync(GetClusterRequest request, CancellationToken cancellationToken)

Gets the details of a specific Redis cluster.

Parameters
Name Description
request GetClusterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
GetClusterRequest request = new GetClusterRequest
{
    ClusterName = ClusterName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
Cluster response = await cloudRedisClusterClient.GetClusterAsync(request);

GetClusterAsync(string, CallSettings)

public virtual Task<Cluster> GetClusterAsync(string name, CallSettings callSettings = null)

Gets the details of a specific Redis cluster.

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Cluster response = await cloudRedisClusterClient.GetClusterAsync(name);

GetClusterAsync(string, CancellationToken)

public virtual Task<Cluster> GetClusterAsync(string name, CancellationToken cancellationToken)

Gets the details of a specific Redis cluster.

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCluster

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]";
// Make the request
Cluster response = await cloudRedisClusterClient.GetClusterAsync(name);

GetClusterCertificateAuthority(CertificateAuthorityName, CallSettings)

public virtual CertificateAuthority GetClusterCertificateAuthority(CertificateAuthorityName name, CallSettings callSettings = null)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
name CertificateAuthorityName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CertificateAuthority

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
CertificateAuthorityName name = CertificateAuthorityName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
CertificateAuthority response = cloudRedisClusterClient.GetClusterCertificateAuthority(name);

GetClusterCertificateAuthority(GetClusterCertificateAuthorityRequest, CallSettings)

public virtual CertificateAuthority GetClusterCertificateAuthority(GetClusterCertificateAuthorityRequest request, CallSettings callSettings = null)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
request GetClusterCertificateAuthorityRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CertificateAuthority

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
GetClusterCertificateAuthorityRequest request = new GetClusterCertificateAuthorityRequest
{
    CertificateAuthorityName = CertificateAuthorityName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
CertificateAuthority response = cloudRedisClusterClient.GetClusterCertificateAuthority(request);

GetClusterCertificateAuthority(string, CallSettings)

public virtual CertificateAuthority GetClusterCertificateAuthority(string name, CallSettings callSettings = null)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
CertificateAuthority

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/certificateAuthority";
// Make the request
CertificateAuthority response = cloudRedisClusterClient.GetClusterCertificateAuthority(name);

GetClusterCertificateAuthorityAsync(CertificateAuthorityName, CallSettings)

public virtual Task<CertificateAuthority> GetClusterCertificateAuthorityAsync(CertificateAuthorityName name, CallSettings callSettings = null)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
name CertificateAuthorityName

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
CertificateAuthorityName name = CertificateAuthorityName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
CertificateAuthority response = await cloudRedisClusterClient.GetClusterCertificateAuthorityAsync(name);

GetClusterCertificateAuthorityAsync(CertificateAuthorityName, CancellationToken)

public virtual Task<CertificateAuthority> GetClusterCertificateAuthorityAsync(CertificateAuthorityName name, CancellationToken cancellationToken)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
name CertificateAuthorityName

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
CertificateAuthorityName name = CertificateAuthorityName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]");
// Make the request
CertificateAuthority response = await cloudRedisClusterClient.GetClusterCertificateAuthorityAsync(name);

GetClusterCertificateAuthorityAsync(GetClusterCertificateAuthorityRequest, CallSettings)

public virtual Task<CertificateAuthority> GetClusterCertificateAuthorityAsync(GetClusterCertificateAuthorityRequest request, CallSettings callSettings = null)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
request GetClusterCertificateAuthorityRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
GetClusterCertificateAuthorityRequest request = new GetClusterCertificateAuthorityRequest
{
    CertificateAuthorityName = CertificateAuthorityName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
CertificateAuthority response = await cloudRedisClusterClient.GetClusterCertificateAuthorityAsync(request);

GetClusterCertificateAuthorityAsync(GetClusterCertificateAuthorityRequest, CancellationToken)

public virtual Task<CertificateAuthority> GetClusterCertificateAuthorityAsync(GetClusterCertificateAuthorityRequest request, CancellationToken cancellationToken)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
request GetClusterCertificateAuthorityRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
GetClusterCertificateAuthorityRequest request = new GetClusterCertificateAuthorityRequest
{
    CertificateAuthorityName = CertificateAuthorityName.FromProjectLocationCluster("[PROJECT]", "[LOCATION]", "[CLUSTER]"),
};
// Make the request
CertificateAuthority response = await cloudRedisClusterClient.GetClusterCertificateAuthorityAsync(request);

GetClusterCertificateAuthorityAsync(string, CallSettings)

public virtual Task<CertificateAuthority> GetClusterCertificateAuthorityAsync(string name, CallSettings callSettings = null)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
name string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/certificateAuthority";
// Make the request
CertificateAuthority response = await cloudRedisClusterClient.GetClusterCertificateAuthorityAsync(name);

GetClusterCertificateAuthorityAsync(string, CancellationToken)

public virtual Task<CertificateAuthority> GetClusterCertificateAuthorityAsync(string name, CancellationToken cancellationToken)

Gets the details of certificate authority information for Redis cluster.

Parameters
Name Description
name string

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskCertificateAuthority

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clusters/[CLUSTER]/certificateAuthority";
// Make the request
CertificateAuthority response = await cloudRedisClusterClient.GetClusterCertificateAuthorityAsync(name);

ListClusters(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListClustersResponse, Cluster> ListClusters(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
parent LocationName

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

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListClustersResponseCluster

A pageable sequence of Cluster resources.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListClustersResponse, Cluster> response = cloudRedisClusterClient.ListClusters(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Cluster item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListClustersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Cluster item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Cluster> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Cluster item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListClusters(ListClustersRequest, CallSettings)

public virtual PagedEnumerable<ListClustersResponse, Cluster> ListClusters(ListClustersRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request ListClustersRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListClustersResponseCluster

A pageable sequence of Cluster resources.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
ListClustersRequest request = new ListClustersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListClustersResponse, Cluster> response = cloudRedisClusterClient.ListClusters(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Cluster item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListClustersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Cluster item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Cluster> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Cluster item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListClusters(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListClustersResponse, Cluster> ListClusters(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
parent string

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

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListClustersResponseCluster

A pageable sequence of Cluster resources.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListClustersResponse, Cluster> response = cloudRedisClusterClient.ListClusters(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Cluster item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListClustersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Cluster item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Cluster> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Cluster item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListClustersAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListClustersResponse, Cluster> ListClustersAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
parent LocationName

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

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListClustersResponseCluster

A pageable asynchronous sequence of Cluster resources.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListClustersResponse, Cluster> response = cloudRedisClusterClient.ListClustersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Cluster item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClustersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Cluster item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Cluster> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Cluster item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListClustersAsync(ListClustersRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListClustersResponse, Cluster> ListClustersAsync(ListClustersRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request ListClustersRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListClustersResponseCluster

A pageable asynchronous sequence of Cluster resources.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
ListClustersRequest request = new ListClustersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListClustersResponse, Cluster> response = cloudRedisClusterClient.ListClustersAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Cluster item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClustersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Cluster item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Cluster> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Cluster item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListClustersAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListClustersResponse, Cluster> ListClustersAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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.

Parameters
Name Description
parent string

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

pageToken string

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSize int

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListClustersResponseCluster

A pageable asynchronous sequence of Cluster resources.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListClustersResponse, Cluster> response = cloudRedisClusterClient.ListClustersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Cluster item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClustersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Cluster item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Cluster> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Cluster item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceCreateCluster(string, CallSettings)

public virtual Operation<Cluster, Any> PollOnceCreateCluster(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateCluster.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterAny

The result of polling the operation.

PollOnceCreateClusterAsync(string, CallSettings)

public virtual Task<Operation<Cluster, Any>> PollOnceCreateClusterAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateCluster.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterAny

A task representing the result of polling the operation.

PollOnceDeleteCluster(string, CallSettings)

public virtual Operation<Empty, Any> PollOnceDeleteCluster(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteCluster.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyAny

The result of polling the operation.

PollOnceDeleteClusterAsync(string, CallSettings)

public virtual Task<Operation<Empty, Any>> PollOnceDeleteClusterAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteCluster.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyAny

A task representing the result of polling the operation.

PollOnceUpdateCluster(string, CallSettings)

public virtual Operation<Cluster, Any> PollOnceUpdateCluster(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateCluster.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterAny

The result of polling the operation.

PollOnceUpdateClusterAsync(string, CallSettings)

public virtual Task<Operation<Cluster, Any>> PollOnceUpdateClusterAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateCluster.

Parameters
Name Description
operationName string

The name of a previously invoked operation. Must not be null or empty.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterAny

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateCluster(Cluster, FieldMask, CallSettings)

public virtual Operation<Cluster, Any> UpdateCluster(Cluster cluster, FieldMask updateMask, CallSettings callSettings = null)

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.

Parameters
Name Description
cluster Cluster

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

updateMask FieldMask

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

  • size_gb
  • replica_count
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterAny

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
Cluster cluster = new Cluster();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Cluster, Any> response = cloudRedisClusterClient.UpdateCluster(cluster, updateMask);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = cloudRedisClusterClient.PollOnceUpdateCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

UpdateCluster(UpdateClusterRequest, CallSettings)

public virtual Operation<Cluster, Any> UpdateCluster(UpdateClusterRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request UpdateClusterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationClusterAny

The RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = CloudRedisClusterClient.Create();
// Initialize request argument(s)
UpdateClusterRequest request = new UpdateClusterRequest
{
    UpdateMask = new FieldMask(),
    Cluster = new Cluster(),
    RequestId = "",
};
// Make the request
Operation<Cluster, Any> response = cloudRedisClusterClient.UpdateCluster(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = cloudRedisClusterClient.PollOnceUpdateCluster(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

UpdateClusterAsync(Cluster, FieldMask, CallSettings)

public virtual Task<Operation<Cluster, Any>> UpdateClusterAsync(Cluster cluster, FieldMask updateMask, CallSettings callSettings = null)

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.

Parameters
Name Description
cluster Cluster

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

updateMask FieldMask

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

  • size_gb
  • replica_count
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
Cluster cluster = new Cluster();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.UpdateClusterAsync(cluster, updateMask);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceUpdateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

UpdateClusterAsync(Cluster, FieldMask, CancellationToken)

public virtual Task<Operation<Cluster, Any>> UpdateClusterAsync(Cluster cluster, FieldMask updateMask, CancellationToken cancellationToken)

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.

Parameters
Name Description
cluster Cluster

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

updateMask FieldMask

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

  • size_gb
  • replica_count
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
Cluster cluster = new Cluster();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.UpdateClusterAsync(cluster, updateMask);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceUpdateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

UpdateClusterAsync(UpdateClusterRequest, CallSettings)

public virtual Task<Operation<Cluster, Any>> UpdateClusterAsync(UpdateClusterRequest request, CallSettings callSettings = null)

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.

Parameters
Name Description
request UpdateClusterRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
UpdateClusterRequest request = new UpdateClusterRequest
{
    UpdateMask = new FieldMask(),
    Cluster = new Cluster(),
    RequestId = "",
};
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.UpdateClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceUpdateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}

UpdateClusterAsync(UpdateClusterRequest, CancellationToken)

public virtual Task<Operation<Cluster, Any>> UpdateClusterAsync(UpdateClusterRequest request, CancellationToken cancellationToken)

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.

Parameters
Name Description
request UpdateClusterRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationClusterAny

A Task containing the RPC response.

Example
// Create client
CloudRedisClusterClient cloudRedisClusterClient = await CloudRedisClusterClient.CreateAsync();
// Initialize request argument(s)
UpdateClusterRequest request = new UpdateClusterRequest
{
    UpdateMask = new FieldMask(),
    Cluster = new Cluster(),
    RequestId = "",
};
// Make the request
Operation<Cluster, Any> response = await cloudRedisClusterClient.UpdateClusterAsync(request);

// Poll until the returned long-running operation is complete
Operation<Cluster, Any> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Cluster result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Cluster, Any> retrievedResponse = await cloudRedisClusterClient.PollOnceUpdateClusterAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Cluster retrievedResult = retrievedResponse.Result;
}