ParameterResourceBuilderExtensions.AddParameterFromConfiguration Method

Definition

Adds a parameter resource to the application, with a value coming from configuration.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> AddParameterFromConfiguration (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, string configurationKey, bool secret = false);
static member AddParameterFromConfiguration : Aspire.Hosting.IDistributedApplicationBuilder * string * string * bool -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource>
<Extension()>
Public Function AddParameterFromConfiguration (builder As IDistributedApplicationBuilder, name As String, configurationKey As String, Optional secret As Boolean = false) As IResourceBuilder(Of ParameterResource)

Parameters

builder
IDistributedApplicationBuilder

Distributed application builder

name
String

Name of parameter resource

configurationKey
String

Configuration key used to get the value of the parameter

secret
Boolean

Optional flag indicating whether the parameter should be regarded as secret.

Returns

Resource builder for the parameter.

Applies to