Class JDBCSecretCacheBuilderProvider

java.lang.Object
com.amazonaws.secretsmanager.util.JDBCSecretCacheBuilderProvider

public class JDBCSecretCacheBuilderProvider extends Object

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

    Constructors
    Constructor
    Description
    Constructs the provider with the default configuration.
    Constructs the provider with the provided configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    software.amazon.awssdk.services.secretsmanager.SecretsManagerClientBuilder
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JDBCSecretCacheBuilderProvider

      public JDBCSecretCacheBuilderProvider()
      Constructs the provider with the default configuration.
    • JDBCSecretCacheBuilderProvider

      public JDBCSecretCacheBuilderProvider(Config config)
      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.