| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.Athena.GetQueryResults
Description
Streams the results of a single query execution specified by
QueryExecutionId from the Athena query results location in Amazon S3.
For more information, see
Query Results
in the Amazon Athena User Guide. This request does not execute the
query but returns results. Use StartQueryExecution to run a query.
To stream query results successfully, the IAM principal with permission
to call GetQueryResults also must have permissions to the Amazon S3
GetObject action for the Athena query results location.
IAM principals with permission to the Amazon S3 GetObject action for
the query results location are able to retrieve query results from
Amazon S3 even if permission to the GetQueryResults action is denied.
To restrict user or role access, ensure that Amazon S3 permissions to
the Athena query location are denied.
This operation returns paginated results.
Synopsis
- data GetQueryResults = GetQueryResults' {}
- newGetQueryResults :: Text -> GetQueryResults
- getQueryResults_maxResults :: Lens' GetQueryResults (Maybe Natural)
- getQueryResults_nextToken :: Lens' GetQueryResults (Maybe Text)
- getQueryResults_queryExecutionId :: Lens' GetQueryResults Text
- data GetQueryResultsResponse = GetQueryResultsResponse' {}
- newGetQueryResultsResponse :: Int -> GetQueryResultsResponse
- getQueryResultsResponse_nextToken :: Lens' GetQueryResultsResponse (Maybe Text)
- getQueryResultsResponse_resultSet :: Lens' GetQueryResultsResponse (Maybe ResultSet)
- getQueryResultsResponse_updateCount :: Lens' GetQueryResultsResponse (Maybe Integer)
- getQueryResultsResponse_httpStatus :: Lens' GetQueryResultsResponse Int
Creating a Request
data GetQueryResults Source #
See: newGetQueryResults smart constructor.
Constructors
| GetQueryResults' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> GetQueryResults |
Create a value of GetQueryResults with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:maxResults:GetQueryResults', getQueryResults_maxResults - The maximum number of results (rows) to return in this request.
GetQueryResults, getQueryResults_nextToken - A token generated by the Athena service that specifies where to continue
pagination if a previous request was truncated. To obtain the next set
of pages, pass in the NextToken from the response object of the
previous page call.
GetQueryResults, getQueryResults_queryExecutionId - The unique ID of the query execution.
Request Lenses
getQueryResults_maxResults :: Lens' GetQueryResults (Maybe Natural) Source #
The maximum number of results (rows) to return in this request.
getQueryResults_nextToken :: Lens' GetQueryResults (Maybe Text) Source #
A token generated by the Athena service that specifies where to continue
pagination if a previous request was truncated. To obtain the next set
of pages, pass in the NextToken from the response object of the
previous page call.
getQueryResults_queryExecutionId :: Lens' GetQueryResults Text Source #
The unique ID of the query execution.
Destructuring the Response
data GetQueryResultsResponse Source #
See: newGetQueryResultsResponse smart constructor.
Constructors
| GetQueryResultsResponse' | |
Fields
| |
Instances
newGetQueryResultsResponse Source #
Create a value of GetQueryResultsResponse with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
GetQueryResults, getQueryResultsResponse_nextToken - A token generated by the Athena service that specifies where to continue
pagination if a previous request was truncated. To obtain the next set
of pages, pass in the NextToken from the response object of the
previous page call.
$sel:resultSet:GetQueryResultsResponse', getQueryResultsResponse_resultSet - The results of the query execution.
$sel:updateCount:GetQueryResultsResponse', getQueryResultsResponse_updateCount - The number of rows inserted with a CREATE TABLE AS SELECT statement.
$sel:httpStatus:GetQueryResultsResponse', getQueryResultsResponse_httpStatus - The response's http status code.
Response Lenses
getQueryResultsResponse_nextToken :: Lens' GetQueryResultsResponse (Maybe Text) Source #
A token generated by the Athena service that specifies where to continue
pagination if a previous request was truncated. To obtain the next set
of pages, pass in the NextToken from the response object of the
previous page call.
getQueryResultsResponse_resultSet :: Lens' GetQueryResultsResponse (Maybe ResultSet) Source #
The results of the query execution.
getQueryResultsResponse_updateCount :: Lens' GetQueryResultsResponse (Maybe Integer) Source #
The number of rows inserted with a CREATE TABLE AS SELECT statement.
getQueryResultsResponse_httpStatus :: Lens' GetQueryResultsResponse Int Source #
The response's http status code.