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 |
Returns the results from the specified query.
Only the fields requested in the query are returned, along with a
@ptr
field, which is the identifier for the log record. You can use
the value of @ptr
in a
GetLogRecord
operation to get the full log record.
GetQueryResults
does not start a query execution. To run a query, use
StartQuery.
If the value of the Status
field in the output is Running
, this
operation returns only partial results. If you see a value of
Scheduled
or Running
for the status, you can retry the operation
later to see the final results.
Synopsis
- data GetQueryResults = GetQueryResults' {}
- newGetQueryResults :: Text -> GetQueryResults
- getQueryResults_queryId :: Lens' GetQueryResults Text
- data GetQueryResultsResponse = GetQueryResultsResponse' {
- status :: Maybe QueryStatus
- results :: Maybe [[ResultField]]
- statistics :: Maybe QueryStatistics
- httpStatus :: Int
- newGetQueryResultsResponse :: Int -> GetQueryResultsResponse
- getQueryResultsResponse_status :: Lens' GetQueryResultsResponse (Maybe QueryStatus)
- getQueryResultsResponse_results :: Lens' GetQueryResultsResponse (Maybe [[ResultField]])
- getQueryResultsResponse_statistics :: Lens' GetQueryResultsResponse (Maybe QueryStatistics)
- getQueryResultsResponse_httpStatus :: Lens' GetQueryResultsResponse Int
Creating a Request
data GetQueryResults Source #
See: newGetQueryResults
smart constructor.
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:queryId:GetQueryResults'
, getQueryResults_queryId
- The ID number of the query.
Request Lenses
getQueryResults_queryId :: Lens' GetQueryResults Text Source #
The ID number of the query.
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:status:GetQueryResultsResponse'
, getQueryResultsResponse_status
- The status of the most recent running of the query. Possible values are
Cancelled
, Complete
, Failed
, Running
, Scheduled
, Timeout
,
and Unknown
.
Queries time out after 15 minutes of execution. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.
$sel:results:GetQueryResultsResponse'
, getQueryResultsResponse_results
- The log events that matched the query criteria during the most recent
time it ran.
The results
value is an array of arrays. Each log event is one object
in the top-level array. Each of these log event objects is an array of
field
/value
pairs.
$sel:statistics:GetQueryResultsResponse'
, getQueryResultsResponse_statistics
- Includes the number of log events scanned by the query, the number of
log events that matched the query criteria, and the total number of
bytes in the log events that were scanned. These values reflect the full
raw results of the query.
$sel:httpStatus:GetQueryResultsResponse'
, getQueryResultsResponse_httpStatus
- The response's http status code.
Response Lenses
getQueryResultsResponse_status :: Lens' GetQueryResultsResponse (Maybe QueryStatus) Source #
The status of the most recent running of the query. Possible values are
Cancelled
, Complete
, Failed
, Running
, Scheduled
, Timeout
,
and Unknown
.
Queries time out after 15 minutes of execution. To avoid having your queries time out, reduce the time range being searched or partition your query into a number of queries.
getQueryResultsResponse_results :: Lens' GetQueryResultsResponse (Maybe [[ResultField]]) Source #
The log events that matched the query criteria during the most recent time it ran.
The results
value is an array of arrays. Each log event is one object
in the top-level array. Each of these log event objects is an array of
field
/value
pairs.
getQueryResultsResponse_statistics :: Lens' GetQueryResultsResponse (Maybe QueryStatistics) Source #
Includes the number of log events scanned by the query, the number of log events that matched the query criteria, and the total number of bytes in the log events that were scanned. These values reflect the full raw results of the query.
getQueryResultsResponse_httpStatus :: Lens' GetQueryResultsResponse Int Source #
The response's http status code.