Class JDBCSecretCacheBuilderProvider
java.lang.Object
com.amazonaws.secretsmanager.util.JDBCSecretCacheBuilderProvider
A class for providing JDBC driver the secrets cache builder. Checks the config file and environment variables for overrides to the default region and applies those changes to the provided secret cache builder.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs the provider with the default configuration.JDBCSecretCacheBuilderProvider(Config config) Constructs the provider with the provided configuration. -
Method Summary
Modifier and TypeMethodDescriptionsoftware.amazon.awssdk.services.secretsmanager.SecretsManagerClientBuilderbuild()Provides the secrets cache builder. 1) If a PrivateLink DNS endpoint URL and region are given in the Config, then they are used to configure the endpoint. 2) The AWS_SECRET_JDBC_REGION environment variable is checked.
-
Constructor Details
-
JDBCSecretCacheBuilderProvider
public JDBCSecretCacheBuilderProvider()Constructs the provider with the default configuration. -
JDBCSecretCacheBuilderProvider
Constructs the provider with the provided configuration.- Parameters:
config- Config to use for provider
-
-
Method Details
-
build
public software.amazon.awssdk.services.secretsmanager.SecretsManagerClientBuilder build()Provides the secrets cache builder. 1) If a PrivateLink DNS endpoint URL and region are given in the Config, then they are used to configure the endpoint. 2) The AWS_SECRET_JDBC_REGION environment variable is checked. If set, it is used to configure the region. 3) The region variable file is checked in the provided Config and, if set, used to configure the region. 4) Finally, if none of these are not found, the default region provider chain is used.- Returns:
- the built secret cache.
-