Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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_nextToken :: Lens' GetQueryResults (Maybe Text)
- getQueryResults_maxResults :: Lens' GetQueryResults (Maybe Natural)
- getQueryResults_queryExecutionId :: Lens' GetQueryResults Text
- data GetQueryResultsResponse = GetQueryResultsResponse' {}
- newGetQueryResultsResponse :: Int -> GetQueryResultsResponse
- getQueryResultsResponse_updateCount :: Lens' GetQueryResultsResponse (Maybe Integer)
- getQueryResultsResponse_nextToken :: Lens' GetQueryResultsResponse (Maybe Text)
- getQueryResultsResponse_resultSet :: Lens' GetQueryResultsResponse (Maybe ResultSet)
- getQueryResultsResponse_httpStatus :: Lens' GetQueryResultsResponse Int
Creating a Request
data GetQueryResults Source #
See: newGetQueryResults
smart constructor.
GetQueryResults' | |
|
Instances
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:nextToken: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.
$sel:maxResults:GetQueryResults'
, getQueryResults_maxResults
- The maximum number of results (rows) to return in this request.
$sel:queryExecutionId:GetQueryResults'
, getQueryResults_queryExecutionId
- The unique ID of the query execution.
Request Lenses
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_maxResults :: Lens' GetQueryResults (Maybe Natural) Source #
The maximum number of results (rows) to return in this request.
getQueryResults_queryExecutionId :: Lens' GetQueryResults Text Source #
The unique ID of the query execution.
Destructuring the Response
data GetQueryResultsResponse Source #
See: newGetQueryResultsResponse
smart constructor.
GetQueryResultsResponse' | |
|
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:
$sel:updateCount:GetQueryResultsResponse'
, getQueryResultsResponse_updateCount
- The number of rows inserted with a CREATE TABLE AS SELECT
statement.
$sel:nextToken: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:httpStatus:GetQueryResultsResponse'
, getQueryResultsResponse_httpStatus
- The response's http status code.
Response Lenses
getQueryResultsResponse_updateCount :: Lens' GetQueryResultsResponse (Maybe Integer) Source #
The number of rows inserted with a CREATE TABLE AS SELECT
statement.
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_httpStatus :: Lens' GetQueryResultsResponse Int Source #
The response's http status code.