Skip to content
Docs Try Aspire

IResourceWithEnvironment.withEnvironment

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

Signature

method withEnvironment builder
Sets an environment variable on the resource
withEnvironment(
name: string,
value: IResourceWithConnectionString): IResourceWithEnvironment
name string
value IResourceWithConnectionString
IResourceWithEnvironment

Defined on

This method is defined on the following type: