public sealed class CloudRedisClientImpl : CloudRedisClient
Reference documentation and code samples for the Google Cloud Memorystore for Redis v1beta1 API class CloudRedisClientImpl.
CloudRedis client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Redis.V1Beta1Assembly
Google.Cloud.Redis.V1Beta1.dll
Remarks
Configures and manages Cloud Memorystore for Redis instances
Google Cloud Memorystore for Redis v1beta1
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(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 | |
---|---|
Name | Description |
grpcClient | CloudRedisCloudRedisClient The underlying gRPC client. |
settings | CloudRedisSettings The base CloudRedisSettings used within this client. |
logger | ILogger Optional ILogger to use within this client. |
Properties
CreateInstanceOperationsClient
public override OperationsClient CreateInstanceOperationsClient { get; }
The long-running operations client for CreateInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteInstanceOperationsClient
public override OperationsClient DeleteInstanceOperationsClient { get; }
The long-running operations client for DeleteInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ExportInstanceOperationsClient
public override OperationsClient ExportInstanceOperationsClient { get; }
The long-running operations client for ExportInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
FailoverInstanceOperationsClient
public override OperationsClient FailoverInstanceOperationsClient { get; }
The long-running operations client for FailoverInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public override CloudRedis.CloudRedisClient GrpcClient { get; }
The underlying gRPC CloudRedis client
Property Value | |
---|---|
Type | Description |
CloudRedisCloudRedisClient |
ImportInstanceOperationsClient
public override OperationsClient ImportInstanceOperationsClient { get; }
The long-running operations client for ImportInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
RescheduleMaintenanceOperationsClient
public override OperationsClient RescheduleMaintenanceOperationsClient { get; }
The long-running operations client for RescheduleMaintenance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpdateInstanceOperationsClient
public override OperationsClient UpdateInstanceOperationsClient { get; }
The long-running operations client for UpdateInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
UpgradeInstanceOperationsClient
public override OperationsClient UpgradeInstanceOperationsClient { get; }
The long-running operations client for UpgradeInstance
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
CreateInstance(CreateInstanceRequest, CallSettings)
public override Operation<Instance, Any> 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. The 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 | |
---|---|
Name | Description |
request | CreateInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInstanceAny | The RPC response. |
CreateInstanceAsync(CreateInstanceRequest, CallSettings)
public override Task<Operation<Instance, Any>> 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. The 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 | |
---|---|
Name | Description |
request | CreateInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInstanceAny | A Task containing the RPC response. |
DeleteInstance(DeleteInstanceRequest, CallSettings)
public override Operation<Empty, Any> DeleteInstance(DeleteInstanceRequest request, CallSettings callSettings = null)
Deletes a specific Redis instance. Instance stops serving and data is deleted.
Parameters | |
---|---|
Name | Description |
request | DeleteInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyAny | The RPC response. |
DeleteInstanceAsync(DeleteInstanceRequest, CallSettings)
public override Task<Operation<Empty, Any>> DeleteInstanceAsync(DeleteInstanceRequest request, CallSettings callSettings = null)
Deletes a specific Redis instance. Instance stops serving and data is deleted.
Parameters | |
---|---|
Name | Description |
request | DeleteInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyAny | A Task containing the RPC response. |
ExportInstance(ExportInstanceRequest, CallSettings)
public override Operation<Instance, Any> 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 | |
---|---|
Name | Description |
request | ExportInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInstanceAny | The RPC response. |
ExportInstanceAsync(ExportInstanceRequest, CallSettings)
public override Task<Operation<Instance, Any>> 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 | |
---|---|
Name | Description |
request | ExportInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInstanceAny | A Task containing the RPC response. |
FailoverInstance(FailoverInstanceRequest, CallSettings)
public override Operation<Instance, Any> 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 | |
---|---|
Name | Description |
request | FailoverInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInstanceAny | The RPC response. |
FailoverInstanceAsync(FailoverInstanceRequest, CallSettings)
public override Task<Operation<Instance, Any>> 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 | |
---|---|
Name | Description |
request | FailoverInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInstanceAny | A Task containing the RPC response. |
GetInstance(GetInstanceRequest, CallSettings)
public override Instance GetInstance(GetInstanceRequest request, CallSettings callSettings = null)
Gets the details of a specific Redis instance.
Parameters | |
---|---|
Name | Description |
request | GetInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Instance | The RPC response. |
GetInstanceAsync(GetInstanceRequest, CallSettings)
public override Task<Instance> GetInstanceAsync(GetInstanceRequest request, CallSettings callSettings = null)
Gets the details of a specific Redis instance.
Parameters | |
---|---|
Name | Description |
request | GetInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskInstance | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | GetInstanceAuthStringRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
InstanceAuthString | The RPC response. |
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 | |
---|---|
Name | Description |
request | GetInstanceAuthStringRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskInstanceAuthString | A Task containing the RPC response. |
ImportInstance(ImportInstanceRequest, CallSettings)
public override Operation<Instance, Any> 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 | |
---|---|
Name | Description |
request | ImportInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInstanceAny | The RPC response. |
ImportInstanceAsync(ImportInstanceRequest, CallSettings)
public override Task<Operation<Instance, Any>> 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 | |
---|---|
Name | Description |
request | ImportInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInstanceAny | A Task containing the RPC response. |
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 | |
---|---|
Name | Description |
request | ListInstancesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListInstancesResponseInstance | A pageable sequence of Instance resources. |
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 | |
---|---|
Name | Description |
request | ListInstancesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListInstancesResponseInstance | A pageable asynchronous sequence of Instance resources. |
RescheduleMaintenance(RescheduleMaintenanceRequest, CallSettings)
public override Operation<Instance, Any> RescheduleMaintenance(RescheduleMaintenanceRequest request, CallSettings callSettings = null)
Reschedule maintenance for a given instance in a given project and location.
Parameters | |
---|---|
Name | Description |
request | RescheduleMaintenanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInstanceAny | The RPC response. |
RescheduleMaintenanceAsync(RescheduleMaintenanceRequest, CallSettings)
public override Task<Operation<Instance, Any>> RescheduleMaintenanceAsync(RescheduleMaintenanceRequest request, CallSettings callSettings = null)
Reschedule maintenance for a given instance in a given project and location.
Parameters | |
---|---|
Name | Description |
request | RescheduleMaintenanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInstanceAny | A Task containing the RPC response. |
UpdateInstance(UpdateInstanceRequest, CallSettings)
public override Operation<Instance, Any> 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 | |
---|---|
Name | Description |
request | UpdateInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInstanceAny | The RPC response. |
UpdateInstanceAsync(UpdateInstanceRequest, CallSettings)
public override Task<Operation<Instance, Any>> 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 | |
---|---|
Name | Description |
request | UpdateInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInstanceAny | A Task containing the RPC response. |
UpgradeInstance(UpgradeInstanceRequest, CallSettings)
public override Operation<Instance, Any> UpgradeInstance(UpgradeInstanceRequest request, CallSettings callSettings = null)
Upgrades Redis instance to the newer Redis version specified in the request.
Parameters | |
---|---|
Name | Description |
request | UpgradeInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationInstanceAny | The RPC response. |
UpgradeInstanceAsync(UpgradeInstanceRequest, CallSettings)
public override Task<Operation<Instance, Any>> UpgradeInstanceAsync(UpgradeInstanceRequest request, CallSettings callSettings = null)
Upgrades Redis instance to the newer Redis version specified in the request.
Parameters | |
---|---|
Name | Description |
request | UpgradeInstanceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationInstanceAny | A Task containing the RPC response. |