Skip to content
Docs Try Aspire

MongoDBServerResource.withDataVolume

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

Signature

method withDataVolume builder
Adds a named volume for the MongoDB data folder
withDataVolume(
name?: string,
isReadOnly?: boolean): MongoDBServerResource
name string optional
isReadOnly boolean optional = False
MongoDBServerResource

Defined on

This method is defined on the following type: