Share via


ParameterResourceBuilderExtensions.AddParameter Method

Definition

Adds a parameter resource to the application.

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

Parameters

builder
IDistributedApplicationBuilder

Distributed application builder

name
String

Name of parameter resource

secret
Boolean

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

Returns

Resource builder for the parameter.

Exceptions

Applies to