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 |
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 runtime. If your queries are timing out, reduce the time range being searched or partition your query into a number of queries.
If you are using CloudWatch cross-account observability, you can use
this operation in a monitoring account to start a query in a linked
source account. For more information, see
CloudWatch cross-account observability.
For a cross-account StartQuery
operation, the query definition must be
defined in the monitoring account.
You can have up to 20 concurrent CloudWatch Logs insights queries, including queries that have been added to dashboards.
Synopsis
- data StartQuery = StartQuery' {
- limit :: Maybe Natural
- logGroupIdentifiers :: Maybe [Text]
- logGroupName :: Maybe Text
- logGroupNames :: Maybe [Text]
- startTime :: Natural
- endTime :: Natural
- queryString :: Text
- newStartQuery :: Natural -> Natural -> Text -> StartQuery
- startQuery_limit :: Lens' StartQuery (Maybe Natural)
- startQuery_logGroupIdentifiers :: Lens' StartQuery (Maybe [Text])
- startQuery_logGroupName :: Lens' StartQuery (Maybe Text)
- startQuery_logGroupNames :: Lens' StartQuery (Maybe [Text])
- 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: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:logGroupIdentifiers:StartQuery'
, startQuery_logGroupIdentifiers
- The list of log groups to query. You can include up to 50 log groups.
You can specify them by the log group name or ARN. If a log group that you're querying is in a source account and you're using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account.
If you specify an ARN, the ARN can't end with an asterisk (*).
A StartQuery
operation must include exactly one of the following
parameters: logGroupName
, logGroupNames
or logGroupIdentifiers
.
StartQuery
, startQuery_logGroupName
- The log group on which to perform the query.
A StartQuery
operation must include exactly one of the following
parameters: logGroupName
, logGroupNames
or logGroupIdentifiers
.
StartQuery
, startQuery_logGroupNames
- The list of log groups to be queried. You can include up to 50 log
groups.
A StartQuery
operation must include exactly one of the following
parameters: logGroupName
, logGroupNames
or logGroupIdentifiers
.
$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
.
StartQuery
, startQuery_queryString
- The query string to use. For more information, see
CloudWatch Logs Insights Query Syntax.
Request Lenses
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_logGroupIdentifiers :: Lens' StartQuery (Maybe [Text]) Source #
The list of log groups to query. You can include up to 50 log groups.
You can specify them by the log group name or ARN. If a log group that you're querying is in a source account and you're using a monitoring account, you must specify the ARN of the log group here. The query definition must also be defined in the monitoring account.
If you specify an ARN, the ARN can't end with an asterisk (*).
A StartQuery
operation must include exactly one of the following
parameters: logGroupName
, logGroupNames
or logGroupIdentifiers
.
startQuery_logGroupName :: Lens' StartQuery (Maybe Text) Source #
The log group on which to perform the query.
A StartQuery
operation must include exactly one of the following
parameters: logGroupName
, logGroupNames
or logGroupIdentifiers
.
startQuery_logGroupNames :: Lens' StartQuery (Maybe [Text]) Source #
The list of log groups to be queried. You can include up to 50 log groups.
A StartQuery
operation must include exactly one of the following
parameters: logGroupName
, logGroupNames
or logGroupIdentifiers
.
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:
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.