Class CloudRedisClient (3.0.0)

public abstract class CloudRedisClient

CloudRedis client wrapper, for convenient use.

Inheritance

Object > CloudRedisClient

Derived Types

Namespace

Google.Cloud.Redis.V1

Assembly

Google.Cloud.Redis.V1.dll

Remarks

Configures and manages Cloud Memorystore for Redis instances

Google Cloud Memorystore for Redis v1

The redis.googleapis.com service implements the Google Cloud Memorystore for Redis API and defines the following resource model for managing Redis instances:

  • The service works with a collection of cloud projects, named: /projects/*
  • Each project has a collection of available locations, named: /locations/*
  • Each location has a collection of Redis instances, named: /instances/*
  • As such, Redis instances are resources of the form: /projects/{project_id}/locations/{location_id}/instances/{instance_id}

Note that location_id must be referring to a GCP region; for example:

  • projects/redpepper-1290/locations/us-central1/instances/my-redis

Properties

CreateInstanceOperationsClient

public virtual OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default CloudRedis scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default CloudRedis scopes are:

DeleteInstanceOperationsClient

public virtual OperationsClient DeleteInstanceOperationsClient { get; }

The long-running operations client for DeleteInstance.

Property Value
TypeDescription
OperationsClient

ExportInstanceOperationsClient

public virtual OperationsClient ExportInstanceOperationsClient { get; }

The long-running operations client for ExportInstance.

Property Value
TypeDescription
OperationsClient

FailoverInstanceOperationsClient

public virtual OperationsClient FailoverInstanceOperationsClient { get; }

The long-running operations client for FailoverInstance.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual CloudRedis.CloudRedisClient GrpcClient { get; }

The underlying gRPC CloudRedis client

Property Value
TypeDescription
CloudRedis.CloudRedisClient

ImportInstanceOperationsClient

public virtual OperationsClient ImportInstanceOperationsClient { get; }

The long-running operations client for ImportInstance.

Property Value
TypeDescription
OperationsClient

RescheduleMaintenanceOperationsClient

public virtual OperationsClient RescheduleMaintenanceOperationsClient { get; }

The long-running operations client for RescheduleMaintenance.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateInstanceOperationsClient

public virtual OperationsClient UpdateInstanceOperationsClient { get; }

The long-running operations client for UpdateInstance.

Property Value
TypeDescription
OperationsClient

UpgradeInstanceOperationsClient

public virtual OperationsClient UpgradeInstanceOperationsClient { get; }

The long-running operations client for UpgradeInstance.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static CloudRedisClient Create()

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

Returns
TypeDescription
CloudRedisClient

The created CloudRedisClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<CloudRedisClient>

The task representing the created CloudRedisClient.

CreateInstance(LocationName, String, Instance, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(LocationName parent, string instanceId, Instance instance, CallSettings callSettings = null)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
parentLocationName

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

instanceIdString

Required. The logical name of the Redis instance 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-40 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location
instanceInstance

Required. A Redis [Instance] resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.CreateInstance(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceCreateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstance(CreateInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(CreateInstanceRequest request, CallSettings callSettings = null)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
requestCreateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.CreateInstance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceCreateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstance(String, String, Instance, CallSettings)

public virtual Operation<Instance, OperationMetadata> CreateInstance(string parent, string instanceId, Instance instance, CallSettings callSettings = null)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
parentString

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

instanceIdString

Required. The logical name of the Redis instance 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-40 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location
instanceInstance

Required. A Redis [Instance] resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.CreateInstance(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceCreateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(LocationName, String, Instance, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(LocationName parent, string instanceId, Instance instance, CallSettings callSettings = null)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
parentLocationName

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

instanceIdString

Required. The logical name of the Redis instance 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-40 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location
instanceInstance

Required. A Redis [Instance] resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.CreateInstanceAsync(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(LocationName, String, Instance, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(LocationName parent, string instanceId, Instance instance, CancellationToken cancellationToken)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
parentLocationName

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

instanceIdString

Required. The logical name of the Redis instance 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-40 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location
instanceInstance

Required. A Redis [Instance] resource

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.CreateInstanceAsync(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(CreateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CallSettings callSettings = null)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
requestCreateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.CreateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(CreateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(CreateInstanceRequest request, CancellationToken cancellationToken)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
requestCreateInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
CreateInstanceRequest request = new CreateInstanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    InstanceId = "",
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.CreateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(String, String, Instance, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, string instanceId, Instance instance, CallSettings callSettings = null)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
parentString

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

instanceIdString

Required. The logical name of the Redis instance 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-40 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location
instanceInstance

Required. A Redis [Instance] resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.CreateInstanceAsync(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

CreateInstanceAsync(String, String, Instance, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> CreateInstanceAsync(string parent, string instanceId, Instance instance, CancellationToken cancellationToken)

Creates a Redis instance based on the specified tier and memory size.

By default, the instance is accessible from the project's default network.

The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field.

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

Parameters
NameDescription
parentString

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

instanceIdString

Required. The logical name of the Redis instance 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-40 characters.
  • Must end with a number or a letter.
  • Must be unique within the customer project / location
instanceInstance

Required. A Redis [Instance] resource

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string instanceId = "";
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.CreateInstanceAsync(parent, instanceId, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceCreateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

DeleteInstance(DeleteInstanceRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
requestDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = cloudRedisClient.DeleteInstance(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceDeleteInstance(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;
}

DeleteInstance(InstanceName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(InstanceName name, CallSettings callSettings = null)

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
nameInstanceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = cloudRedisClient.DeleteInstance(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceDeleteInstance(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;
}

DeleteInstance(String, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteInstance(string name, CallSettings callSettings = null)

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = cloudRedisClient.DeleteInstance(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceDeleteInstance(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;
}

DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(DeleteInstanceRequest request, CallSettings callSettings = null)

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
requestDeleteInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await cloudRedisClient.DeleteInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(DeleteInstanceRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(DeleteInstanceRequest request, CancellationToken cancellationToken)

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
requestDeleteInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
DeleteInstanceRequest request = new DeleteInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Operation<Empty, OperationMetadata> response = await cloudRedisClient.DeleteInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(InstanceName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(InstanceName name, CallSettings callSettings = null)

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
nameInstanceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await cloudRedisClient.DeleteInstanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
nameInstanceName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Operation<Empty, OperationMetadata> response = await cloudRedisClient.DeleteInstanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(String, CallSettings)

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

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await cloudRedisClient.DeleteInstanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceDeleteInstanceAsync(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;
}

DeleteInstanceAsync(String, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteInstanceAsync(string name, CancellationToken cancellationToken)

Deletes a specific Redis instance. Instance stops serving and data is deleted.

Parameters
NameDescription
nameString

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Operation<Empty, OperationMetadata> response = await cloudRedisClient.DeleteInstanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceDeleteInstanceAsync(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;
}

ExportInstance(ExportInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> ExportInstance(ExportInstanceRequest request, CallSettings callSettings = null)

Export Redis instance data into a Redis RDB format file in Cloud Storage.

Redis will continue serving during this operation.

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

Parameters
NameDescription
requestExportInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
ExportInstanceRequest request = new ExportInstanceRequest
{
    Name = "",
    OutputConfig = new OutputConfig(),
};
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.ExportInstance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceExportInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ExportInstance(String, OutputConfig, CallSettings)

public virtual Operation<Instance, OperationMetadata> ExportInstance(string name, OutputConfig outputConfig, CallSettings callSettings = null)

Export Redis instance data into a Redis RDB format file in Cloud Storage.

Redis will continue serving during this operation.

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

Parameters
NameDescription
nameString

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

outputConfigOutputConfig

Required. Specify data to be exported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string name = "";
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.ExportInstance(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceExportInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ExportInstanceAsync(ExportInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> ExportInstanceAsync(ExportInstanceRequest request, CallSettings callSettings = null)

Export Redis instance data into a Redis RDB format file in Cloud Storage.

Redis will continue serving during this operation.

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

Parameters
NameDescription
requestExportInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
ExportInstanceRequest request = new ExportInstanceRequest
{
    Name = "",
    OutputConfig = new OutputConfig(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.ExportInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceExportInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ExportInstanceAsync(ExportInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> ExportInstanceAsync(ExportInstanceRequest request, CancellationToken cancellationToken)

Export Redis instance data into a Redis RDB format file in Cloud Storage.

Redis will continue serving during this operation.

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

Parameters
NameDescription
requestExportInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
ExportInstanceRequest request = new ExportInstanceRequest
{
    Name = "",
    OutputConfig = new OutputConfig(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.ExportInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceExportInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ExportInstanceAsync(String, OutputConfig, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> ExportInstanceAsync(string name, OutputConfig outputConfig, CallSettings callSettings = null)

Export Redis instance data into a Redis RDB format file in Cloud Storage.

Redis will continue serving during this operation.

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

Parameters
NameDescription
nameString

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

outputConfigOutputConfig

Required. Specify data to be exported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "";
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.ExportInstanceAsync(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceExportInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ExportInstanceAsync(String, OutputConfig, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> ExportInstanceAsync(string name, OutputConfig outputConfig, CancellationToken cancellationToken)

Export Redis instance data into a Redis RDB format file in Cloud Storage.

Redis will continue serving during this operation.

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

Parameters
NameDescription
nameString

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

outputConfigOutputConfig

Required. Specify data to be exported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "";
OutputConfig outputConfig = new OutputConfig();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.ExportInstanceAsync(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceExportInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstance(FailoverInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> FailoverInstance(FailoverInstanceRequest request, CallSettings callSettings = null)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
requestFailoverInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
FailoverInstanceRequest request = new FailoverInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    DataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified,
};
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.FailoverInstance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceFailoverInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstance(InstanceName, FailoverInstanceRequest.Types.DataProtectionMode, CallSettings)

public virtual Operation<Instance, OperationMetadata> FailoverInstance(InstanceName name, FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode, CallSettings callSettings = null)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
nameInstanceName

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

dataProtectionModeFailoverInstanceRequest.Types.DataProtectionMode

Optional. Available data protection modes that the user can choose. If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
InstanceName name = new InstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]");
FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified;
// Make the request
Operation<Instance, OperationMetadata> response =
    cloudRedisClient.FailoverInstance(name, dataProtectionMode);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse =
    response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse =
    cloudRedisClient.PollOnceFailoverInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstance(String, FailoverInstanceRequest.Types.DataProtectionMode, CallSettings)

public virtual Operation<Instance, OperationMetadata> FailoverInstance(string name, FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode, CallSettings callSettings = null)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
nameString

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

dataProtectionModeFailoverInstanceRequest.Types.DataProtectionMode

Optional. Available data protection modes that the user can choose. If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified;
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.FailoverInstance(name, dataProtectionMode);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceFailoverInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstanceAsync(FailoverInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(FailoverInstanceRequest request, CallSettings callSettings = null)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
requestFailoverInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
FailoverInstanceRequest request = new FailoverInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    DataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified,
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.FailoverInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceFailoverInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstanceAsync(FailoverInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(FailoverInstanceRequest request, CancellationToken cancellationToken)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
requestFailoverInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
FailoverInstanceRequest request = new FailoverInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    DataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified,
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.FailoverInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceFailoverInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstanceAsync(InstanceName, FailoverInstanceRequest.Types.DataProtectionMode, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(InstanceName name, FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode, CallSettings callSettings = null)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
nameInstanceName

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

dataProtectionModeFailoverInstanceRequest.Types.DataProtectionMode

Optional. Available data protection modes that the user can choose. If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = new InstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]");
FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified;
// Make the request
Operation<Instance, OperationMetadata> response =
    await cloudRedisClient.FailoverInstanceAsync(name, dataProtectionMode);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse =
    await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse =
    await cloudRedisClient.PollOnceFailoverInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstanceAsync(InstanceName, FailoverInstanceRequest.Types.DataProtectionMode, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(InstanceName name, FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode, CancellationToken cancellationToken)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
nameInstanceName

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

dataProtectionModeFailoverInstanceRequest.Types.DataProtectionMode

Optional. Available data protection modes that the user can choose. If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = new InstanceName("[PROJECT]", "[LOCATION]", "[INSTANCE]");
FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified;
// Make the request
Operation<Instance, OperationMetadata> response =
    await cloudRedisClient.FailoverInstanceAsync(name, dataProtectionMode);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse =
    await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse =
    await cloudRedisClient.PollOnceFailoverInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstanceAsync(String, FailoverInstanceRequest.Types.DataProtectionMode, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(string name, FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode, CallSettings callSettings = null)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
nameString

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

dataProtectionModeFailoverInstanceRequest.Types.DataProtectionMode

Optional. Available data protection modes that the user can choose. If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified;
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.FailoverInstanceAsync(name, dataProtectionMode);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceFailoverInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

FailoverInstanceAsync(String, FailoverInstanceRequest.Types.DataProtectionMode, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> FailoverInstanceAsync(string name, FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode, CancellationToken cancellationToken)

Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.

Parameters
NameDescription
nameString

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

dataProtectionModeFailoverInstanceRequest.Types.DataProtectionMode

Optional. Available data protection modes that the user can choose. If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
FailoverInstanceRequest.Types.DataProtectionMode dataProtectionMode = FailoverInstanceRequest.Types.DataProtectionMode.Unspecified;
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.FailoverInstanceAsync(name, dataProtectionMode);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceFailoverInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

GetInstance(GetInstanceRequest, CallSettings)

public virtual Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)

Gets the details of a specific Redis instance.

Parameters
NameDescription
requestGetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = cloudRedisClient.GetInstance(request);

GetInstance(InstanceName, CallSettings)

public virtual Instance GetInstance(InstanceName name, CallSettings callSettings = null)

Gets the details of a specific Redis instance.

Parameters
NameDescription
nameInstanceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = cloudRedisClient.GetInstance(name);

GetInstance(String, CallSettings)

public virtual Instance GetInstance(string name, CallSettings callSettings = null)

Gets the details of a specific Redis instance.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Instance

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = cloudRedisClient.GetInstance(name);

GetInstanceAsync(GetInstanceRequest, CallSettings)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)

Gets the details of a specific Redis instance.

Parameters
NameDescription
requestGetInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = await cloudRedisClient.GetInstanceAsync(request);

GetInstanceAsync(GetInstanceRequest, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(GetInstanceRequest request, CancellationToken cancellationToken)

Gets the details of a specific Redis instance.

Parameters
NameDescription
requestGetInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
GetInstanceRequest request = new GetInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
Instance response = await cloudRedisClient.GetInstanceAsync(request);

GetInstanceAsync(InstanceName, CallSettings)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CallSettings callSettings = null)

Gets the details of a specific Redis instance.

Parameters
NameDescription
nameInstanceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = await cloudRedisClient.GetInstanceAsync(name);

GetInstanceAsync(InstanceName, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(InstanceName name, CancellationToken cancellationToken)

Gets the details of a specific Redis instance.

Parameters
NameDescription
nameInstanceName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
Instance response = await cloudRedisClient.GetInstanceAsync(name);

GetInstanceAsync(String, CallSettings)

public virtual Task<Instance> GetInstanceAsync(string name, CallSettings callSettings = null)

Gets the details of a specific Redis instance.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = await cloudRedisClient.GetInstanceAsync(name);

GetInstanceAsync(String, CancellationToken)

public virtual Task<Instance> GetInstanceAsync(string name, CancellationToken cancellationToken)

Gets the details of a specific Redis instance.

Parameters
NameDescription
nameString

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Instance>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
Instance response = await cloudRedisClient.GetInstanceAsync(name);

GetInstanceAuthString(GetInstanceAuthStringRequest, CallSettings)

public virtual InstanceAuthString GetInstanceAuthString(GetInstanceAuthStringRequest request, CallSettings callSettings = null)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
requestGetInstanceAuthStringRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InstanceAuthString

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
GetInstanceAuthStringRequest request = new GetInstanceAuthStringRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
InstanceAuthString response = cloudRedisClient.GetInstanceAuthString(request);

GetInstanceAuthString(InstanceName, CallSettings)

public virtual InstanceAuthString GetInstanceAuthString(InstanceName name, CallSettings callSettings = null)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
nameInstanceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InstanceAuthString

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
InstanceAuthString response = cloudRedisClient.GetInstanceAuthString(name);

GetInstanceAuthString(String, CallSettings)

public virtual InstanceAuthString GetInstanceAuthString(string name, CallSettings callSettings = null)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
InstanceAuthString

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
InstanceAuthString response = cloudRedisClient.GetInstanceAuthString(name);

GetInstanceAuthStringAsync(GetInstanceAuthStringRequest, CallSettings)

public virtual Task<InstanceAuthString> GetInstanceAuthStringAsync(GetInstanceAuthStringRequest request, CallSettings callSettings = null)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
requestGetInstanceAuthStringRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<InstanceAuthString>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
GetInstanceAuthStringRequest request = new GetInstanceAuthStringRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
InstanceAuthString response = await cloudRedisClient.GetInstanceAuthStringAsync(request);

GetInstanceAuthStringAsync(GetInstanceAuthStringRequest, CancellationToken)

public virtual Task<InstanceAuthString> GetInstanceAuthStringAsync(GetInstanceAuthStringRequest request, CancellationToken cancellationToken)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
requestGetInstanceAuthStringRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<InstanceAuthString>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
GetInstanceAuthStringRequest request = new GetInstanceAuthStringRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
};
// Make the request
InstanceAuthString response = await cloudRedisClient.GetInstanceAuthStringAsync(request);

GetInstanceAuthStringAsync(InstanceName, CallSettings)

public virtual Task<InstanceAuthString> GetInstanceAuthStringAsync(InstanceName name, CallSettings callSettings = null)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
nameInstanceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<InstanceAuthString>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
InstanceAuthString response = await cloudRedisClient.GetInstanceAuthStringAsync(name);

GetInstanceAuthStringAsync(InstanceName, CancellationToken)

public virtual Task<InstanceAuthString> GetInstanceAuthStringAsync(InstanceName name, CancellationToken cancellationToken)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
nameInstanceName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<InstanceAuthString>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
InstanceAuthString response = await cloudRedisClient.GetInstanceAuthStringAsync(name);

GetInstanceAuthStringAsync(String, CallSettings)

public virtual Task<InstanceAuthString> GetInstanceAuthStringAsync(string name, CallSettings callSettings = null)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<InstanceAuthString>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
InstanceAuthString response = await cloudRedisClient.GetInstanceAuthStringAsync(name);

GetInstanceAuthStringAsync(String, CancellationToken)

public virtual Task<InstanceAuthString> GetInstanceAuthStringAsync(string name, CancellationToken cancellationToken)

Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.

Parameters
NameDescription
nameString

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<InstanceAuthString>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
InstanceAuthString response = await cloudRedisClient.GetInstanceAuthStringAsync(name);

ImportInstance(ImportInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> ImportInstance(ImportInstanceRequest request, CallSettings callSettings = null)

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file.

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

Parameters
NameDescription
requestImportInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
ImportInstanceRequest request = new ImportInstanceRequest
{
    Name = "",
    InputConfig = new InputConfig(),
};
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.ImportInstance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceImportInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ImportInstance(String, InputConfig, CallSettings)

public virtual Operation<Instance, OperationMetadata> ImportInstance(string name, InputConfig inputConfig, CallSettings callSettings = null)

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file.

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

Parameters
NameDescription
nameString

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

inputConfigInputConfig

Required. Specify data to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string name = "";
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.ImportInstance(name, inputConfig);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceImportInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ImportInstanceAsync(ImportInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> ImportInstanceAsync(ImportInstanceRequest request, CallSettings callSettings = null)

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file.

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

Parameters
NameDescription
requestImportInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
ImportInstanceRequest request = new ImportInstanceRequest
{
    Name = "",
    InputConfig = new InputConfig(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.ImportInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceImportInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ImportInstanceAsync(ImportInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> ImportInstanceAsync(ImportInstanceRequest request, CancellationToken cancellationToken)

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file.

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

Parameters
NameDescription
requestImportInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
ImportInstanceRequest request = new ImportInstanceRequest
{
    Name = "",
    InputConfig = new InputConfig(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.ImportInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceImportInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ImportInstanceAsync(String, InputConfig, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> ImportInstanceAsync(string name, InputConfig inputConfig, CallSettings callSettings = null)

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file.

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

Parameters
NameDescription
nameString

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

inputConfigInputConfig

Required. Specify data to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "";
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.ImportInstanceAsync(name, inputConfig);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceImportInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ImportInstanceAsync(String, InputConfig, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> ImportInstanceAsync(string name, InputConfig inputConfig, CancellationToken cancellationToken)

Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.

Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file.

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

Parameters
NameDescription
nameString

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

inputConfigInputConfig

Required. Specify data to be imported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "";
InputConfig inputConfig = new InputConfig();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.ImportInstanceAsync(name, inputConfig);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceImportInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

ListInstances(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all Redis instances 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
NameDescription
parentLocationName

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

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListInstancesResponse, Instance>

A pageable sequence of Instance resources.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = cloudRedisClient.ListInstances(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstances(ListInstancesRequest, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(ListInstancesRequest request, CallSettings callSettings = null)

Lists all Redis instances 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
NameDescription
requestListInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListInstancesResponse, Instance>

A pageable sequence of Instance resources.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = cloudRedisClient.ListInstances(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstances(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListInstancesResponse, Instance> ListInstances(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all Redis instances 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
NameDescription
parentString

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

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListInstancesResponse, Instance>

A pageable sequence of Instance resources.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListInstancesResponse, Instance> response = cloudRedisClient.ListInstances(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Instance 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 (ListInstancesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstancesAsync(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all Redis instances 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
NameDescription
parentLocationName

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

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListInstancesResponse, Instance>

A pageable asynchronous sequence of Instance resources.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = cloudRedisClient.ListInstancesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Instance 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((ListInstancesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstancesAsync(ListInstancesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(ListInstancesRequest request, CallSettings callSettings = null)

Lists all Redis instances 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
NameDescription
requestListInstancesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListInstancesResponse, Instance>

A pageable asynchronous sequence of Instance resources.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
ListInstancesRequest request = new ListInstancesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = cloudRedisClient.ListInstancesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Instance 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((ListInstancesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

ListInstancesAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListInstancesResponse, Instance> ListInstancesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all Redis instances 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
NameDescription
parentString

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

pageTokenString

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

pageSizeNullable<Int32>

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListInstancesResponse, Instance>

A pageable asynchronous sequence of Instance resources.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListInstancesResponse, Instance> response = cloudRedisClient.ListInstancesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Instance 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((ListInstancesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Instance 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<Instance> 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 (Instance 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;

PollOnceCreateInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceCreateInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceCreateInstanceAsync(String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> PollOnceCreateInstanceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteInstance(String, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The result of polling the operation.

PollOnceDeleteInstanceAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceExportInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceExportInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceExportInstanceAsync(String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> PollOnceExportInstanceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceFailoverInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceFailoverInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceFailoverInstanceAsync(String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> PollOnceFailoverInstanceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceImportInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceImportInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceImportInstanceAsync(String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> PollOnceImportInstanceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceRescheduleMaintenance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceRescheduleMaintenance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceRescheduleMaintenanceAsync(String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> PollOnceRescheduleMaintenanceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceUpdateInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceUpdateInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceUpdateInstanceAsync(String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> PollOnceUpdateInstanceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceUpgradeInstance(String, CallSettings)

public virtual Operation<Instance, OperationMetadata> PollOnceUpgradeInstance(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The result of polling the operation.

PollOnceUpgradeInstanceAsync(String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> PollOnceUpgradeInstanceAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A task representing the result of polling the operation.

RescheduleMaintenance(InstanceName, RescheduleMaintenanceRequest.Types.RescheduleType, Timestamp, CallSettings)

public virtual Operation<Instance, OperationMetadata> RescheduleMaintenance(InstanceName name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CallSettings callSettings = null)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
nameInstanceName

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

rescheduleTypeRescheduleMaintenanceRequest.Types.RescheduleType

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

scheduleTimeTimestamp

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.RescheduleMaintenance(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceRescheduleMaintenance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

RescheduleMaintenance(RescheduleMaintenanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> RescheduleMaintenance(RescheduleMaintenanceRequest request, CallSettings callSettings = null)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
requestRescheduleMaintenanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
RescheduleMaintenanceRequest request = new RescheduleMaintenanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified,
    ScheduleTime = new Timestamp(),
};
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.RescheduleMaintenance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceRescheduleMaintenance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

RescheduleMaintenance(String, RescheduleMaintenanceRequest.Types.RescheduleType, Timestamp, CallSettings)

public virtual Operation<Instance, OperationMetadata> RescheduleMaintenance(string name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CallSettings callSettings = null)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
nameString

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

rescheduleTypeRescheduleMaintenanceRequest.Types.RescheduleType

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

scheduleTimeTimestamp

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.RescheduleMaintenance(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceRescheduleMaintenance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

RescheduleMaintenanceAsync(InstanceName, RescheduleMaintenanceRequest.Types.RescheduleType, Timestamp, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(InstanceName name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CallSettings callSettings = null)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
nameInstanceName

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

rescheduleTypeRescheduleMaintenanceRequest.Types.RescheduleType

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

scheduleTimeTimestamp

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.RescheduleMaintenanceAsync(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceRescheduleMaintenanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

RescheduleMaintenanceAsync(InstanceName, RescheduleMaintenanceRequest.Types.RescheduleType, Timestamp, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(InstanceName name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CancellationToken cancellationToken)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
nameInstanceName

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

rescheduleTypeRescheduleMaintenanceRequest.Types.RescheduleType

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

scheduleTimeTimestamp

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.RescheduleMaintenanceAsync(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceRescheduleMaintenanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

RescheduleMaintenanceAsync(RescheduleMaintenanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(RescheduleMaintenanceRequest request, CallSettings callSettings = null)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
requestRescheduleMaintenanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
RescheduleMaintenanceRequest request = new RescheduleMaintenanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified,
    ScheduleTime = new Timestamp(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.RescheduleMaintenanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceRescheduleMaintenanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

RescheduleMaintenanceAsync(RescheduleMaintenanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(RescheduleMaintenanceRequest request, CancellationToken cancellationToken)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
requestRescheduleMaintenanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
RescheduleMaintenanceRequest request = new RescheduleMaintenanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified,
    ScheduleTime = new Timestamp(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.RescheduleMaintenanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceRescheduleMaintenanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

RescheduleMaintenanceAsync(String, RescheduleMaintenanceRequest.Types.RescheduleType, Timestamp, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(string name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CallSettings callSettings = null)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
nameString

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

rescheduleTypeRescheduleMaintenanceRequest.Types.RescheduleType

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

scheduleTimeTimestamp

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.RescheduleMaintenanceAsync(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceRescheduleMaintenanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

RescheduleMaintenanceAsync(String, RescheduleMaintenanceRequest.Types.RescheduleType, Timestamp, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> RescheduleMaintenanceAsync(string name, RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType, Timestamp scheduleTime, CancellationToken cancellationToken)

Reschedule maintenance for a given instance in a given project and location.

Parameters
NameDescription
nameString

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

rescheduleTypeRescheduleMaintenanceRequest.Types.RescheduleType

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

scheduleTimeTimestamp

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
RescheduleMaintenanceRequest.Types.RescheduleType rescheduleType = RescheduleMaintenanceRequest.Types.RescheduleType.Unspecified;
Timestamp scheduleTime = new Timestamp();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.RescheduleMaintenanceAsync(name, rescheduleType, scheduleTime);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceRescheduleMaintenanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

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
TypeDescription
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.

UpdateInstance(UpdateInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpdateInstance(UpdateInstanceRequest request, CallSettings callSettings = null)

Updates the metadata and configuration of a specific Redis instance.

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

Parameters
NameDescription
requestUpdateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    UpdateMask = new FieldMask(),
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.UpdateInstance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceUpdateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstance(FieldMask, Instance, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpdateInstance(FieldMask updateMask, Instance instance, CallSettings callSettings = null)

Updates the metadata and configuration of a specific Redis instance.

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

Parameters
NameDescription
updateMaskFieldMask

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 [Instance][google.cloud.redis.v1.Instance]:

  • displayName
  • labels
  • memorySizeGb
  • redisConfig
  • replica_count
instanceInstance

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
FieldMask updateMask = new FieldMask();
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.UpdateInstance(updateMask, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceUpdateInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceAsync(UpdateInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpdateInstanceAsync(UpdateInstanceRequest request, CallSettings callSettings = null)

Updates the metadata and configuration of a specific Redis instance.

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

Parameters
NameDescription
requestUpdateInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    UpdateMask = new FieldMask(),
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpdateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpdateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceAsync(UpdateInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpdateInstanceAsync(UpdateInstanceRequest request, CancellationToken cancellationToken)

Updates the metadata and configuration of a specific Redis instance.

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

Parameters
NameDescription
requestUpdateInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
UpdateInstanceRequest request = new UpdateInstanceRequest
{
    UpdateMask = new FieldMask(),
    Instance = new Instance(),
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpdateInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpdateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceAsync(FieldMask, Instance, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpdateInstanceAsync(FieldMask updateMask, Instance instance, CallSettings callSettings = null)

Updates the metadata and configuration of a specific Redis instance.

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

Parameters
NameDescription
updateMaskFieldMask

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 [Instance][google.cloud.redis.v1.Instance]:

  • displayName
  • labels
  • memorySizeGb
  • redisConfig
  • replica_count
instanceInstance

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
FieldMask updateMask = new FieldMask();
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpdateInstanceAsync(updateMask, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpdateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpdateInstanceAsync(FieldMask, Instance, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpdateInstanceAsync(FieldMask updateMask, Instance instance, CancellationToken cancellationToken)

Updates the metadata and configuration of a specific Redis instance.

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

Parameters
NameDescription
updateMaskFieldMask

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 [Instance][google.cloud.redis.v1.Instance]:

  • displayName
  • labels
  • memorySizeGb
  • redisConfig
  • replica_count
instanceInstance

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
FieldMask updateMask = new FieldMask();
Instance instance = new Instance();
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpdateInstanceAsync(updateMask, instance);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpdateInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstance(InstanceName, String, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpgradeInstance(InstanceName name, string redisVersion, CallSettings callSettings = null)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
nameInstanceName

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

redisVersionString

Required. Specifies the target version of Redis software to upgrade to.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
string redisVersion = "";
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.UpgradeInstance(name, redisVersion);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceUpgradeInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstance(UpgradeInstanceRequest, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpgradeInstance(UpgradeInstanceRequest request, CallSettings callSettings = null)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
requestUpgradeInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
UpgradeInstanceRequest request = new UpgradeInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RedisVersion = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.UpgradeInstance(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceUpgradeInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstance(String, String, CallSettings)

public virtual Operation<Instance, OperationMetadata> UpgradeInstance(string name, string redisVersion, CallSettings callSettings = null)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
nameString

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

redisVersionString

Required. Specifies the target version of Redis software to upgrade to.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Instance, OperationMetadata>

The RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = CloudRedisClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
string redisVersion = "";
// Make the request
Operation<Instance, OperationMetadata> response = cloudRedisClient.UpgradeInstance(name, redisVersion);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = cloudRedisClient.PollOnceUpgradeInstance(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstanceAsync(InstanceName, String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceAsync(InstanceName name, string redisVersion, CallSettings callSettings = null)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
nameInstanceName

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

redisVersionString

Required. Specifies the target version of Redis software to upgrade to.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
string redisVersion = "";
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpgradeInstanceAsync(name, redisVersion);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpgradeInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstanceAsync(InstanceName, String, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceAsync(InstanceName name, string redisVersion, CancellationToken cancellationToken)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
nameInstanceName

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

redisVersionString

Required. Specifies the target version of Redis software to upgrade to.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
string redisVersion = "";
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpgradeInstanceAsync(name, redisVersion);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpgradeInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstanceAsync(UpgradeInstanceRequest, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceAsync(UpgradeInstanceRequest request, CallSettings callSettings = null)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
requestUpgradeInstanceRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
UpgradeInstanceRequest request = new UpgradeInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RedisVersion = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpgradeInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpgradeInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstanceAsync(UpgradeInstanceRequest, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceAsync(UpgradeInstanceRequest request, CancellationToken cancellationToken)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
requestUpgradeInstanceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
UpgradeInstanceRequest request = new UpgradeInstanceRequest
{
    InstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
    RedisVersion = "",
};
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpgradeInstanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpgradeInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstanceAsync(String, String, CallSettings)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceAsync(string name, string redisVersion, CallSettings callSettings = null)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
nameString

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

redisVersionString

Required. Specifies the target version of Redis software to upgrade to.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
string redisVersion = "";
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpgradeInstanceAsync(name, redisVersion);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpgradeInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}

UpgradeInstanceAsync(String, String, CancellationToken)

public virtual Task<Operation<Instance, OperationMetadata>> UpgradeInstanceAsync(string name, string redisVersion, CancellationToken cancellationToken)

Upgrades Redis instance to the newer Redis version specified in the request.

Parameters
NameDescription
nameString

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

redisVersionString

Required. Specifies the target version of Redis software to upgrade to.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Instance, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
CloudRedisClient cloudRedisClient = await CloudRedisClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
string redisVersion = "";
// Make the request
Operation<Instance, OperationMetadata> response = await cloudRedisClient.UpgradeInstanceAsync(name, redisVersion);

// Poll until the returned long-running operation is complete
Operation<Instance, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Instance 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<Instance, OperationMetadata> retrievedResponse = await cloudRedisClient.PollOnceUpgradeInstanceAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Instance retrievedResult = retrievedResponse.Result;
}