Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

MongoDBReplicaSetResource

Handle
📦 Aspire.Hosting.MongoDB v17.0.0

Represents a MongoDB replica set resource in the application model. A replica set is a group of MongoDB servers that maintain the same data set, providing redundancy and high availability.

type MongoDBReplicaSetResource interface {
ExpressionValue
Resource
ResourceWithConnectionString
ResourceWithWaitSupport
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the combined connection string for the MongoDB replica set, which includes the endpoints of all members, interpretable by the MongoDB driver.
ConnectionStringExpression() *ReferenceExpression
propertyMembers[]MongoDBServerResourceget
Gets the MongoDB server resources that are members of this replica set, in the order they were added.
Members() ([]MongoDBServerResource, error)
propertyResourceTypeDisplayNamestringget
Gets the ResourceTypeDisplayName property
ResourceTypeDisplayName() (string, error)
propertySharedKeyFileParameterParameterResourceget
Gets the parameter that contains the content of the key file used for internal authentication between members of the MongoDB replica set.
SharedKeyFileParameter() ParameterResource
propertySharedPasswordParameterParameterResourceget
Gets the parameter that contains the password for authenticating to the MongoDB replica set.
SharedPasswordParameter() ParameterResource
propertySharedUserNameParameterParameterResourceget
Gets the parameter that contains the username for authenticating to the MongoDB replica set.
SharedUserNameParameter() ParameterResource
propertySharedUserNameReference*ReferenceExpressionget
Gets a reference to the username for the MongoDB replica set.
SharedUserNameReference() *ReferenceExpression

Methods

methodWithMemberbuilder
Adds a MongoDB server resource as a member of the replica set.
WithMember(member MongoDBServerResource) MongoDBReplicaSetResource
memberMongoDBServerResourceThe MongoDB server resource that represents the member to add to this replica set.
MongoDBReplicaSetResource

A reference to the IResourceBuilder.

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