AzureAppConfigurationExtensions.AddAzureAppConfiguration Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| AddAzureAppConfiguration(IServiceCollection) |
Adds Azure App Configuration services to the specified IServiceCollection. |
| AddAzureAppConfiguration(IConfigurationBuilder, Action<AzureAppConfigurationOptions>, Boolean) |
Adds key-value data from an Azure App Configuration store to a configuration builder using a fully configurable AzureAppConfigurationOptions callback for advanced scenarios. Use this overload when you need to: select keys by prefix, filter by labels, configure dynamic refresh, use feature flags, resolve Key Vault references, etc. |
| AddAzureAppConfiguration(IConfigurationBuilder, IEnumerable<String>, Boolean) |
Adds key-value data from a primary Azure App Configuration store and one or more replica stores to a configuration builder using connection strings. This is a simplified overload that loads all key-values with no label. For advanced scenarios such as selecting specific keys, filtering by labels, configuring refresh, using feature flags, or resolving Key Vault references, use the overload that accepts an Action<T> parameter with options.Connect(). |
| AddAzureAppConfiguration(IConfigurationBuilder, String, Boolean) |
Adds key-value data from an Azure App Configuration store to a configuration builder using its connection string. This is a simplified overload that loads all key-values with no label. For advanced scenarios such as selecting specific keys, filtering by labels, configuring refresh, using feature flags, or resolving Key Vault references, use the overload that accepts an Action<T> parameter with options.Connect(). |
| AddAzureAppConfiguration(IConfigurationBuilder, Uri, TokenCredential, Boolean) |
Adds key-value data from an Azure App Configuration store to a configuration builder using endpoint with AAD authentication. This is a simplified overload that loads all key-values with no label. For advanced scenarios such as selecting specific keys, filtering by labels, configuring refresh, using feature flags, or resolving Key Vault references, use the overload that accepts an Action<T> parameter with options.Connect(). |
AddAzureAppConfiguration(IServiceCollection)
Adds Azure App Configuration services to the specified IServiceCollection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAzureAppConfiguration(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAzureAppConfiguration : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAzureAppConfiguration (services As IServiceCollection) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to add services to.
Returns
The IServiceCollection so that additional calls can be chained.
Applies to
AddAzureAppConfiguration(IConfigurationBuilder, Action<AzureAppConfigurationOptions>, Boolean)
Adds key-value data from an Azure App Configuration store to a configuration builder using a fully configurable AzureAppConfigurationOptions callback for advanced scenarios. Use this overload when you need to: select keys by prefix, filter by labels, configure dynamic refresh, use feature flags, resolve Key Vault references, etc.
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddAzureAppConfiguration(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, Action<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureAppConfigurationOptions> action, bool optional = false);
static member AddAzureAppConfiguration : Microsoft.Extensions.Configuration.IConfigurationBuilder * Action<Microsoft.Extensions.Configuration.AzureAppConfiguration.AzureAppConfigurationOptions> * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddAzureAppConfiguration (configurationBuilder As IConfigurationBuilder, action As Action(Of AzureAppConfigurationOptions), Optional optional As Boolean = false) As IConfigurationBuilder
Parameters
- configurationBuilder
- IConfigurationBuilder
The configuration builder to add key-values to.
- action
- Action<AzureAppConfigurationOptions>
A callback used to configure Azure App Configuration options.
- optional
- Boolean
Determines the behavior of the App Configuration provider when an exception occurs while loading data from server. If false, the exception is thrown. If true, the exception is suppressed and no settings are populated from Azure App Configuration. <exception cref="T:System.ArgumentException"></exception> will always be thrown when the caller gives an invalid input configuration (connection strings, endpoints, key/label filters...etc).
Returns
The provided configuration builder.
Applies to
AddAzureAppConfiguration(IConfigurationBuilder, IEnumerable<String>, Boolean)
Adds key-value data from a primary Azure App Configuration store and one or more replica stores to a configuration builder using connection strings. This is a simplified overload that loads all key-values with no label. For advanced scenarios such as selecting specific keys, filtering by labels, configuring refresh, using feature flags, or resolving Key Vault references, use the overload that accepts an Action<T> parameter with options.Connect().
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddAzureAppConfiguration(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, System.Collections.Generic.IEnumerable<string> connectionStrings, bool optional = false);
static member AddAzureAppConfiguration : Microsoft.Extensions.Configuration.IConfigurationBuilder * seq<string> * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddAzureAppConfiguration (configurationBuilder As IConfigurationBuilder, connectionStrings As IEnumerable(Of String), Optional optional As Boolean = false) As IConfigurationBuilder
Parameters
- configurationBuilder
- IConfigurationBuilder
The configuration builder to add key-values to.
- connectionStrings
- IEnumerable<String>
The list of connection strings used to connect to the configuration store and its replicas.
- optional
- Boolean
Determines the behavior of the App Configuration provider when an exception occurs while loading data from server. If false, the exception is thrown. If true, the exception is suppressed and no settings are populated from Azure App Configuration. <exception cref="T:System.ArgumentException"></exception> will always be thrown when the caller gives an invalid input configuration (connection strings, endpoints, key/label filters...etc).
Returns
The provided configuration builder.
Applies to
AddAzureAppConfiguration(IConfigurationBuilder, String, Boolean)
Adds key-value data from an Azure App Configuration store to a configuration builder using its connection string. This is a simplified overload that loads all key-values with no label. For advanced scenarios such as selecting specific keys, filtering by labels, configuring refresh, using feature flags, or resolving Key Vault references, use the overload that accepts an Action<T> parameter with options.Connect().
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddAzureAppConfiguration(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, string connectionString, bool optional = false);
static member AddAzureAppConfiguration : Microsoft.Extensions.Configuration.IConfigurationBuilder * string * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddAzureAppConfiguration (configurationBuilder As IConfigurationBuilder, connectionString As String, Optional optional As Boolean = false) As IConfigurationBuilder
Parameters
- configurationBuilder
- IConfigurationBuilder
The configuration builder to add key-values to.
- connectionString
- String
The connection string used to connect to the configuration store.
- optional
- Boolean
Determines the behavior of the App Configuration provider when an exception occurs while loading data from server. If false, the exception is thrown. If true, the exception is suppressed and no settings are populated from Azure App Configuration. <exception cref="T:System.ArgumentException"></exception> will always be thrown when the caller gives an invalid input configuration (connection strings, endpoints, key/label filters...etc).
Returns
The provided configuration builder.
Applies to
AddAzureAppConfiguration(IConfigurationBuilder, Uri, TokenCredential, Boolean)
Adds key-value data from an Azure App Configuration store to a configuration builder using endpoint with AAD authentication. This is a simplified overload that loads all key-values with no label. For advanced scenarios such as selecting specific keys, filtering by labels, configuring refresh, using feature flags, or resolving Key Vault references, use the overload that accepts an Action<T> parameter with options.Connect().
public static Microsoft.Extensions.Configuration.IConfigurationBuilder AddAzureAppConfiguration(this Microsoft.Extensions.Configuration.IConfigurationBuilder configurationBuilder, Uri endpoint, Azure.Core.TokenCredential credential, bool optional = false);
static member AddAzureAppConfiguration : Microsoft.Extensions.Configuration.IConfigurationBuilder * Uri * Azure.Core.TokenCredential * bool -> Microsoft.Extensions.Configuration.IConfigurationBuilder
<Extension()>
Public Function AddAzureAppConfiguration (configurationBuilder As IConfigurationBuilder, endpoint As Uri, credential As TokenCredential, Optional optional As Boolean = false) As IConfigurationBuilder
Parameters
- configurationBuilder
- IConfigurationBuilder
The configuration builder to add key-values to.
- endpoint
- Uri
The endpoint used to connect to the configuration store.
- credential
- TokenCredential
The token credential used to authenticate requests to the configuration store.
- optional
- Boolean
Determines the behavior of the App Configuration provider when an exception occurs while loading data from server. If false, the exception is thrown. If true, the exception is suppressed and no settings are populated from Azure App Configuration. <exception cref="T:System.ArgumentException"></exception> will always be thrown when the caller gives an invalid input configuration (connection strings, endpoints, key/label filters...etc).
Returns
The provided configuration builder.