Skip to content
Docs Try Aspire

AzureBicepResourceExtensions Methods

Class Methods 18 members
Extension methods for adding Azure Bicep resources to the application model.
AddBicepTemplate(IDistributedApplicationBuilder, string, string) Section titled AddBicepTemplate(IDistributedApplicationBuilder, string, string) extension IResourceBuilder<AzureBicepResource>
Adds an Azure Bicep resource to the application model.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<AzureBicepResource> AddBicepTemplate(
this IDistributedApplicationBuilder builder,
string name,
string bicepFile)
{
// ...
}
}
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder.
name string The name of the resource. This name will be used as the deployment name.
bicepFile string The path to the bicep file on disk. This path is relative to the apphost's project directory.
IResourceBuilder<AzureBicepResource> An ApplicationModel.IResourceBuilder`1.
AddBicepTemplateString(IDistributedApplicationBuilder, string, string) Section titled AddBicepTemplateString(IDistributedApplicationBuilder, string, string) extension IResourceBuilder<AzureBicepResource>
Adds an Azure Bicep resource to the application model.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<AzureBicepResource> AddBicepTemplateString(
this IDistributedApplicationBuilder builder,
string name,
string bicepContent)
{
// ...
}
}
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder.
name string The name of the resource. This name will be used as the deployment name.
bicepContent string A string that represents a snippet of bicep.
IResourceBuilder<AzureBicepResource> An ApplicationModel.IResourceBuilder`1.
GetOutput(IResourceBuilder<AzureBicepResource>, string) Section titled GetOutput(IResourceBuilder<AzureBicepResource>, string) extension BicepOutputReference
Gets a reference to an output from a bicep template.
public static class AzureBicepResourceExtensions
{
public static BicepOutputReference GetOutput(
this IResourceBuilder<AzureBicepResource> builder,
string name)
{
// ...
}
}
builder IResourceBuilder<AzureBicepResource> The resource builder.
name string Name of the output.
BicepOutputReference A BicepOutputReference that represents the output.
GetSecretOutput(IResourceBuilder<AzureBicepResource>, string) Section titled GetSecretOutput(IResourceBuilder<AzureBicepResource>, string) extension BicepSecretOutputReference
Gets a reference to a secret output from a bicep template. This is an output that is written to a keyvault using the "keyVaultName" convention.
public static class AzureBicepResourceExtensions
{
public static BicepSecretOutputReference GetSecretOutput(
this IResourceBuilder<AzureBicepResource> builder,
string name)
{
// ...
}
}
builder IResourceBuilder<AzureBicepResource> The resource builder.
name string The name of the secret output.
WithEnvironment(IResourceBuilder<T>, string, BicepOutputReference) Section titled WithEnvironment(IResourceBuilder<T>, string, BicepOutputReference) extension IResourceBuilder<T>
Adds an environment variable to the resource with the value of the output from the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithEnvironment<T>(
this IResourceBuilder<T> builder,
string name,
BicepOutputReference bicepOutputReference)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the environment variable.
bicepOutputReference BicepOutputReference The reference to the bicep output.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithEnvironment(IResourceBuilder<T>, string, BicepSecretOutputReference) Section titled WithEnvironment(IResourceBuilder<T>, string, BicepSecretOutputReference) extension IResourceBuilder<T>
Adds an environment variable to the resource with the value of the secret output from the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithEnvironment<T>(
this IResourceBuilder<T> builder,
string name,
BicepSecretOutputReference bicepOutputReference)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the environment variable.
bicepOutputReference BicepSecretOutputReference The reference to the bicep output.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithEnvironment(IResourceBuilder<T>, string, IAzureKeyVaultSecretReference) Section titled WithEnvironment(IResourceBuilder<T>, string, IAzureKeyVaultSecretReference) extension IResourceBuilder<T>
Adds an environment variable to the resource with the value of the key vault secret.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithEnvironment<T>(
this IResourceBuilder<T> builder,
string name,
IAzureKeyVaultSecretReference secretReference)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the environment variable.
secretReference IAzureKeyVaultSecretReference The reference to the key vault secret.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithParameter(IResourceBuilder<T>, string) Section titled WithParameter(IResourceBuilder<T>, string) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithParameter(IResourceBuilder<T>, string, string) Section titled WithParameter(IResourceBuilder<T>, string, string) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
string value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value string The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithParameter(IResourceBuilder<T>, string, IEnumerable<string>) Section titled WithParameter(IResourceBuilder<T>, string, IEnumerable<string>) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
IEnumerable<string> value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value IEnumerable<string> The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithParameter(IResourceBuilder<T>, string, JsonNode) Section titled WithParameter(IResourceBuilder<T>, string, JsonNode) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
JsonNode value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value JsonNode The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
This method is not available in polyglot app hosts.
WithParameter(IResourceBuilder<T>, string, Func<object?>) Section titled WithParameter(IResourceBuilder<T>, string, Func<object?>) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
Func<object?> valueCallback)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
valueCallback Func<object?> The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
This method is not available in polyglot app hosts.
WithParameter(IResourceBuilder<T>, string, IResourceBuilder<ParameterResource>) Section titled WithParameter(IResourceBuilder<T>, string, IResourceBuilder<ParameterResource>) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
IResourceBuilder<ParameterResource> value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value IResourceBuilder<ParameterResource> The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithParameter(IResourceBuilder<T>, string, ParameterResource) Section titled WithParameter(IResourceBuilder<T>, string, ParameterResource) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
ParameterResource value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value ParameterResource The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
This overload is not available in polyglot app hosts. Use the AzureBicepResourceExtensions.WithParameter overload instead.
WithParameter(IResourceBuilder<T>, string, IResourceBuilder<IResourceWithConnectionString>) Section titled WithParameter(IResourceBuilder<T>, string, IResourceBuilder<IResourceWithConnectionString>) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
IResourceBuilder<IResourceWithConnectionString> value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value IResourceBuilder<IResourceWithConnectionString> The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithParameter(IResourceBuilder<T>, string, BicepOutputReference) Section titled WithParameter(IResourceBuilder<T>, string, BicepOutputReference) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
BicepOutputReference value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value BicepOutputReference The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithParameter(IResourceBuilder<T>, string, ReferenceExpression) Section titled WithParameter(IResourceBuilder<T>, string, ReferenceExpression) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
ReferenceExpression value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value ReferenceExpression The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.
WithParameter(IResourceBuilder<T>, string, EndpointReference) Section titled WithParameter(IResourceBuilder<T>, string, EndpointReference) extension IResourceBuilder<T>
Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions
{
public static IResourceBuilder<T> WithParameter<T>(
this IResourceBuilder<T> builder,
string name,
EndpointReference value)
{
// ...
}
}
builder IResourceBuilder<T> The resource builder.
name string The name of the input.
value EndpointReference The value of the parameter.
IResourceBuilder<T> An ApplicationModel.IResourceBuilder`1.