AzureBicepResourceExtensions Methods
ClassMethods18 members
Extension methods for adding Azure Bicep resources to the application model.
AddBicepTemplate(IDistributedApplicationBuilder, string, string)Section titled AddBicepTemplate(IDistributedApplicationBuilder, string, string)extensionIResourceBuilder<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) { // ... }}Parameters
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder.namestringThe name of the resource. This name will be used as the deployment name.bicepFilestringThe path to the bicep file on disk. This path is relative to the apphost's project directory.Returns
IResourceBuilder<AzureBicepResource>An ApplicationModel.IResourceBuilder`1.AddBicepTemplateString(IDistributedApplicationBuilder, string, string)Section titled AddBicepTemplateString(IDistributedApplicationBuilder, string, string)extensionIResourceBuilder<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) { // ... }}Parameters
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder.namestringThe name of the resource. This name will be used as the deployment name.bicepContentstringA string that represents a snippet of bicep.Returns
IResourceBuilder<AzureBicepResource>An ApplicationModel.IResourceBuilder`1.GetOutput(IResourceBuilder<AzureBicepResource>, string)Section titled GetOutput(IResourceBuilder<AzureBicepResource>, string)extensionBicepOutputReference Gets a reference to an output from a bicep template.
public static class AzureBicepResourceExtensions{ public static BicepOutputReference GetOutput( this IResourceBuilder<AzureBicepResource> builder, string name) { // ... }}Parameters
builderIResourceBuilder<AzureBicepResource>The resource builder.namestringName of the output.Returns
BicepOutputReferenceA BicepOutputReference that represents the output.GetSecretOutput(IResourceBuilder<AzureBicepResource>, string)Section titled GetSecretOutput(IResourceBuilder<AzureBicepResource>, string)extensionBicepSecretOutputReference 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) { // ... }}Parameters
builderIResourceBuilder<AzureBicepResource>The resource builder.namestringThe name of the secret output.Returns
BicepSecretOutputReferenceA BicepSecretOutputReference that represents the output.WithEnvironment(IResourceBuilder<T>, string, BicepOutputReference)Section titled WithEnvironment(IResourceBuilder<T>, string, BicepOutputReference)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the environment variable.bicepOutputReferenceBicepOutputReferenceThe reference to the bicep output.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithEnvironment(IResourceBuilder<T>, string, BicepSecretOutputReference)Section titled WithEnvironment(IResourceBuilder<T>, string, BicepSecretOutputReference)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the environment variable.bicepOutputReferenceBicepSecretOutputReferenceThe reference to the bicep output.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithEnvironment(IResourceBuilder<T>, string, IAzureKeyVaultSecretReference)Section titled WithEnvironment(IResourceBuilder<T>, string, IAzureKeyVaultSecretReference)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the environment variable.secretReferenceIAzureKeyVaultSecretReferenceThe reference to the key vault secret.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithParameter(IResourceBuilder<T>, string)Section titled WithParameter(IResourceBuilder<T>, string)extensionIResourceBuilder<T> Adds a parameter to the bicep template.
public static class AzureBicepResourceExtensions{ public static IResourceBuilder<T> WithParameter<T>( this IResourceBuilder<T> builder, string name) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithParameter(IResourceBuilder<T>, string, string)Section titled WithParameter(IResourceBuilder<T>, string, string)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valuestringThe value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithParameter(IResourceBuilder<T>, string, IEnumerable<string>)Section titled WithParameter(IResourceBuilder<T>, string, IEnumerable<string>)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueIEnumerable<string>The value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithParameter(IResourceBuilder<T>, string, JsonNode)Section titled WithParameter(IResourceBuilder<T>, string, JsonNode)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueJsonNodeThe value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.Remarks
This method is not available in polyglot app hosts.
WithParameter(IResourceBuilder<T>, string, Func<object?>)Section titled WithParameter(IResourceBuilder<T>, string, Func<object?>)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueCallbackFunc<object?>The value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.Remarks
This method is not available in polyglot app hosts.
WithParameter(IResourceBuilder<T>, string, IResourceBuilder<ParameterResource>)Section titled WithParameter(IResourceBuilder<T>, string, IResourceBuilder<ParameterResource>)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueIResourceBuilder<ParameterResource>The value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithParameter(IResourceBuilder<T>, string, ParameterResource)Section titled WithParameter(IResourceBuilder<T>, string, ParameterResource)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueParameterResourceThe value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.Remarks
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>)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueIResourceBuilder<IResourceWithConnectionString>The value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithParameter(IResourceBuilder<T>, string, BicepOutputReference)Section titled WithParameter(IResourceBuilder<T>, string, BicepOutputReference)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueBicepOutputReferenceThe value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithParameter(IResourceBuilder<T>, string, ReferenceExpression)Section titled WithParameter(IResourceBuilder<T>, string, ReferenceExpression)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueReferenceExpressionThe value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.WithParameter(IResourceBuilder<T>, string, EndpointReference)Section titled WithParameter(IResourceBuilder<T>, string, EndpointReference)extensionIResourceBuilder<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) { // ... }}Parameters
builderIResourceBuilder<T>The resource builder.namestringThe name of the input.valueEndpointReferenceThe value of the parameter.Returns
IResourceBuilder<T>An ApplicationModel.IResourceBuilder`1.