Skip to content
DocsTry Aspire
DocsTry

withDataVolume

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

Signature

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

Applies to

This method applies to the following types: