Interface SecretKeyVaultClient
- All Known Implementing Classes:
DefaultSecretKeyVaultClient
public interface SecretKeyVaultClient
This interface is intended to abstract interactions with
SecretClient
.
The abstraction is needed for easier testing because mentioned class is defined as final.- Author:
- Nemanja Mikic
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.security.keyvault.secrets.models.KeyVaultSecret
Fetches a secret from the key vault using name of the secret.List<com.azure.security.keyvault.secrets.models.KeyVaultSecret>
Fetches all secrets from the key vault.
-
Method Details
-
getSecret
Fetches a secret from the key vault using name of the secret.- Parameters:
secretName
- - name of the secret- Returns:
- String value of the secret or empty
-
listSecrets
List<com.azure.security.keyvault.secrets.models.KeyVaultSecret> listSecrets()Fetches all secrets from the key vault.- Returns:
- List of all secrets from key vault
-