Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

IResourceWithEnvironment.withReference

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

Signature

methodwithReferencebuilder
Adds a reference to another resource
withReference(
source: IResource | EndpointReference | string | uri,
connectionName?: string,
optional?: boolean,
name?: string): IResourceWithEnvironment
sourceIResource | EndpointReference | string | uri
connectionNamestringoptional
optionalbooleanoptional= False
namestringoptional
IResourceWithEnvironment

Defined on

This method is defined on the following type: