Skip to content
DocsTry Aspire
DocsTry

ValkeyResource

Handle
📦 Aspire.Hosting.Valkey v13.4.0
interface ValkeyResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly host: EndpointReferenceExpression;
readonly passwordParameter: ParameterResource;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
readonly uriExpression: ReferenceExpression;
withDataBindMount(
source: string,
isReadOnly?: boolean): ValkeyResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): ValkeyResource;
withPersistence(
interval?: timespan,
keysChangedThreshold?: number): ValkeyResource;
}

Properties

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the Valkey server.
propertyhostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
propertypasswordParameterParameterResourceget
Gets the parameter that contains the Valkey server password.
propertyportEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the Valkey server.
propertyuriExpressionReferenceExpressionget
Gets the connection URI expression for the Valkey server.

Methods

methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a Valkey container resource and enables Valkey persistence.
withDataBindMount(
source: string,
isReadOnly?: boolean): ValkeyResource
sourcestring
isReadOnlybooleanoptional= False
ValkeyResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a Valkey container resource and enables Valkey persistence.
withDataVolume(
name?: string,
isReadOnly?: boolean): ValkeyResource
namestringoptional
isReadOnlybooleanoptional= False
ValkeyResource
methodwithPersistencebuilder
Configures a Valkey container resource for persistence.
withPersistence(
interval?: timespan,
keysChangedThreshold?: number): ValkeyResource
intervaltimespanoptional
keysChangedThresholdnumberoptional= 1
ValkeyResource