Class CloudRedisClientImpl (3.0.0)

public sealed class CloudRedisClientImpl : CloudRedisClient

CloudRedis client wrapper implementation, for convenient use.

Inheritance

Object > CloudRedisClient > CloudRedisClientImpl

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

Constructors

CloudRedisClientImpl(CloudRedis.CloudRedisClient, CloudRedisSettings, ILogger)

public CloudRedisClientImpl(CloudRedis.CloudRedisClient grpcClient, CloudRedisSettings settings, ILogger logger)

Constructs a client wrapper for the CloudRedis service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientCloudRedis.CloudRedisClient

The underlying gRPC client.

settingsCloudRedisSettings

The base CloudRedisSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

CreateInstanceOperationsClient

public override OperationsClient CreateInstanceOperationsClient { get; }

The long-running operations client for CreateInstance.

Property Value
TypeDescription
OperationsClient
Overrides

DeleteInstanceOperationsClient

public override OperationsClient DeleteInstanceOperationsClient { get; }

The long-running operations client for DeleteInstance.

Property Value
TypeDescription
OperationsClient
Overrides

ExportInstanceOperationsClient

public override OperationsClient ExportInstanceOperationsClient { get; }

The long-running operations client for ExportInstance.

Property Value
TypeDescription
OperationsClient
Overrides

FailoverInstanceOperationsClient

public override OperationsClient FailoverInstanceOperationsClient { get; }

The long-running operations client for FailoverInstance.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override CloudRedis.CloudRedisClient GrpcClient { get; }

The underlying gRPC CloudRedis client

Property Value
TypeDescription
CloudRedis.CloudRedisClient
Overrides

ImportInstanceOperationsClient

public override OperationsClient ImportInstanceOperationsClient { get; }

The long-running operations client for ImportInstance.

Property Value
TypeDescription
OperationsClient
Overrides

RescheduleMaintenanceOperationsClient

public override OperationsClient RescheduleMaintenanceOperationsClient { get; }

The long-running operations client for RescheduleMaintenance.

Property Value
TypeDescription
OperationsClient
Overrides

UpdateInstanceOperationsClient

public override OperationsClient UpdateInstanceOperationsClient { get; }

The long-running operations client for UpdateInstance.

Property Value
TypeDescription
OperationsClient
Overrides

UpgradeInstanceOperationsClient

public override OperationsClient UpgradeInstanceOperationsClient { get; }

The long-running operations client for UpgradeInstance.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

CreateInstance(CreateInstanceRequest, CallSettings)

public override 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.

Overrides

CreateInstanceAsync(CreateInstanceRequest, CallSettings)

public override async 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.

Overrides

DeleteInstance(DeleteInstanceRequest, CallSettings)

public override 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.

Overrides

DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)

public override async 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.

Overrides

ExportInstance(ExportInstanceRequest, CallSettings)

public override 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.

Overrides

ExportInstanceAsync(ExportInstanceRequest, CallSettings)

public override async 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.

Overrides

FailoverInstance(FailoverInstanceRequest, CallSettings)

public override 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.

Overrides

FailoverInstanceAsync(FailoverInstanceRequest, CallSettings)

public override async 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.

Overrides

GetInstance(GetInstanceRequest, CallSettings)

public override 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.

Overrides

GetInstanceAsync(GetInstanceRequest, CallSettings)

public override 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.

Overrides

GetInstanceAuthString(GetInstanceAuthStringRequest, CallSettings)

public override 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.

Overrides

GetInstanceAuthStringAsync(GetInstanceAuthStringRequest, CallSettings)

public override 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.

Overrides

ImportInstance(ImportInstanceRequest, CallSettings)

public override 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.

Overrides

ImportInstanceAsync(ImportInstanceRequest, CallSettings)

public override async 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.

Overrides

ListInstances(ListInstancesRequest, CallSettings)

public override 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.

Overrides

ListInstancesAsync(ListInstancesRequest, CallSettings)

public override 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.

Overrides

RescheduleMaintenance(RescheduleMaintenanceRequest, CallSettings)

public override 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.

Overrides

RescheduleMaintenanceAsync(RescheduleMaintenanceRequest, CallSettings)

public override async 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.

Overrides

UpdateInstance(UpdateInstanceRequest, CallSettings)

public override 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.

Overrides

UpdateInstanceAsync(UpdateInstanceRequest, CallSettings)

public override async 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.

Overrides

UpgradeInstance(UpgradeInstanceRequest, CallSettings)

public override 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.

Overrides

UpgradeInstanceAsync(UpgradeInstanceRequest, CallSettings)

public override async 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.

Overrides