namespace Core.Blueprint.KeyVault { /// /// Interface for managing secrets in Azure Key Vault. /// public interface IKeyVaultProvider { /// /// Creates a new secret in Azure Key Vault. /// /// The request containing the name and value of the secret. /// The cancellation token to cancel the operation. /// A containing the details of the created secret. ValueTask CreateSecretAsync(KeyVaultRequest keyVaultRequest, CancellationToken cancellationToken); /// /// Deletes a secret from Azure Key Vault if it exists. /// /// The name of the secret to delete. /// The cancellation token to cancel the operation. /// /// A containing a status message and a boolean indicating whether the secret was successfully deleted. /// ValueTask> DeleteSecretAsync(string secretName, CancellationToken cancellationToken); /// /// Retrieves a secret from Azure Key Vault. /// /// The name of the secret to retrieve. /// The cancellation token to cancel the operation. /// /// A containing the with secret details /// and an optional error message if the secret was not found. /// ValueTask> GetSecretAsync(string secretName, CancellationToken cancellationToken); /// /// Updates an existing secret in Azure Key Vault. If the secret does not exist, an error is returned. /// /// The updated secret information. /// The cancellation token to cancel the operation. /// /// A containing the updated and an optional error message if the secret was not found. /// ValueTask> UpdateSecretAsync(KeyVaultRequest newSecret, CancellationToken cancellationToken); } }