DockerComposeServiceExtensions.AsEnvironmentPlaceholder Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AsEnvironmentPlaceholder(IManifestExpressionProvider, DockerComposeServiceResource) |
Creates a placeholder for an environment variable in the Docker Compose file. |
AsEnvironmentPlaceholder(IResourceBuilder<ParameterResource>, DockerComposeServiceResource) |
Creates a Docker Compose environment variable placeholder for the specified ParameterResource. |
AsEnvironmentPlaceholder(ParameterResource, DockerComposeServiceResource) |
Creates a Docker Compose environment variable placeholder for this ParameterResource. |
AsEnvironmentPlaceholder(IManifestExpressionProvider, DockerComposeServiceResource)
Creates a placeholder for an environment variable in the Docker Compose file.
public static string AsEnvironmentPlaceholder(this Aspire.Hosting.ApplicationModel.IManifestExpressionProvider manifestExpressionProvider, Aspire.Hosting.Docker.DockerComposeServiceResource dockerComposeService);
static member AsEnvironmentPlaceholder : Aspire.Hosting.ApplicationModel.IManifestExpressionProvider * Aspire.Hosting.Docker.DockerComposeServiceResource -> string
<Extension()>
Public Function AsEnvironmentPlaceholder (manifestExpressionProvider As IManifestExpressionProvider, dockerComposeService As DockerComposeServiceResource) As String
Parameters
- manifestExpressionProvider
- IManifestExpressionProvider
The manifest expression provider.
- dockerComposeService
- DockerComposeServiceResource
The Docker Compose service resource to associate the environment variable with.
Returns
A string representing the environment variable placeholder in Docker Compose syntax (e.g., ${ENV_VAR}
).
Applies to
AsEnvironmentPlaceholder(IResourceBuilder<ParameterResource>, DockerComposeServiceResource)
Creates a Docker Compose environment variable placeholder for the specified ParameterResource.
public static string AsEnvironmentPlaceholder(this Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> builder, Aspire.Hosting.Docker.DockerComposeServiceResource dockerComposeService);
static member AsEnvironmentPlaceholder : Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> * Aspire.Hosting.Docker.DockerComposeServiceResource -> string
<Extension()>
Public Function AsEnvironmentPlaceholder (builder As IResourceBuilder(Of ParameterResource), dockerComposeService As DockerComposeServiceResource) As String
Parameters
- builder
- IResourceBuilder<ParameterResource>
The resource builder for the parameter resource.
- dockerComposeService
- DockerComposeServiceResource
The Docker Compose service resource to associate the environment variable with.
Returns
A string representing the environment variable placeholder in Docker Compose syntax (e.g., ${ENV_VAR}
).
Applies to
AsEnvironmentPlaceholder(ParameterResource, DockerComposeServiceResource)
Creates a Docker Compose environment variable placeholder for this ParameterResource.
public static string AsEnvironmentPlaceholder(this Aspire.Hosting.ApplicationModel.ParameterResource parameter, Aspire.Hosting.Docker.DockerComposeServiceResource dockerComposeService);
static member AsEnvironmentPlaceholder : Aspire.Hosting.ApplicationModel.ParameterResource * Aspire.Hosting.Docker.DockerComposeServiceResource -> string
<Extension()>
Public Function AsEnvironmentPlaceholder (parameter As ParameterResource, dockerComposeService As DockerComposeServiceResource) As String
Parameters
- parameter
- ParameterResource
The parameter resource for which to create the environment variable placeholder.
- dockerComposeService
- DockerComposeServiceResource
The Docker Compose service resource to associate the environment variable with.
Returns
A string representing the environment variable placeholder in Docker Compose syntax (e.g., ${ENV_VAR}
).