Class AzureKeyVaultService
- Namespace
 - FoundationaLLM.Common.Services.Azure
 
- Assembly
 - FoundationaLLM.Common.dll
 
Provides access to and management of Azure Key Vault.
public class AzureKeyVaultService : IAzureKeyVaultService
  - Inheritance
 - 
      
      AzureKeyVaultService
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
AzureKeyVaultService(SecretClient)
Provides access to and management of Azure Key Vault.
public AzureKeyVaultService(SecretClient secretClient)
  Parameters
secretClientSecretClientThe Key Vault SecretClient.
Properties
KeyVaultUri
Gets the URI of the Key Vault.
public string KeyVaultUri { get; }
  Property Value
Methods
CheckKeyVaultSecretsExistAsync(IEnumerable<string?>)
Returns a map of secret names and whether they exist in Key Vault.
public Task<Dictionary<string, bool>> CheckKeyVaultSecretsExistAsync(IEnumerable<string?> secretNames)
  Parameters
secretNamesIEnumerable<string>The list of secret names to check.
Returns
- Task<Dictionary<string, bool>>
 
CheckSecretExistsAsync(string)
Returns whether a secret exists in Key Vault.
public Task<bool> CheckSecretExistsAsync(string secretName)
  Parameters
secretNamestringThe secret name to check.
Returns
GetSecretValue(string)
Gets the value of a secret from Key Vault.
public string? GetSecretValue(string secretName)
  Parameters
secretNamestringThe name of the secret whose value you wish to retrieve.
Returns
GetSecretValueAsync(string)
Gets the value of a secret from Key Vault.
public Task<string?> GetSecretValueAsync(string secretName)
  Parameters
secretNamestringThe name of the secret whose value you wish to retrieve.
Returns
RemoveSecretAsync(string)
Removes the specified secret from the Key Vault.
public Task RemoveSecretAsync(string secretName)
  Parameters
secretNamestringThe name of the secret to be removed.
Returns
SetSecretValueAsync(string, string)
Sets the value of a secret in Key Vault.
public Task SetSecretValueAsync(string secretName, string secretValue)
  Parameters
secretNamestringThe name of the secret whose value you wish to set.
secretValuestringThe secret value.