ParameterResourceBuilderExtensions.CreateGeneratedParameter Method

Definition

Creates a new ParameterResource that has a generated value using the parameterDefault.

public static Aspire.Hosting.ApplicationModel.ParameterResource CreateGeneratedParameter (Aspire.Hosting.IDistributedApplicationBuilder builder, string name, bool secret, Aspire.Hosting.ApplicationModel.GenerateParameterDefault parameterDefault);
static member CreateGeneratedParameter : Aspire.Hosting.IDistributedApplicationBuilder * string * bool * Aspire.Hosting.ApplicationModel.GenerateParameterDefault -> Aspire.Hosting.ApplicationModel.ParameterResource
Public Function CreateGeneratedParameter (builder As IDistributedApplicationBuilder, name As String, secret As Boolean, parameterDefault As GenerateParameterDefault) As ParameterResource

Parameters

builder
IDistributedApplicationBuilder

Distributed application builder

name
String

Name of parameter resource

secret
Boolean

Flag indicating whether the parameter should be regarded as secret.

parameterDefault
GenerateParameterDefault

The GenerateParameterDefault that describes how the parameter's value should be generated.

Returns

The created ParameterResource.

Remarks

The value will be saved to the app host project's user secrets store when IsRunMode is true.

Applies to