Skip to content
DocsTry Aspire
DocsTry

CapturedEnvironmentVariable Properties

ClassProperties5 members
Represents a captured environment variable that will be written to the .env file adjacent to the Docker Compose file.
DefaultValueSection titled DefaultValuenullablestring?
Gets or sets the default value for the environment variable.
public string? DefaultValue { get; set; }
DescriptionSection titled Descriptionnullablestring?
Gets or sets the description for the environment variable.
public string? Description { get; set; }
Gets the name of the environment variable.
public string Name { get; init; }
ResourceSection titled ResourcenullableIResource?
Gets or sets the resource that this environment variable is associated with. This is useful when the source is an annotation on a resource, allowing you to identify which resource this environment variable is related to.
public IResource? Resource { get; set; }
SourceSection titled Sourcenullableobject?
Gets or sets the source object that originated this environment variable. This could be a ApplicationModel.ParameterResource, ApplicationModel.ContainerMountAnnotation, ApplicationModel.ContainerImageReference, or ApplicationModel.ContainerPortReference.
public object? Source { get; set; }