Class Athena2Configuration
java.lang.Object
org.apache.camel.component.aws2.athena.Athena2Configuration
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
software.amazon.awssdk.services.athena.AthenaClient
long
getDelay()
software.amazon.awssdk.services.athena.model.EncryptionOption
long
int
software.amazon.awssdk.core.Protocol
getRetry()
long
boolean
boolean
boolean
boolean
void
setAccessKey
(String accessKey) Amazon AWS Access Key.void
setAmazonAthenaClient
(software.amazon.awssdk.services.athena.AthenaClient amazonAthenaClient) The AmazonAthena instance to use as the client.void
setClientRequestToken
(String clientRequestToken) A unique string to ensure issues queries are idempotent.void
setDatabase
(String database) The Athena database to use.void
setDelay
(long delay) Milliseconds before the next poll for query execution status.void
setEncryptionOption
(software.amazon.awssdk.services.athena.model.EncryptionOption encryptionOption) The encryption type to use when storing query results in S3.void
setIncludeTrace
(boolean includeTrace) Include useful trace information at the beginning of queries as an SQL comment (prefixed with "--").void
setInitialDelay
(long initialDelay) Milliseconds before the first poll for query execution status.void
For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID.void
setMaxAttempts
(int maxAttempts) Maximum number of times to attempt a query.void
setMaxResults
(Integer maxResults) Max number of results to return for the given operation (if supported by the Athena API endpoint).void
setNextToken
(String nextToken) Pagination token to use in the case where the response from the previous request was truncated.void
setOperation
(Athena2Operations operation) The Athena API function to call.void
setOutputLocation
(String outputLocation) The location in Amazon S3 where query results are stored, such ass3://path/to/query/bucket/
.void
setOutputType
(Athena2OutputType outputType) How query results should be returned.void
setProfileCredentialsName
(String profileCredentialsName) If using a profile credentials provider this parameter will set the profile namevoid
setProxyHost
(String proxyHost) To define a proxy host when instantiating the Athena client.void
setProxyPort
(Integer proxyPort) To define a proxy port when instantiating the Athena client.void
setProxyProtocol
(software.amazon.awssdk.core.Protocol proxyProtocol) To define a proxy protocol when instantiating the Athena client.void
setQueryExecutionId
(String queryExecutionId) The unique ID identifying the query execution.void
setQueryString
(String queryString) The SQL query to run.void
The region in which the Athena client needs to work.void
setResetWaitTimeoutOnRetry
(boolean resetWaitTimeoutOnRetry) Reset the waitTimeout countdown in the event of a query retry.void
Optional comma separated list of error types to retry the query for.void
setSecretKey
(String secretKey) Amazon AWS Secret Key.void
setSessionToken
(String sessionToken) Amazon AWS Session Token used when the user needs to assume an IAM rolevoid
setUseDefaultCredentialsProvider
(Boolean useDefaultCredentialsProvider) Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in.void
setUseProfileCredentialsProvider
(boolean useProfileCredentialsProvider) Set whether the Athena client should expect to load credentials through a profile credentials provider.void
setUseSessionCredentials
(boolean useSessionCredentials) Set whether the Athena client should expect to use Session Credentials.void
setWaitTimeout
(long waitTimeout) Optional max wait time in millis to wait for a successful query completion.void
setWorkGroup
(String workGroup) The workgroup to use for running the query.
-
Constructor Details
-
Athena2Configuration
public Athena2Configuration()
-
-
Method Details
-
getAccessKey
-
setAccessKey
Amazon AWS Access Key. -
getSecretKey
-
setSecretKey
Amazon AWS Secret Key. -
getSessionToken
-
setSessionToken
Amazon AWS Session Token used when the user needs to assume an IAM role -
getAmazonAthenaClient
public software.amazon.awssdk.services.athena.AthenaClient getAmazonAthenaClient() -
setAmazonAthenaClient
public void setAmazonAthenaClient(software.amazon.awssdk.services.athena.AthenaClient amazonAthenaClient) The AmazonAthena instance to use as the client. -
getProxyProtocol
public software.amazon.awssdk.core.Protocol getProxyProtocol() -
setProxyProtocol
public void setProxyProtocol(software.amazon.awssdk.core.Protocol proxyProtocol) To define a proxy protocol when instantiating the Athena client. -
getProxyHost
-
setProxyHost
To define a proxy host when instantiating the Athena client. -
getProxyPort
-
setProxyPort
To define a proxy port when instantiating the Athena client. -
getRegion
-
setRegion
The region in which the Athena client needs to work. When using this parameter, the configuration will expect the lowercase name of the region (for example, ap-east-1). You'll need to use the name Region.EU_WEST_1.id(). -
getOutputLocation
-
setOutputLocation
The location in Amazon S3 where query results are stored, such ass3://path/to/query/bucket/
. Ensure this value ends with a forward slash ('/'). -
getOutputType
-
setOutputType
How query results should be returned. One ofStreamList
(default - return aGetQueryResultsIterable
that can page through all results),SelectList
(returns at most 1,000 rows at a time, plus a NextToken value as a header than can be used for manual pagination of results),S3Pointer
(return an S3 path pointing to the results). -
getOperation
-
setOperation
The Athena API function to call. -
getDatabase
-
setDatabase
The Athena database to use. -
getQueryExecutionId
-
setQueryExecutionId
The unique ID identifying the query execution. -
getWorkGroup
-
setWorkGroup
The workgroup to use for running the query. -
getMaxResults
-
setMaxResults
Max number of results to return for the given operation (if supported by the Athena API endpoint). If not set, will use the Athena API default for the given operation. -
getNextToken
-
setNextToken
Pagination token to use in the case where the response from the previous request was truncated. -
getClientRequestToken
-
setClientRequestToken
A unique string to ensure issues queries are idempotent. It is unlikely you will need to set this. -
getEncryptionOption
public software.amazon.awssdk.services.athena.model.EncryptionOption getEncryptionOption() -
setEncryptionOption
public void setEncryptionOption(software.amazon.awssdk.services.athena.model.EncryptionOption encryptionOption) The encryption type to use when storing query results in S3. One ofSSE_S3
,SSE_KMS
, orCSE_KMS
. -
getKmsKey
-
setKmsKey
For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID. -
getQueryString
-
setQueryString
The SQL query to run. Except for simple queries, prefer setting this as thebody
of the Exchange or as a header usingAthena2Constants.QUERY_STRING
to avoid having to deal with URL encoding issues. -
getInitialDelay
public long getInitialDelay() -
setInitialDelay
public void setInitialDelay(long initialDelay) Milliseconds before the first poll for query execution status. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. -
getDelay
public long getDelay() -
setDelay
public void setDelay(long delay) Milliseconds before the next poll for query execution status. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. -
getWaitTimeout
public long getWaitTimeout() -
setWaitTimeout
public void setWaitTimeout(long waitTimeout) Optional max wait time in millis to wait for a successful query completion. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. -
getRetry
-
setRetry
Optional comma separated list of error types to retry the query for. Use "retryable" to retry all retryable failure conditions (e.g. generic errors and resources exhausted), "generic" to retry "GENERIC_INTERNAL_ERROR" failures, "exhausted" to retry queries that have exhausted resource limits, "always" to always retry regardless of failure condition, or "never" or null to never retry (default). See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. -
getMaxAttempts
public int getMaxAttempts() -
setMaxAttempts
public void setMaxAttempts(int maxAttempts) Maximum number of times to attempt a query. Set to 1 to disable retries. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. -
isResetWaitTimeoutOnRetry
public boolean isResetWaitTimeoutOnRetry() -
setResetWaitTimeoutOnRetry
public void setResetWaitTimeoutOnRetry(boolean resetWaitTimeoutOnRetry) Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section 'Waiting for Query Completion and Retrying Failed Queries' to learn more. -
isIncludeTrace
public boolean isIncludeTrace() -
setIncludeTrace
public void setIncludeTrace(boolean includeTrace) Include useful trace information at the beginning of queries as an SQL comment (prefixed with "--"). -
setUseDefaultCredentialsProvider
Set whether the Athena client should expect to load credentials through a default credentials provider or to expect static credentials to be passed in. -
isUseDefaultCredentialsProvider
-
isUseProfileCredentialsProvider
public boolean isUseProfileCredentialsProvider() -
setUseProfileCredentialsProvider
public void setUseProfileCredentialsProvider(boolean useProfileCredentialsProvider) Set whether the Athena client should expect to load credentials through a profile credentials provider. -
isUseSessionCredentials
public boolean isUseSessionCredentials() -
setUseSessionCredentials
public void setUseSessionCredentials(boolean useSessionCredentials) Set whether the Athena client should expect to use Session Credentials. This is useful in a situation in which the user needs to assume a IAM role for doing operations in Athena. -
getProfileCredentialsName
-
setProfileCredentialsName
If using a profile credentials provider this parameter will set the profile name -
copy
-