Skip to content
DocsTry Aspire
DocsTry

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

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the Redis server.
propertyhostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
propertypasswordParameterParameterResourceget · set
Gets the parameter that contains the Redis server password.
propertyportEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the Redis server.
propertytlsEnabledbooleanget
Indicates whether TLS is enabled for the Redis server.
propertyuriExpressionReferenceExpressionget
Gets the connection URI expression for the Redis server.

Methods

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