Table of Contents

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

secretClient SecretClient

The Key Vault SecretClient.

Properties

KeyVaultUri

Gets the URI of the Key Vault.

public string KeyVaultUri { get; }

Property Value

string

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

secretNames IEnumerable<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

secretName string

The secret name to check.

Returns

Task<bool>

GetSecretValue(string)

Gets the value of a secret from Key Vault.

public string? GetSecretValue(string secretName)

Parameters

secretName string

The name of the secret whose value you wish to retrieve.

Returns

string

GetSecretValueAsync(string)

Gets the value of a secret from Key Vault.

public Task<string?> GetSecretValueAsync(string secretName)

Parameters

secretName string

The name of the secret whose value you wish to retrieve.

Returns

Task<string>

RemoveSecretAsync(string)

Removes the specified secret from the Key Vault.

public Task RemoveSecretAsync(string secretName)

Parameters

secretName string

The name of the secret to be removed.

Returns

Task

SetSecretValueAsync(string, string)

Sets the value of a secret in Key Vault.

public Task SetSecretValueAsync(string secretName, string secretValue)

Parameters

secretName string

The name of the secret whose value you wish to set.

secretValue string

The secret value.

Returns

Task