Class AzureAppConfigurationService
- Namespace
- FoundationaLLM.Common.Services.Azure
- Assembly
- FoundationaLLM.Common.dll
Provides access to and management of Azure App Configuration.
public class AzureAppConfigurationService : IAzureAppConfigurationService
- Inheritance
-
AzureAppConfigurationService
- Implements
- Inherited Members
- Extension Methods
Constructors
AzureAppConfigurationService(ConfigurationClient, ILogger<AzureAppConfigurationService>)
Provides access to and management of Azure App Configuration.
public AzureAppConfigurationService(ConfigurationClient configurationClient, ILogger<AzureAppConfigurationService> logger)
Parameters
configurationClient
ConfigurationClientThe Azure App Configuration ConfigurationClient.
logger
ILogger<AzureAppConfigurationService>The logger.
Methods
CheckAppConfigurationSettingExistsAsync(string)
Check if an individual Azure App Configuration key exists.
public Task<bool> CheckAppConfigurationSettingExistsAsync(string key)
Parameters
key
string
Returns
CheckAppConfigurationSettingsExistAsync()
Returns a map of configuration setting keys and whether they exist in Azure App Configuration.
public Task<Dictionary<string, bool>> CheckAppConfigurationSettingsExistAsync()
Returns
- Task<Dictionary<string, bool>>
DeleteAppConfigurationSettingAsync(string)
Deletes an Azure App Configuration setting and its associated Azure Key Vault secret.
public Task DeleteAppConfigurationSettingAsync(string key)
Parameters
key
stringThe App Configuration setting key.
Returns
GetConfigurationSettingAsync(string)
Gets the value of a configuration setting from Azure App Configuration.
public Task<string?> GetConfigurationSettingAsync(string key)
Parameters
key
stringThe App Configuration setting key.
Returns
GetConfigurationSettingsAsync(string)
Gets the values of configuration settings from Azure App Configuration.
public Task<List<(string Key, string? Value, string ContentType)>> GetConfigurationSettingsAsync(string keyFilter)
Parameters
keyFilter
stringThe key name filter used to select the settings keys for which values are retrieved.
Returns
GetFeatureFlagAsync(string)
Gets the value of a feature flag from Azure App Configuration.
public Task<bool> GetFeatureFlagAsync(string key)
Parameters
key
stringThe App Configuration feature flag key.
Returns
SetConfigurationSettingAsync(string, string, string)
Sets the value of a configuration setting in Azure App Configuration.
public Task SetConfigurationSettingAsync(string key, string value, string contentType)
Parameters
key
stringThe App Configuration setting key.
value
stringThe value to set.
contentType
stringThe content type of the value.
Returns
SetFeatureFlagAsync(string, bool)
Sets the value of a feature flag in Azure App Configuration.
public Task SetFeatureFlagAsync(string key, bool flagEnabled)
Parameters
key
stringThe App Configuration feature flag key.
flagEnabled
boolWhether to enable the feature flag.