Skip to content
DocsTry Aspire
DocsTry

NatsServerResource Properties

ClassProperties8 members
A resource that represents a NATS server container.
ConnectionStringExpressionSection titled ConnectionStringExpressionReferenceExpression
Gets the connection string expression for the NATS server.
public ReferenceExpression ConnectionStringExpression { get; }
HostSection titled HostEndpointReferenceExpression
Gets the host endpoint reference for this resource.
public EndpointReferenceExpression Host { get; }
PasswordParameterSection titled PasswordParameternullableParameterResource?
Gets or sets the password for the NATS server.
public ParameterResource? PasswordParameter { get; set; }
PortSection titled PortEndpointReferenceExpression
Gets the port endpoint reference for this resource.
public EndpointReferenceExpression Port { get; }
PrimaryEndpointSection titled PrimaryEndpointEndpointReference
Gets the primary endpoint for the NATS server.
public EndpointReference PrimaryEndpoint { get; }
UriExpressionSection titled UriExpressionReferenceExpression
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.
UserNameParameterSection titled UserNameParameternullableParameterResource?
Gets or sets the user name for the NATS server.
public ParameterResource? UserNameParameter { get; set; }
UserNameReferenceSection titled UserNameReferenceReferenceExpression
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".