Skip to content
DocsTry Aspire
DocsTry

NatsServerResource

Handle
📦 Aspire.Hosting.Nats v13.4.0
interface NatsServerResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly host: EndpointReferenceExpression;
passwordParameter: ParameterResource;
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
readonly uriExpression: ReferenceExpression;
userNameParameter: ParameterResource;
readonly userNameReference: ReferenceExpression;
withDataBindMount(
source: string,
isReadOnly?: boolean): NatsServerResource;
withDataVolume(
name?: string,
isReadOnly?: boolean): NatsServerResource;
withJetStream(): NatsServerResource;
}

Properties

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the NATS server.
propertyhostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
propertypasswordParameterParameterResourceget · set
Gets or sets the password for the NATS server.
propertyportEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
propertyprimaryEndpointEndpointReferenceget
Gets the primary endpoint for the NATS server.
propertyuriExpressionReferenceExpressionget
Gets the connection URI expression for the NATS server.
propertyuserNameParameterParameterResourceget · set
Gets or sets the user name for the NATS server.
propertyuserNameReferenceReferenceExpressionget
Gets a reference to the user name for the NATS server.

Methods

methodwithDataBindMountbuilder
Adds a bind mount for the data folder to a NATS container resource.
withDataBindMount(
source: string,
isReadOnly?: boolean): NatsServerResource
sourcestring
isReadOnlybooleanoptional= False
NatsServerResource
methodwithDataVolumebuilder
Adds a named volume for the data folder to a NATS container resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): NatsServerResource
namestringoptional
isReadOnlybooleanoptional= False
NatsServerResource
methodwithJetStreambuilder
Adds JetStream support to the NATS server resource.
withJetStream(): NatsServerResource
NatsServerResource