次の方法で共有


CloudFormationExtensions.WithEnvironment<T> Method

Definition

Adds an environment variable to the resource with the value of the output from the CloudFormation stack.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> WithEnvironment<T> (this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string name, Aspire.Hosting.AWS.CloudFormation.StackOutputReference stackOutputReference) where T : Aspire.Hosting.ApplicationModel.IResourceWithEnvironment;
static member WithEnvironment : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)> * string * Aspire.Hosting.AWS.CloudFormation.StackOutputReference -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)> (requires 'T :> Aspire.Hosting.ApplicationModel.IResourceWithEnvironment)
<Extension()>
Public Function WithEnvironment(Of T As IResourceWithEnvironment) (builder As IResourceBuilder(Of T), name As String, stackOutputReference As StackOutputReference) As IResourceBuilder(Of T)

Type Parameters

T

The resource type.

Parameters

builder
IResourceBuilder<T>

The resource builder.

name
String

The name of the environment variable.

stackOutputReference
StackOutputReference

The reference to the CloudFormation stack output.

Returns

An IResourceBuilder<T>.

Applies to