Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

withEnvironment

Method
📦 Aspire.Hosting v13.5.4
interface ContainerResource {
// ... omitted for brevity
withEnvironment(
name: string,
value: IExpressionValue): IResourceWithEnvironment;
}

Signature

methodwithEnvironmentbuilder
Sets an environment variable
withEnvironment(
name: string,
value: IExpressionValue): IResourceWithEnvironment
namestring
valueIExpressionValue
IResourceWithEnvironment

Applies to

This method applies to the following types: