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 |
Schedules a query of a log group using CloudWatch Logs Insights. You specify the log group and time range to query and the query string to use.
For more information, see CloudWatch Logs Insights Query Syntax.
Queries time out after 15 minutes of execution. If your queries are timing out, reduce the time range being searched or partition your query into a number of queries.
Synopsis
- data StartQuery = StartQuery' {
- logGroupNames :: Maybe [Text]
- logGroupName :: Maybe Text
- limit :: Maybe Natural
- startTime :: Natural
- endTime :: Natural
- queryString :: Text
- newStartQuery :: Natural -> Natural -> Text -> StartQuery
- startQuery_logGroupNames :: Lens' StartQuery (Maybe [Text])
- startQuery_logGroupName :: Lens' StartQuery (Maybe Text)
- startQuery_limit :: Lens' StartQuery (Maybe Natural)
- startQuery_startTime :: Lens' StartQuery Natural
- startQuery_endTime :: Lens' StartQuery Natural
- startQuery_queryString :: Lens' StartQuery Text
- data StartQueryResponse = StartQueryResponse' {
- queryId :: Maybe Text
- httpStatus :: Int
- newStartQueryResponse :: Int -> StartQueryResponse
- startQueryResponse_queryId :: Lens' StartQueryResponse (Maybe Text)
- startQueryResponse_httpStatus :: Lens' StartQueryResponse Int
Creating a Request
data StartQuery Source #
See: newStartQuery
smart constructor.
StartQuery' | |
|
Instances
:: Natural | |
-> Natural | |
-> Text | |
-> StartQuery |
Create a value of StartQuery
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:logGroupNames:StartQuery'
, startQuery_logGroupNames
- The list of log groups to be queried. You can include up to 20 log
groups.
A StartQuery
operation must include a logGroupNames
or a
logGroupName
parameter, but not both.
$sel:logGroupName:StartQuery'
, startQuery_logGroupName
- The log group on which to perform the query.
A StartQuery
operation must include a logGroupNames
or a
logGroupName
parameter, but not both.
$sel:limit:StartQuery'
, startQuery_limit
- The maximum number of log events to return in the query. If the query
string uses the fields
command, only the specified fields and their
values are returned. The default is 1000.
$sel:startTime:StartQuery'
, startQuery_startTime
- The beginning of the time range to query. The range is inclusive, so the
specified start time is included in the query. Specified as epoch time,
the number of seconds since January 1, 1970, 00:00:00 UTC.
$sel:endTime:StartQuery'
, startQuery_endTime
- The end of the time range to query. The range is inclusive, so the
specified end time is included in the query. Specified as epoch time,
the number of seconds since January 1, 1970, 00:00:00 UTC.
$sel:queryString:StartQuery'
, startQuery_queryString
- The query string to use. For more information, see
CloudWatch Logs Insights Query Syntax.
Request Lenses
startQuery_logGroupNames :: Lens' StartQuery (Maybe [Text]) Source #
The list of log groups to be queried. You can include up to 20 log groups.
A StartQuery
operation must include a logGroupNames
or a
logGroupName
parameter, but not both.
startQuery_logGroupName :: Lens' StartQuery (Maybe Text) Source #
The log group on which to perform the query.
A StartQuery
operation must include a logGroupNames
or a
logGroupName
parameter, but not both.
startQuery_limit :: Lens' StartQuery (Maybe Natural) Source #
The maximum number of log events to return in the query. If the query
string uses the fields
command, only the specified fields and their
values are returned. The default is 1000.
startQuery_startTime :: Lens' StartQuery Natural Source #
The beginning of the time range to query. The range is inclusive, so the specified start time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.
startQuery_endTime :: Lens' StartQuery Natural Source #
The end of the time range to query. The range is inclusive, so the specified end time is included in the query. Specified as epoch time, the number of seconds since January 1, 1970, 00:00:00 UTC.
startQuery_queryString :: Lens' StartQuery Text Source #
The query string to use. For more information, see CloudWatch Logs Insights Query Syntax.
Destructuring the Response
data StartQueryResponse Source #
See: newStartQueryResponse
smart constructor.
StartQueryResponse' | |
|
Instances
newStartQueryResponse Source #
Create a value of StartQueryResponse
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:StartQueryResponse'
, startQueryResponse_queryId
- The unique ID of the query.
$sel:httpStatus:StartQueryResponse'
, startQueryResponse_httpStatus
- The response's http status code.
Response Lenses
startQueryResponse_queryId :: Lens' StartQueryResponse (Maybe Text) Source #
The unique ID of the query.
startQueryResponse_httpStatus :: Lens' StartQueryResponse Int Source #
The response's http status code.