Skip to content
Docs Try Aspire

CapturedEnvironmentVariable Properties

Class Properties 5 members
Represents a captured environment variable that will be written to the .env file adjacent to the Docker Compose file.
DefaultValue Section titled DefaultValue nullable string?
Gets or sets the default value for the environment variable.
public string? DefaultValue { get; set; }
Description Section titled Description nullable string?
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; }
Resource Section titled Resource nullable IResource?
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; }
Source Section titled Source nullable object?
Gets or sets the source object that originated this environment variable. This could be a ApplicationModel.ParameterResource, ApplicationModel.ContainerMountAnnotation, or other source types.
public object? Source { get; set; }