Watch Aspire live streamsDocsTry Aspire

MongoDBServerResource.withKeyFile

Method
📦 Aspire.Hosting.MongoDB v13.6.0
interface MongoDBServerResource {
// ... omitted for brevity
withKeyFile(
keyValue: IExpressionValue,
keyFilePath?: string): MongoDBServerResource;
}

Signature

methodwithKeyFilebuilder
Sets up a keyfile for internal authentication between members of a MongoDB replica set, with the specified `keyValue` as the content of the file.
withKeyFile(
keyValue: IExpressionValue,
keyFilePath?: string): MongoDBServerResource
keyValueIExpressionValue
keyFilePathstringoptional= /etc/rs.key
MongoDBServerResource

Defined on

This method is defined on the following type: