Class DefaultSecretKeyVaultClient
java.lang.Object
io.micronaut.azure.secretmanager.client.DefaultSecretKeyVaultClient
- All Implemented Interfaces:
SecretKeyVaultClient
@Singleton
@Requires(classes=com.azure.security.keyvault.secrets.SecretClient.class)
public class DefaultSecretKeyVaultClient
extends Object
implements SecretKeyVaultClient
Default implementation of
SecretKeyVaultClient
.- Author:
- Nemanja Mikic
-
Constructor Summary
ConstructorDescriptionDefaultSecretKeyVaultClient
(com.azure.security.keyvault.secrets.SecretClient client) -
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.
-
Constructor Details
-
DefaultSecretKeyVaultClient
public DefaultSecretKeyVaultClient(com.azure.security.keyvault.secrets.SecretClient client)
-
-
Method Details
-
getSecret
Description copied from interface:SecretKeyVaultClient
Fetches a secret from the key vault using name of the secret.- Specified by:
getSecret
in interfaceSecretKeyVaultClient
- Parameters:
secretName
- - name of the secret- Returns:
- String value of the secret or empty
-
listSecrets
Description copied from interface:SecretKeyVaultClient
Fetches all secrets from the key vault.- Specified by:
listSecrets
in interfaceSecretKeyVaultClient
- Returns:
- List of all secrets from key vault
-