Skip to content
Docs Try Aspire

MongoDBServerResource

Handle TypeScript
📦 Aspire.Hosting.MongoDB v13.2.0-preview.1.26159.1
interface MongoDBServerResource
extends IComputeResource,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly databases: Dict<string,string>;
entrypoint: string;
readonly host: EndpointReferenceExpression;
readonly name: string;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
shellExecution: boolean;
readonly uriExpression: ReferenceExpression;
readonly userNameReference: ReferenceExpression;
addDatabase(
name: string,
databaseName?: string): MongoDBDatabaseResource;
withDataBindMount(
source: string,
isReadOnly?: boolean): MongoDBServerResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): MongoDBServerResource;
withInitFiles(source: string): MongoDBServerResource;
withMongoExpress(configureContainer?: (obj: MongoExpressContainerResource) => void, containerName?: string): MongoDBServerResource;
}

Properties

property connectionStringExpression ReferenceExpression get
Gets the ConnectionStringExpression property
property databases Dict<string,string> get
Gets the Databases property
property entrypoint string get · set
Gets the Entrypoint property
property host EndpointReferenceExpression get
Gets the Host property
property name string get
Gets the Name property
property port EndpointReferenceExpression get
Gets the Port property
property primaryEndpoint EndpointReference get
Gets the PrimaryEndpoint property
property shellExecution boolean get · set
Gets the ShellExecution property
property uriExpression ReferenceExpression get
Gets the UriExpression property
property userNameReference ReferenceExpression get
Gets the UserNameReference property

Methods

method addDatabase builder
Adds a MongoDB database resource
addDatabase(
name: string,
databaseName?: string): MongoDBDatabaseResource
name string
databaseName string optional
MongoDBDatabaseResource
method withDataBindMount builder
Adds a bind mount for the MongoDB data folder
withDataBindMount(
source: string,
isReadOnly?: boolean): MongoDBServerResource
source string
isReadOnly boolean optional = False
MongoDBServerResource
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
method withInitFiles builder
Copies init files into a MongoDB container
withInitFiles(source: string): MongoDBServerResource
source string
MongoDBServerResource
method withMongoExpress builder
Adds a MongoExpress administration platform for MongoDB
withMongoExpress(configureContainer?: (obj: MongoExpressContainerResource) => void, containerName?: string): MongoDBServerResource
configureContainer (obj: MongoExpressContainerResource) => void optional
containerName string optional
MongoDBServerResource