Skip to content
Docs Try Aspire
Docs Try

withReference

Method
📦 Aspire.Hosting v13.2.0
interface ContainerResource {
// ... omitted for brevity
withReference(
source: IResource,
connectionName?: string,
optional?: boolean,
name?: string): IResourceWithEnvironment;
}

Signature

method withReference builder
Adds a reference to another resource
withReference(
source: IResource,
connectionName?: string,
optional?: boolean,
name?: string): IResourceWithEnvironment
source IResource
connectionName string optional
optional boolean optional = False
name string optional
IResourceWithEnvironment

Applies to

This method applies to the following types: