@Generated(value="software.amazon.awssdk:codegen") public interface AthenaClient extends SdkClient, SdkAutoCloseable
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 and Description |
|---|---|
static String |
SERVICE_NAME |
| Modifier and Type | Method and 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 BatchGetNamedQueryResponse |
batchGetNamedQuery(Consumer<BatchGetNamedQueryRequest.Builder> 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.
|
default BatchGetQueryExecutionResponse |
batchGetQueryExecution(Consumer<BatchGetQueryExecutionRequest.Builder> 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(Consumer<CreateNamedQueryRequest.Builder> createNamedQueryRequest)
Creates a named query.
|
default CreateNamedQueryResponse |
createNamedQuery(CreateNamedQueryRequest createNamedQueryRequest)
Creates a named query.
|
default DeleteNamedQueryResponse |
deleteNamedQuery(Consumer<DeleteNamedQueryRequest.Builder> deleteNamedQueryRequest)
Deletes a named query.
|
default DeleteNamedQueryResponse |
deleteNamedQuery(DeleteNamedQueryRequest deleteNamedQueryRequest)
Deletes a named query.
|
default GetNamedQueryResponse |
getNamedQuery(Consumer<GetNamedQueryRequest.Builder> getNamedQueryRequest)
Returns information about a single query.
|
default GetNamedQueryResponse |
getNamedQuery(GetNamedQueryRequest getNamedQueryRequest)
Returns information about a single query.
|
default GetQueryExecutionResponse |
getQueryExecution(Consumer<GetQueryExecutionRequest.Builder> getQueryExecutionRequest)
Returns information about a single execution of a query.
|
default GetQueryExecutionResponse |
getQueryExecution(GetQueryExecutionRequest getQueryExecutionRequest)
Returns information about a single execution of a query.
|
default GetQueryResultsResponse |
getQueryResults(Consumer<GetQueryResultsRequest.Builder> getQueryResultsRequest)
Returns the results of a single query execution specified by
QueryExecutionId. |
default GetQueryResultsResponse |
getQueryResults(GetQueryResultsRequest getQueryResultsRequest)
Returns the results of a single query execution specified by
QueryExecutionId. |
default GetQueryResultsIterable |
getQueryResultsPaginator(Consumer<GetQueryResultsRequest.Builder> getQueryResultsRequest)
Returns the results of a single query execution specified by
QueryExecutionId. |
default GetQueryResultsIterable |
getQueryResultsPaginator(GetQueryResultsRequest getQueryResultsRequest)
Returns the results of a single query execution specified by
QueryExecutionId. |
default ListNamedQueriesResponse |
listNamedQueries()
Provides a list of all available query IDs.
|
default ListNamedQueriesResponse |
listNamedQueries(Consumer<ListNamedQueriesRequest.Builder> listNamedQueriesRequest)
Provides a list of all available query IDs.
|
default ListNamedQueriesResponse |
listNamedQueries(ListNamedQueriesRequest listNamedQueriesRequest)
Provides a list of all available query IDs.
|
default ListNamedQueriesIterable |
listNamedQueriesPaginator()
Provides a list of all available query IDs.
|
default ListNamedQueriesIterable |
listNamedQueriesPaginator(ListNamedQueriesRequest listNamedQueriesRequest)
Provides a list of all available query IDs.
|
default ListQueryExecutionsResponse |
listQueryExecutions()
Provides a list of all available query execution IDs.
|
default ListQueryExecutionsResponse |
listQueryExecutions(Consumer<ListQueryExecutionsRequest.Builder> listQueryExecutionsRequest)
Provides a list of all available query execution IDs.
|
default ListQueryExecutionsResponse |
listQueryExecutions(ListQueryExecutionsRequest listQueryExecutionsRequest)
Provides a list of all available query execution IDs.
|
default ListQueryExecutionsIterable |
listQueryExecutionsPaginator()
Provides a list of all available query execution IDs.
|
default ListQueryExecutionsIterable |
listQueryExecutionsPaginator(ListQueryExecutionsRequest listQueryExecutionsRequest)
Provides a list of all available query execution IDs.
|
static ServiceMetadata |
serviceMetadata() |
default StartQueryExecutionResponse |
startQueryExecution(Consumer<StartQueryExecutionRequest.Builder> startQueryExecutionRequest)
Runs (executes) the SQL query statements contained in the
Query string. |
default StartQueryExecutionResponse |
startQueryExecution(StartQueryExecutionRequest startQueryExecutionRequest)
Runs (executes) the SQL query statements contained in the
Query string. |
default StopQueryExecutionResponse |
stopQueryExecution(Consumer<StopQueryExecutionRequest.Builder> stopQueryExecutionRequest)
Stops a query execution.
|
default StopQueryExecutionResponse |
stopQueryExecution(StopQueryExecutionRequest stopQueryExecutionRequest)
Stops a query execution.
|
serviceNameclosestatic 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, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault BatchGetNamedQueryResponse batchGetNamedQuery(Consumer<BatchGetNamedQueryRequest.Builder> batchGetNamedQueryRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the BatchGetNamedQueryRequest.Builder avoiding the
need to create one manually via BatchGetNamedQueryRequest.builder()
batchGetNamedQueryRequest - A Consumer that will call methods on BatchGetNamedQueryInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault BatchGetQueryExecutionResponse batchGetQueryExecution(BatchGetQueryExecutionRequest batchGetQueryExecutionRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault BatchGetQueryExecutionResponse batchGetQueryExecution(Consumer<BatchGetQueryExecutionRequest.Builder> batchGetQueryExecutionRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the BatchGetQueryExecutionRequest.Builder avoiding the
need to create one manually via BatchGetQueryExecutionRequest.builder()
batchGetQueryExecutionRequest - A Consumer that will call methods on BatchGetQueryExecutionInput.Builder to create a
request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault CreateNamedQueryResponse createNamedQuery(CreateNamedQueryRequest createNamedQueryRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault CreateNamedQueryResponse createNamedQuery(Consumer<CreateNamedQueryRequest.Builder> createNamedQueryRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the CreateNamedQueryRequest.Builder avoiding the need
to create one manually via CreateNamedQueryRequest.builder()
createNamedQueryRequest - A Consumer that will call methods on CreateNamedQueryInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteNamedQueryResponse deleteNamedQuery(DeleteNamedQueryRequest deleteNamedQueryRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault DeleteNamedQueryResponse deleteNamedQuery(Consumer<DeleteNamedQueryRequest.Builder> deleteNamedQueryRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the DeleteNamedQueryRequest.Builder avoiding the need
to create one manually via DeleteNamedQueryRequest.builder()
deleteNamedQueryRequest - A Consumer that will call methods on DeleteNamedQueryInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetNamedQueryResponse getNamedQuery(GetNamedQueryRequest getNamedQueryRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetNamedQueryResponse getNamedQuery(Consumer<GetNamedQueryRequest.Builder> getNamedQueryRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, SdkClientException, AthenaException
Returns information about a single query.
This is a convenience which creates an instance of the GetNamedQueryRequest.Builder avoiding the need to
create one manually via GetNamedQueryRequest.builder()
getNamedQueryRequest - A Consumer that will call methods on GetNamedQueryInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetQueryExecutionResponse getQueryExecution(GetQueryExecutionRequest getQueryExecutionRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetQueryExecutionResponse getQueryExecution(Consumer<GetQueryExecutionRequest.Builder> getQueryExecutionRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the GetQueryExecutionRequest.Builder avoiding the need
to create one manually via GetQueryExecutionRequest.builder()
getQueryExecutionRequest - A Consumer that will call methods on GetQueryExecutionInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetQueryResultsResponse getQueryResults(GetQueryResultsRequest getQueryResultsRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetQueryResultsResponse getQueryResults(Consumer<GetQueryResultsRequest.Builder> getQueryResultsRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the GetQueryResultsRequest.Builder avoiding the need
to create one manually via GetQueryResultsRequest.builder()
getQueryResultsRequest - A Consumer that will call methods on GetQueryResultsInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetQueryResultsIterable getQueryResultsPaginator(GetQueryResultsRequest getQueryResultsRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a variant of
getQueryResults(software.amazon.awssdk.services.athena.model.GetQueryResultsRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.athena.paginators.GetQueryResultsIterable responses = client.getQueryResultsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.athena.paginators.GetQueryResultsIterable responses = client
.getQueryResultsPaginator(request);
for (software.amazon.awssdk.services.athena.model.GetQueryResultsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.athena.paginators.GetQueryResultsIterable responses = client.getQueryResultsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
getQueryResults(software.amazon.awssdk.services.athena.model.GetQueryResultsRequest) operation.
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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault GetQueryResultsIterable getQueryResultsPaginator(Consumer<GetQueryResultsRequest.Builder> getQueryResultsRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a variant of
getQueryResults(software.amazon.awssdk.services.athena.model.GetQueryResultsRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.athena.paginators.GetQueryResultsIterable responses = client.getQueryResultsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.athena.paginators.GetQueryResultsIterable responses = client
.getQueryResultsPaginator(request);
for (software.amazon.awssdk.services.athena.model.GetQueryResultsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.athena.paginators.GetQueryResultsIterable responses = client.getQueryResultsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
getQueryResults(software.amazon.awssdk.services.athena.model.GetQueryResultsRequest) operation.
This is a convenience which creates an instance of the GetQueryResultsRequest.Builder avoiding the need
to create one manually via GetQueryResultsRequest.builder()
getQueryResultsRequest - A Consumer that will call methods on GetQueryResultsInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListNamedQueriesResponse listNamedQueries() throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionlistNamedQueries(ListNamedQueriesRequest),
AWS API
Documentationdefault ListNamedQueriesResponse listNamedQueries(ListNamedQueriesRequest listNamedQueriesRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListNamedQueriesResponse listNamedQueries(Consumer<ListNamedQueriesRequest.Builder> listNamedQueriesRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the ListNamedQueriesRequest.Builder avoiding the need
to create one manually via ListNamedQueriesRequest.builder()
listNamedQueriesRequest - A Consumer that will call methods on ListNamedQueriesInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListNamedQueriesIterable listNamedQueriesPaginator(ListNamedQueriesRequest listNamedQueriesRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a variant of
listNamedQueries(software.amazon.awssdk.services.athena.model.ListNamedQueriesRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.athena.paginators.ListNamedQueriesIterable responses = client.listNamedQueriesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.athena.paginators.ListNamedQueriesIterable responses = client
.listNamedQueriesPaginator(request);
for (software.amazon.awssdk.services.athena.model.ListNamedQueriesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.athena.paginators.ListNamedQueriesIterable responses = client.listNamedQueriesPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
listNamedQueries(software.amazon.awssdk.services.athena.model.ListNamedQueriesRequest) operation.
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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListNamedQueriesIterable listNamedQueriesPaginator() throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a variant of
listNamedQueries(software.amazon.awssdk.services.athena.model.ListNamedQueriesRequest) operation. The
return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle
making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.athena.paginators.ListNamedQueriesIterable responses = client.listNamedQueriesPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.athena.paginators.ListNamedQueriesIterable responses = client
.listNamedQueriesPaginator(request);
for (software.amazon.awssdk.services.athena.model.ListNamedQueriesResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.athena.paginators.ListNamedQueriesIterable responses = client.listNamedQueriesPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
listNamedQueries(software.amazon.awssdk.services.athena.model.ListNamedQueriesRequest) operation.
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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionlistNamedQueriesPaginator(ListNamedQueriesRequest),
AWS API
Documentationdefault ListQueryExecutionsResponse listQueryExecutions() throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionlistQueryExecutions(ListQueryExecutionsRequest),
AWS API
Documentationdefault ListQueryExecutionsResponse listQueryExecutions(ListQueryExecutionsRequest listQueryExecutionsRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListQueryExecutionsResponse listQueryExecutions(Consumer<ListQueryExecutionsRequest.Builder> listQueryExecutionsRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the ListQueryExecutionsRequest.Builder avoiding the
need to create one manually via ListQueryExecutionsRequest.builder()
listQueryExecutionsRequest - A Consumer that will call methods on ListQueryExecutionsInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListQueryExecutionsIterable listQueryExecutionsPaginator(ListQueryExecutionsRequest listQueryExecutionsRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a variant of
listQueryExecutions(software.amazon.awssdk.services.athena.model.ListQueryExecutionsRequest) operation.
The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.athena.paginators.ListQueryExecutionsIterable responses = client.listQueryExecutionsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.athena.paginators.ListQueryExecutionsIterable responses = client
.listQueryExecutionsPaginator(request);
for (software.amazon.awssdk.services.athena.model.ListQueryExecutionsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.athena.paginators.ListQueryExecutionsIterable responses = client.listQueryExecutionsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
listQueryExecutions(software.amazon.awssdk.services.athena.model.ListQueryExecutionsRequest)
operation.
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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault ListQueryExecutionsIterable listQueryExecutionsPaginator() throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a variant of
listQueryExecutions(software.amazon.awssdk.services.athena.model.ListQueryExecutionsRequest) operation.
The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally
handle making service calls for you.
When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
software.amazon.awssdk.services.athena.paginators.ListQueryExecutionsIterable responses = client.listQueryExecutionsPaginator(request);
responses.stream().forEach(....);
2) Using For loop
{
@code
software.amazon.awssdk.services.athena.paginators.ListQueryExecutionsIterable responses = client
.listQueryExecutionsPaginator(request);
for (software.amazon.awssdk.services.athena.model.ListQueryExecutionsResponse response : responses) {
// do something;
}
}
3) Use iterator directly
software.amazon.awssdk.services.athena.paginators.ListQueryExecutionsIterable responses = client.listQueryExecutionsPaginator(request);
responses.iterator().forEachRemaining(....);
Note: If you prefer to have control on service calls, use the
listQueryExecutions(software.amazon.awssdk.services.athena.model.ListQueryExecutionsRequest)
operation.
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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionlistQueryExecutionsPaginator(ListQueryExecutionsRequest),
AWS API
Documentationdefault StartQueryExecutionResponse startQueryExecution(StartQueryExecutionRequest startQueryExecutionRequest) throws InternalServerException, InvalidRequestException, TooManyRequestsException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StartQueryExecutionResponse startQueryExecution(Consumer<StartQueryExecutionRequest.Builder> startQueryExecutionRequest) throws InternalServerException, InvalidRequestException, TooManyRequestsException, AwsServiceException, 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.
This is a convenience which creates an instance of the StartQueryExecutionRequest.Builder avoiding the
need to create one manually via StartQueryExecutionRequest.builder()
startQueryExecutionRequest - A Consumer that will call methods on StartQueryExecutionInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StopQueryExecutionResponse stopQueryExecution(StopQueryExecutionRequest stopQueryExecutionRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptiondefault StopQueryExecutionResponse stopQueryExecution(Consumer<StopQueryExecutionRequest.Builder> stopQueryExecutionRequest) throws InternalServerException, InvalidRequestException, AwsServiceException, 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.
This is a convenience which creates an instance of the StopQueryExecutionRequest.Builder avoiding the
need to create one manually via StopQueryExecutionRequest.builder()
stopQueryExecutionRequest - A Consumer that will call methods on StopQueryExecutionInput.Builder to create a request.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.SdkException - 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 class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.AwsServiceExceptionstatic ServiceMetadata serviceMetadata()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.