Skip to content
Docs Try Aspire

NatsServerResource

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

Properties

property connectionStringExpression ReferenceExpression get
Gets the ConnectionStringExpression property
property entrypoint string get · set
Gets the Entrypoint property
property host EndpointReferenceExpression get
Gets the Host property
property name string get
Gets the Name property
property passwordParameter ParameterResource get · set
Gets the PasswordParameter property
property port EndpointReferenceExpression get
Gets the Port property
property primaryEndpoint EndpointReference get
Gets the PrimaryEndpoint property
property shellExecution boolean get · set
Gets the ShellExecution property
property uriExpression ReferenceExpression get
Gets the UriExpression property
property userNameParameter ParameterResource get · set
Gets the UserNameParameter property
property userNameReference ReferenceExpression get
Gets the UserNameReference property

Methods

method withDataBindMount builder
Mounts a host directory as the NATS data directory.
withDataBindMount(
source: string,
isReadOnly?: boolean): NatsServerResource
source string
isReadOnly boolean optional = False
NatsServerResource
method withDataVolume builder
Adds a persistent data volume to the NATS resource.
withDataVolume(
name?: string,
isReadOnly?: boolean): NatsServerResource
name string optional
isReadOnly boolean optional = False
NatsServerResource
method withJetStream builder
Configures the NATS resource to enable JetStream.
withJetStream(): NatsServerResource
NatsServerResource