AutoCloseable
@Generated("software.amazon.awssdk:codegen") public interface AthenaClient extends AutoCloseable
builder()
method.
Amazon Athena is an interactive query service that lets you use standard SQL to analyze data directly in Amazon S3. You can point Athena at your data in Amazon S3 and run ad-hoc queries and get results in seconds. Athena is serverless, so there is no infrastructure to set up or manage. You pay only for the queries you run. Athena scales automatically—executing queries in parallel—so results are fast, even with large datasets and complex queries. For more information, see What is Amazon Athena in the Amazon Athena User Guide.
For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
Modifier and Type | Field | Description |
---|---|---|
static String |
SERVICE_NAME |
Modifier and Type | Method | Description |
---|---|---|
default BatchGetNamedQueryResponse |
batchGetNamedQuery(BatchGetNamedQueryRequest batchGetNamedQueryRequest) |
Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query
ID strings.
|
default BatchGetQueryExecutionResponse |
batchGetQueryExecution(BatchGetQueryExecutionRequest batchGetQueryExecutionRequest) |
Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an
array of query execution ID strings.
|
static AthenaClientBuilder |
builder() |
Create a builder that can be used to configure and create a
AthenaClient . |
static AthenaClient |
create() |
Create a
AthenaClient with the region loaded from the
DefaultAwsRegionProviderChain and credentials loaded from the
DefaultCredentialsProvider . |
default CreateNamedQueryResponse |
createNamedQuery(CreateNamedQueryRequest createNamedQueryRequest) |
Creates a named query.
|
default DeleteNamedQueryResponse |
deleteNamedQuery(DeleteNamedQueryRequest deleteNamedQueryRequest) |
Deletes a named query.
|
default GetNamedQueryResponse |
getNamedQuery(GetNamedQueryRequest getNamedQueryRequest) |
Returns information about a single query.
|
default GetQueryExecutionResponse |
getQueryExecution(GetQueryExecutionRequest getQueryExecutionRequest) |
Returns information about a single execution of a query.
|
default GetQueryResultsResponse |
getQueryResults(GetQueryResultsRequest getQueryResultsRequest) |
Returns the results of a single query execution specified by
QueryExecutionId . |
default ListNamedQueriesResponse |
listNamedQueries(ListNamedQueriesRequest listNamedQueriesRequest) |
Provides a list of all available query IDs.
|
default ListQueryExecutionsResponse |
listQueryExecutions(ListQueryExecutionsRequest listQueryExecutionsRequest) |
Provides a list of all available query execution IDs.
|
static ServiceMetadata |
serviceMetadata() |
|
default StartQueryExecutionResponse |
startQueryExecution(StartQueryExecutionRequest startQueryExecutionRequest) |
Runs (executes) the SQL query statements contained in the
Query string. |
default StopQueryExecutionResponse |
stopQueryExecution(StopQueryExecutionRequest stopQueryExecutionRequest) |
Stops a query execution.
|
close
static final String SERVICE_NAME
static AthenaClient create()
AthenaClient
with the region loaded from the
DefaultAwsRegionProviderChain
and credentials loaded from the
DefaultCredentialsProvider
.static AthenaClientBuilder builder()
AthenaClient
.default BatchGetNamedQueryResponse batchGetNamedQuery(BatchGetNamedQueryRequest batchGetNamedQueryRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Returns the details of a single named query or a list of up to 50 queries, which you provide as an array of query ID strings. Use ListNamedQueries to get the list of named query IDs. If information could not be retrieved for a submitted query ID, information about the query ID submitted is listed under UnprocessedNamedQueryId. Named queries are different from executed queries. Use BatchGetQueryExecution to get details about each unique query execution, and ListQueryExecutions to get a list of query execution IDs.
batchGetNamedQueryRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault BatchGetQueryExecutionResponse batchGetQueryExecution(BatchGetQueryExecutionRequest batchGetQueryExecutionRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Returns the details of a single query execution or a list of up to 50 query executions, which you provide as an array of query execution ID strings. To get a list of query execution IDs, use ListQueryExecutions. Query executions are different from named (saved) queries. Use BatchGetNamedQuery to get details about named queries.
batchGetQueryExecutionRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault CreateNamedQueryResponse createNamedQuery(CreateNamedQueryRequest createNamedQueryRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Creates a named query.
For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
createNamedQueryRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault DeleteNamedQueryResponse deleteNamedQuery(DeleteNamedQueryRequest deleteNamedQueryRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Deletes a named query.
For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
deleteNamedQueryRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault GetNamedQueryResponse getNamedQuery(GetNamedQueryRequest getNamedQueryRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Returns information about a single query.
getNamedQueryRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault GetQueryExecutionResponse getQueryExecution(GetQueryExecutionRequest getQueryExecutionRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Returns information about a single execution of a query. Each time a query executes, information about the query execution is saved with a unique ID.
getQueryExecutionRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault GetQueryResultsResponse getQueryResults(GetQueryResultsRequest getQueryResultsRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Returns the results of a single query execution specified by QueryExecutionId
. This request does not
execute the query but returns results. Use StartQueryExecution to run a query.
getQueryResultsRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault ListNamedQueriesResponse listNamedQueries(ListNamedQueriesRequest listNamedQueriesRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Provides a list of all available query IDs.
For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
listNamedQueriesRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault ListQueryExecutionsResponse listQueryExecutions(ListQueryExecutionsRequest listQueryExecutionsRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Provides a list of all available query execution IDs.
For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
listQueryExecutionsRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault StartQueryExecutionResponse startQueryExecution(StartQueryExecutionRequest startQueryExecutionRequest) throws InternalServerException, InvalidRequestException, TooManyRequestsException, SdkBaseException, SdkClientException, AthenaException
Runs (executes) the SQL query statements contained in the Query
string.
For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
startQueryExecutionRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.TooManyRequestsException
- Indicates that the request was throttled.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typedefault StopQueryExecutionResponse stopQueryExecution(StopQueryExecutionRequest stopQueryExecutionRequest) throws InternalServerException, InvalidRequestException, SdkBaseException, SdkClientException, AthenaException
Stops a query execution.
For code samples using the AWS SDK for Java, see Examples and Code Samples in the Amazon Athena User Guide.
stopQueryExecutionRequest
- InternalServerException
- Indicates a platform issue, which may be due to a transient condition or outage.InvalidRequestException
- Indicates that something is wrong with the input to the request. For example, a required parameter may be
missing or out of range.SdkBaseException
- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
catch all scenarios.SdkClientException
- If any client side error occurs such as an IO related failure, failure to get credentials, etc)AthenaException
- Base exception for all service exceptions. Unknown exceptions will be thrown as an instance of this typestatic ServiceMetadata serviceMetadata()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.