Skip to content
Docs Try Aspire

NatsServerResource Properties

Class Properties 8 members
A resource that represents a NATS server container.
ConnectionStringExpression Section titled ConnectionStringExpression ReferenceExpression
Gets the connection string expression for the NATS server.
public ReferenceExpression ConnectionStringExpression { get; }
Host Section titled Host EndpointReferenceExpression
Gets the host endpoint reference for this resource.
public EndpointReferenceExpression Host { get; }
PasswordParameter Section titled PasswordParameter nullable ParameterResource?
Gets or sets the password for the NATS server.
public ParameterResource? PasswordParameter { get; set; }
Port Section titled Port EndpointReferenceExpression
Gets the port endpoint reference for this resource.
public EndpointReferenceExpression Port { get; }
PrimaryEndpoint Section titled PrimaryEndpoint EndpointReference
Gets the primary endpoint for the NATS server.
public EndpointReference PrimaryEndpoint { get; }
UriExpression Section titled UriExpression ReferenceExpression
Gets the connection URI expression for the NATS server.
public ReferenceExpression UriExpression { get; }
Format: nats://[user:password@]{host}:{port}. The credential segment is omitted when no credentials are configured.
UserNameParameter Section titled UserNameParameter nullable ParameterResource?
Gets or sets the user name for the NATS server.
public ParameterResource? UserNameParameter { get; set; }
UserNameReference Section titled UserNameReference ReferenceExpression
Gets a reference to the user name for the NATS server.
public ReferenceExpression UserNameReference { get; }
Returns the user name parameter if specified, otherwise returns the default user name "nats".