public class TimestreamDataSource extends Object implements DataSource, ConnectionPoolDataSource, ConnectionEventListener
| Constructor and Description |
|---|
TimestreamDataSource() |
| Modifier and Type | Method and Description |
|---|---|
void |
connectionClosed(ConnectionEvent event) |
void |
connectionErrorOccurred(ConnectionEvent event) |
protected TimestreamConnection |
createTimestreamConnection(Properties info)
Creates a TimestreamConnection object.
|
String |
getAadAppId()
Gets the unique id of the registered application on Azure AD.
|
String |
getAadClientSecret()
Gets the client secret associated with the registered application on Azure AD used to authorize
fetching tokens.
|
String |
getAadTenantId()
Gets Azure Active Directory tenant ID.
|
String |
getAccessKeyId()
Getter for the AWS access key ID.
|
String |
getAwsRoleArn()
Gets the Amazon Resource Name (ARN) of the role that the caller is assuming.
|
Connection |
getConnection() |
Connection |
getConnection(String accessKey,
String secretKey) |
String |
getCredentialsFilePath()
Gets the path to a properties file containing AWS security credentials `accessKey`
and `secretKey`.
|
String |
getCredentialsProviderClass()
Gets credentials provider class.
|
String |
getEndpoint()
Getter for the Timestream service endpoint.
|
String |
getIdpArn()
Gets the Amazon Resource Name (ARN) of the SAML provider in IAM that describes the IdP.
|
String |
getIdpHost()
Gets the hostname of the specified IdP.
|
String |
getIdpName()
Gets the Identity Provider (IdP) name to use for SAML-based authentication.
|
String |
getIdpPassword()
Gets the password for the specified IdP account.
|
String |
getIdpUserName()
Gets the user name for the specified IdP account.
|
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
int |
getMaxConnections()
Gets the maximum number of allowed concurrently opened HTTP connections to the Timestream
service.
|
int |
getMaxRetryCount()
Gets the maximum number of retry attempts for retryable errors with 5XX error codes in the
client.
|
String |
getOktaAppId()
Gets the unique Okta-provided ID associated with the Timestream application.
|
Logger |
getParentLogger() |
PooledConnection |
getPooledConnection() |
PooledConnection |
getPooledConnection(String accessKey,
String secretKey) |
String |
getRegion()
Getter for the database's region.
|
int |
getRequestTimeout()
Gets the time in milliseconds the client will wait for a query request before timing out.
|
String |
getSecretAccessKey()
Getter for the AWS secret access key.
|
String |
getSessionToken()
Getter for the temporary AWS session token.
|
int |
getSocketTimeout()
Gets the time in milliseconds the client will wait for data to be transferred over an open
connection before timing out.
|
boolean |
isEnableMetaDataPreparedStatement()
Getter for the enableMetaDataPreparedStatement.
|
boolean |
isWrapperFor(Class<?> iface) |
void |
setAadAppId(String aadAppId)
Sets the unique id of the registered application on Azure AD.
|
void |
setAadClientSecret(String aadClientSecret)
Sets the client secret associated with the registered application on Azure AD used to authorize
fetching tokens.
|
void |
setAadTenantId(String aadTenantId)
Sets Azure Active Directory tenant ID.
|
void |
setAccessKeyId(String accessKeyId)
Setter for the AWS access key ID.
|
void |
setAwsRoleArn(String awsRoleArn)
Sets the Amazon Resource Name (ARN) of the role that the caller is assuming.
|
void |
setCredentialsFilePath(String credentialsFilePath)
Sets the path to a properties file containing AWS security credentials `accessKey`
and `secretKey`.
|
void |
setCredentialsProviderClass(String credentialsProviderClass)
Sets credentials provider class.
|
void |
setEnableMetaDataPreparedStatement(boolean enableMetaDataPreparedStatement)
Setter for tracking if the driver can return metadata for PreparedStatements.
|
void |
setEndpoint(String endpoint)
Setter for the Timestream service endpoint.
|
void |
setIdpArn(String idpArn)
Sets the Amazon Resource Name (ARN) of the SAML provider in IAM that describes the IdP.
|
void |
setIdpHost(String idpHost)
Sets the hostname of the specified IdP.
|
void |
setIdpName(String idpName)
Sets the Identity Provider (IdP) name to use for SAML-based authentication.
|
void |
setIdpPassword(String idpPassword)
Sets the password for the specified IdP account.
|
void |
setIdpUserName(String idpUserName)
Sets the user name for the specified IdP account.
|
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setMaxConnections(int maxConnections)
Sets the maximum number of allowed concurrently opened HTTP connections to the Timestream
service.
|
void |
setMaxRetryCount(int maxRetryCountClient)
Sets the maximum retry attempts for retryable errors on the client.
|
void |
setOktaAppId(String oktaAppId)
Sets the unique Okta-provided ID associated with the Timestream application.
|
void |
setRegion(String region)
Setter for the AWS database region.
|
void |
setRequestTimeout(int requestTimeout)
Sets the time in milliseconds the client will wait for a query request before timing out.
|
void |
setSecretAccessKey(String secretAccessKey)
Setter for the AWS secret access key.
|
void |
setSessionToken(String sessionToken)
Setter for the AWS session token.
|
void |
setSocketTimeout(int socketTimeout)
Sets the time in milliseconds the client will wait for data to be transferred over an open
connection before timing out.
|
<T> T |
unwrap(Class<T> iface) |
public Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String accessKey, String secretKey) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic PooledConnection getPooledConnection() throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceSQLExceptionpublic PooledConnection getPooledConnection(String accessKey, String secretKey) throws SQLException
getPooledConnection in interface ConnectionPoolDataSourceSQLExceptionpublic PrintWriter getLogWriter()
getLogWriter in interface CommonDataSourcepublic void setLogWriter(PrintWriter out)
setLogWriter in interface CommonDataSourcepublic int getLoginTimeout()
getLoginTimeout in interface CommonDataSourcepublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger()
getParentLogger in interface CommonDataSourcepublic boolean isWrapperFor(Class<?> iface)
isWrapperFor in interface Wrapperpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionpublic String getAccessKeyId()
public void setAccessKeyId(String accessKeyId)
accessKeyId - The AWS access key ID.public String getSecretAccessKey()
public void setSecretAccessKey(String secretAccessKey)
secretAccessKey - The AWS secret access key.public String getSessionToken()
public void setSessionToken(String sessionToken)
sessionToken - The temporary session token required to access a database with multi-factor
authentication (MFA) enabled.public String getRegion()
public void setRegion(String region)
region - The database's region.public String getEndpoint()
public void setEndpoint(String endpoint)
endpoint - The service endpoint.public boolean isEnableMetaDataPreparedStatement()
public void setEnableMetaDataPreparedStatement(boolean enableMetaDataPreparedStatement)
enableMetaDataPreparedStatement - A flag that record enableMetaDataPreparedStatement.public String getCredentialsProviderClass()
public void setCredentialsProviderClass(String credentialsProviderClass)
credentialsProviderClass - the credentials provider classpublic String getCredentialsFilePath()
public void setCredentialsFilePath(String credentialsFilePath)
credentialsFilePath - the credentials file pathpublic String getIdpName()
public void setIdpName(String idpName)
idpName - the Identity Provider (IdP) name to use for SAML-based authentication. One of
`Okta` or `AzureAD`.public String getIdpHost()
public void setIdpHost(String idpHost)
idpHost - the IdP hostname.public String getIdpUserName()
public void setIdpUserName(String idpUserName)
idpUserName - he user name for the specified IdP account.public String getIdpPassword()
public void setIdpPassword(String idpPassword)
idpPassword - the password for the specified IdP account.public String getOktaAppId()
public void setOktaAppId(String oktaAppId)
oktaAppId - the unique Okta-provided ID associated with the Timestream application.public String getAwsRoleArn()
public void setAwsRoleArn(String awsRoleArn)
awsRoleArn - the Amazon Resource Name (ARN) of the role that the caller is assuming.public String getIdpArn()
public void setIdpArn(String idpArn)
idpArn - the Amazon Resource Name (ARN) of the SAML provider in IAM that describes the
IdP.public String getAadAppId()
public void setAadAppId(String aadAppId)
aadAppId - the unique id of the registered application on Azure AD.public String getAadClientSecret()
public void setAadClientSecret(String aadClientSecret)
aadClientSecret - the client secret associated with the registered application on Azure AD
used to authorize fetching tokens.public String getAadTenantId()
public void setAadTenantId(String aadTenantId)
aadTenantId - the Azure Active Directory tenant ID.public int getRequestTimeout()
public void setRequestTimeout(int requestTimeout)
requestTimeout - the request timeout value in milliseconds.ClientConfiguration.setRequestTimeout(int)public int getSocketTimeout()
ClientConfiguration.getSocketTimeout()public void setSocketTimeout(int socketTimeout)
throws SQLException
socketTimeout - The socket timeout value in milliseconds.SQLException - if the timeout value is negative.ClientConfiguration.setSocketTimeout(int)public int getMaxConnections()
ClientConfiguration.getMaxConnections()public void setMaxConnections(int maxConnections)
throws SQLException
maxConnections - The maximum number of allowed opened HTTP connections.SQLException - if the value is negative.ClientConfiguration.setMaxConnections(int)public int getMaxRetryCount()
ClientConfiguration.getMaxErrorRetry()public void setMaxRetryCount(int maxRetryCountClient)
throws SQLException
maxRetryCountClient - The maximum number of retry attempts for retryable errors.SQLException - if the value is negative.ClientConfiguration.setMaxErrorRetry(int)public void connectionClosed(ConnectionEvent event)
connectionClosed in interface ConnectionEventListenerpublic void connectionErrorOccurred(ConnectionEvent event)
connectionErrorOccurred in interface ConnectionEventListenerprotected TimestreamConnection createTimestreamConnection(Properties info) throws SQLException
info - Properties instance containing credential information.SQLException - if connection cannot getClientInfo from the connection.Copyright © 2020. All rights reserved.