Skip to content
Docs Try Aspire

IResourceWithEnvironment.withReference

Method
📦 Aspire.Hosting v13.2.0
interface IResourceWithEnvironment {
// ... 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

Defined on

This method is defined on the following type: