Class SecretsManagerCredentialsProvider
- java.lang.Object
-
- com.amazonaws.athena.connector.integ.providers.SecretsManagerCredentialsProvider
-
public class SecretsManagerCredentialsProvider extends Object
Responsible for providing user credentials from SecretsManager.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<SecretsManagerCredentials>
getCredentials(TestConfig testConfig)
Gets the SecretManager credentials obtained using a secret name stored in the test-config.json file.
-
-
-
Method Detail
-
getCredentials
public static Optional<SecretsManagerCredentials> getCredentials(TestConfig testConfig) throws RuntimeException
Gets the SecretManager credentials obtained using a secret name stored in the test-config.json file.- Parameters:
testConfig
- Contains the test configurations from the test-config.json file.- Returns:
- Optional credentials object, or empty Optional if the secrets_manager_secret attribute is not in the configuration file or is empty.
- Throws:
RuntimeException
- Error encountered attempting to parse the json string returned from SecretsManager.
-
-