Skip to content
Docs Try Aspire
Docs Try

MongoDBServerResource.withDataVolume

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

Signature

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

Defined on

This method is defined on the following type: