Skip to content
Docs Try Aspire

NatsServerResource.withDataVolume

Method
📦 Aspire.Hosting.Nats v13.2.0-preview.1.26159.1
interface NatsServerResource {
// ... omitted for brevity
withDataVolume(
name?: string,
isReadOnly?: boolean): NatsServerResource;
}

Signature

method withDataVolume builder
Adds a persistent data volume to the NATS resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): NatsServerResource
name string optional
isReadOnly boolean optional = False
NatsServerResource

Defined on

This method is defined on the following type: