Class DatabaseConnectionConfigBuilder
- java.lang.Object
-
- com.amazonaws.athena.connectors.jdbc.connection.DatabaseConnectionConfigBuilder
-
public class DatabaseConnectionConfigBuilder extends Object
Builds connection configurations for all catalogs and databases provided in environment properties.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONNECTION_STRING_PROPERTY_SUFFIX
static String
DEFAULT_CONNECTION_STRING_PROPERTY
static Pattern
SECRET_PATTERN
-
Constructor Summary
Constructors Constructor Description DatabaseConnectionConfigBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DatabaseConnectionConfig>
build()
Builds Database instance configurations from input properties.static List<DatabaseConnectionConfig>
buildFromSystemEnv(String databaseEngine, Map<String,String> configOptions)
Utility to build database instance connection configurations from Environment variables.DatabaseConnectionConfigBuilder
engine(String engine)
DatabaseConnectionConfigBuilder
properties(Map<String,String> properties)
Builder input all system properties.
-
-
-
Field Detail
-
CONNECTION_STRING_PROPERTY_SUFFIX
public static final String CONNECTION_STRING_PROPERTY_SUFFIX
- See Also:
- Constant Field Values
-
DEFAULT_CONNECTION_STRING_PROPERTY
public static final String DEFAULT_CONNECTION_STRING_PROPERTY
- See Also:
- Constant Field Values
-
SECRET_PATTERN
public static final Pattern SECRET_PATTERN
-
-
Method Detail
-
buildFromSystemEnv
public static List<DatabaseConnectionConfig> buildFromSystemEnv(String databaseEngine, Map<String,String> configOptions)
Utility to build database instance connection configurations from Environment variables.- Parameters:
databaseEngine
- canonical name of engine (e.g. "postgres", "redshift", "mysql")- Returns:
- List of database connection configurations. See
DatabaseConnectionConfig
.
-
engine
public DatabaseConnectionConfigBuilder engine(String engine)
-
properties
public DatabaseConnectionConfigBuilder properties(Map<String,String> properties)
Builder input all system properties.- Parameters:
properties
- system environment properties.- Returns:
- database connection configuration builder. See
DatabaseConnectionConfigBuilder
.
-
build
public List<DatabaseConnectionConfig> build()
Builds Database instance configurations from input properties.- Returns:
- List of database connection configurations. See
DatabaseConnectionConfig
.
-
-