Skip to content
Docs Try Aspire
Docs Try

RedisResource

Handle
📦 Aspire.Hosting.Redis v13.4.0
interface RedisResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly host: EndpointReferenceExpression;
passwordParameter: ParameterResource;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
readonly tlsEnabled: boolean;
readonly uriExpression: ReferenceExpression;
withDataBindMount(
source: string,
isReadOnly?: boolean): RedisResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): RedisResource;
withHostPort(port: number): RedisResource;
withPassword(password: ParameterResource): RedisResource;
withPersistence(
interval?: timespan,
keysChangedThreshold?: number): RedisResource;
withRedisCommander(configureContainer?: (obj: RedisCommanderResource) => Promise<void>, containerName?: string): RedisResource;
withRedisInsight(configureContainer?: (obj: RedisInsightResource) => Promise<void>, containerName?: string): RedisResource;
}

Properties

property connectionStringExpression ReferenceExpression get
Gets the connection string expression for the Redis server.
property host EndpointReferenceExpression get
Gets the host endpoint reference for this resource.
property passwordParameter ParameterResource get · set
Gets the parameter that contains the Redis server password.
property port EndpointReferenceExpression get
Gets the port endpoint reference for this resource.
property primaryEndpoint EndpointReference get
Gets the primary endpoint for the Redis server.
property tlsEnabled boolean get
Indicates whether TLS is enabled for the Redis server.
property uriExpression ReferenceExpression get
Gets the connection URI expression for the Redis server.

Methods

method withDataBindMount builder
Adds a bind mount for the data folder to a Redis container resource and enables Redis persistence.
withDataBindMount(
source: string,
isReadOnly?: boolean): RedisResource
source string
isReadOnly boolean optional = False
RedisResource
method withDataVolume builder
Adds a named volume for the data folder to a Redis container resource and enables Redis persistence.
withDataVolume(
name?: string,
isReadOnly?: boolean): RedisResource
name string optional
isReadOnly boolean optional = False
RedisResource
method withHostPort builder
Configures the host port that the Redis resource is exposed on instead of using randomly assigned port.
withHostPort(port: number): RedisResource
port number
RedisResource
method withPassword builder
Configures the password that the Redis resource is used.
withPassword(password: ParameterResource): RedisResource
password ParameterResource
RedisResource
method withPersistence builder
Configures a Redis container resource for persistence.
withPersistence(
interval?: timespan,
keysChangedThreshold?: number): RedisResource
interval timespan optional
keysChangedThreshold number optional = 1
RedisResource
method withRedisCommander builder
Adds Redis Commander management UI
withRedisCommander(configureContainer?: (obj: RedisCommanderResource) => Promise<void>, containerName?: string): RedisResource
configureContainer (obj: RedisCommanderResource) => Promise<void> optional
containerName string optional
RedisResource
method withRedisInsight builder
Adds Redis Insight management UI
withRedisInsight(configureContainer?: (obj: RedisInsightResource) => Promise<void>, containerName?: string): RedisResource
configureContainer (obj: RedisInsightResource) => Promise<void> optional
containerName string optional
RedisResource