ValkeyResource

Handle
📦 Aspire.Hosting.Valkey v17.0.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 resourceTypeDisplayName: string;
readonly uriExpression: ReferenceExpression;
withDataBindMount(
source: string,
isReadOnly?: boolean): ValkeyResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): ValkeyResource;
withPersistence(
interval?: timespan,
keysChangedThreshold?: number): ValkeyResource;
withRepl(): 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.
propertyresourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
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
sourcestringThe source directory on the host to mount into the container.
isReadOnlybooleanoptional= FalseA flag that indicates if this is a read-only mount. Setting this to `true` will disable Valkey persistence. Defaults to `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
namestringoptionalThe name of the volume. Defaults to an auto-generated name based on the application and resource names.
isReadOnlybooleanoptional= FalseA flag that indicates if this is a read-only volume. Setting this to `true` will disable Valkey persistence. Defaults to `false`.
ValkeyResource
methodwithPersistencebuilder
Configures a Valkey container resource for persistence.
withPersistence(
interval?: timespan,
keysChangedThreshold?: number): ValkeyResource
intervaltimespanoptionalThe interval between snapshot exports. Defaults to 60 seconds.
keysChangedThresholdnumberoptional= 1The number of key change operations required to trigger a snapshot at the interval. Defaults to 1.
ValkeyResource
methodwithReplbuilder
Adds a REPL command that opens an authenticated Valkey shell in the dashboard terminal dock.
withRepl(): ValkeyResource
ValkeyResource