Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddMongoDBReplicaSet

Method
📦 Aspire.Hosting.MongoDB v17.0.0
func (DistributedApplicationBuilder) AddMongoDBReplicaSet(
name string,
options ...*AddMongoDBReplicaSetOptions,
) MongoDBReplicaSetResource

Signature

methodAddMongoDBReplicaSetbuilder
Adds a MongoDB replica set resource to the application model.
AddMongoDBReplicaSet(
name string,
options ...*AddMongoDBReplicaSetOptions,
) MongoDBReplicaSetResource
namestringThe name of the replica set resource.
options...*AddMongoDBReplicaSetOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddMongoDBReplicaSetOptions argument.

UserName*ParameterResourceAn optional parameter resource that contains the username for authenticating to the MongoDB replica set. If not provided, a default username will be used.
Password*ParameterResourceAn optional parameter resource that contains the password for authenticating to the MongoDB replica set. If not provided, a default password will be used.
MongoDBReplicaSetResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder