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 |
Lists log events from the specified log group. You can list all the log events or filter the results using a filter pattern, a time range, and the name of the log stream.
By default, this operation returns as many log events as can fit in 1 MB (up to 10,000 log events) or all the events found within the time range that you specify. If the results include a token, then there are more log events available, and you can get additional results by specifying the token in a subsequent call. This operation can return empty results while there are more log events available through the token.
The returned log events are sorted by event timestamp, the timestamp
when the event was ingested by CloudWatch Logs, and the ID of the
PutLogEvents
request.
This operation returns paginated results.
Synopsis
- data FilterLogEvents = FilterLogEvents' {}
- newFilterLogEvents :: Text -> FilterLogEvents
- filterLogEvents_startTime :: Lens' FilterLogEvents (Maybe Natural)
- filterLogEvents_nextToken :: Lens' FilterLogEvents (Maybe Text)
- filterLogEvents_logStreamNames :: Lens' FilterLogEvents (Maybe (NonEmpty Text))
- filterLogEvents_logStreamNamePrefix :: Lens' FilterLogEvents (Maybe Text)
- filterLogEvents_endTime :: Lens' FilterLogEvents (Maybe Natural)
- filterLogEvents_limit :: Lens' FilterLogEvents (Maybe Natural)
- filterLogEvents_filterPattern :: Lens' FilterLogEvents (Maybe Text)
- filterLogEvents_interleaved :: Lens' FilterLogEvents (Maybe Bool)
- filterLogEvents_logGroupName :: Lens' FilterLogEvents Text
- data FilterLogEventsResponse = FilterLogEventsResponse' {}
- newFilterLogEventsResponse :: Int -> FilterLogEventsResponse
- filterLogEventsResponse_searchedLogStreams :: Lens' FilterLogEventsResponse (Maybe [SearchedLogStream])
- filterLogEventsResponse_nextToken :: Lens' FilterLogEventsResponse (Maybe Text)
- filterLogEventsResponse_events :: Lens' FilterLogEventsResponse (Maybe [FilteredLogEvent])
- filterLogEventsResponse_httpStatus :: Lens' FilterLogEventsResponse Int
Creating a Request
data FilterLogEvents Source #
See: newFilterLogEvents
smart constructor.
FilterLogEvents' | |
|
Instances
Create a value of FilterLogEvents
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:startTime:FilterLogEvents'
, filterLogEvents_startTime
- The start of the time range, expressed as the number of milliseconds
after Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time
are not returned.
$sel:nextToken:FilterLogEvents'
, filterLogEvents_nextToken
- The token for the next set of events to return. (You received this token
from a previous call.)
$sel:logStreamNames:FilterLogEvents'
, filterLogEvents_logStreamNames
- Filters the results to only logs from the log streams in this list.
If you specify a value for both logStreamNamePrefix
and
logStreamNames
, the action returns an InvalidParameterException
error.
$sel:logStreamNamePrefix:FilterLogEvents'
, filterLogEvents_logStreamNamePrefix
- Filters the results to include only events from log streams that have
names starting with this prefix.
If you specify a value for both logStreamNamePrefix
and
logStreamNames
, but the value for logStreamNamePrefix
does not match
any log stream names specified in logStreamNames
, the action returns
an InvalidParameterException
error.
$sel:endTime:FilterLogEvents'
, filterLogEvents_endTime
- The end of the time range, expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time
are not returned.
$sel:limit:FilterLogEvents'
, filterLogEvents_limit
- The maximum number of events to return. The default is 10,000 events.
$sel:filterPattern:FilterLogEvents'
, filterLogEvents_filterPattern
- The filter pattern to use. For more information, see
Filter and Pattern Syntax.
If not provided, all the events are matched.
$sel:interleaved:FilterLogEvents'
, filterLogEvents_interleaved
- If the value is true, the operation makes a best effort to provide
responses that contain events from multiple log streams within the log
group, interleaved in a single response. If the value is false, all the
matched log events in the first log stream are searched first, then
those in the next log stream, and so on. The default is false.
Important: Starting on June 17, 2019, this parameter is ignored and the value is assumed to be true. The response from this operation always interleaves events from multiple log streams within a log group.
$sel:logGroupName:FilterLogEvents'
, filterLogEvents_logGroupName
- The name of the log group to search.
Request Lenses
filterLogEvents_startTime :: Lens' FilterLogEvents (Maybe Natural) Source #
The start of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp before this time are not returned.
filterLogEvents_nextToken :: Lens' FilterLogEvents (Maybe Text) Source #
The token for the next set of events to return. (You received this token from a previous call.)
filterLogEvents_logStreamNames :: Lens' FilterLogEvents (Maybe (NonEmpty Text)) Source #
Filters the results to only logs from the log streams in this list.
If you specify a value for both logStreamNamePrefix
and
logStreamNames
, the action returns an InvalidParameterException
error.
filterLogEvents_logStreamNamePrefix :: Lens' FilterLogEvents (Maybe Text) Source #
Filters the results to include only events from log streams that have names starting with this prefix.
If you specify a value for both logStreamNamePrefix
and
logStreamNames
, but the value for logStreamNamePrefix
does not match
any log stream names specified in logStreamNames
, the action returns
an InvalidParameterException
error.
filterLogEvents_endTime :: Lens' FilterLogEvents (Maybe Natural) Source #
The end of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a timestamp later than this time are not returned.
filterLogEvents_limit :: Lens' FilterLogEvents (Maybe Natural) Source #
The maximum number of events to return. The default is 10,000 events.
filterLogEvents_filterPattern :: Lens' FilterLogEvents (Maybe Text) Source #
The filter pattern to use. For more information, see Filter and Pattern Syntax.
If not provided, all the events are matched.
filterLogEvents_interleaved :: Lens' FilterLogEvents (Maybe Bool) Source #
If the value is true, the operation makes a best effort to provide responses that contain events from multiple log streams within the log group, interleaved in a single response. If the value is false, all the matched log events in the first log stream are searched first, then those in the next log stream, and so on. The default is false.
Important: Starting on June 17, 2019, this parameter is ignored and the value is assumed to be true. The response from this operation always interleaves events from multiple log streams within a log group.
filterLogEvents_logGroupName :: Lens' FilterLogEvents Text Source #
The name of the log group to search.
Destructuring the Response
data FilterLogEventsResponse Source #
See: newFilterLogEventsResponse
smart constructor.
FilterLogEventsResponse' | |
|
Instances
newFilterLogEventsResponse Source #
Create a value of FilterLogEventsResponse
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:searchedLogStreams:FilterLogEventsResponse'
, filterLogEventsResponse_searchedLogStreams
- IMPORTANT Starting on May 15, 2020, this parameter will be
deprecated. This parameter will be an empty list after the deprecation
occurs.
Indicates which log streams have been searched and whether each has been searched completely.
$sel:nextToken:FilterLogEvents'
, filterLogEventsResponse_nextToken
- The token to use when requesting the next set of items. The token
expires after 24 hours.
$sel:events:FilterLogEventsResponse'
, filterLogEventsResponse_events
- The matched events.
$sel:httpStatus:FilterLogEventsResponse'
, filterLogEventsResponse_httpStatus
- The response's http status code.
Response Lenses
filterLogEventsResponse_searchedLogStreams :: Lens' FilterLogEventsResponse (Maybe [SearchedLogStream]) Source #
IMPORTANT Starting on May 15, 2020, this parameter will be deprecated. This parameter will be an empty list after the deprecation occurs.
Indicates which log streams have been searched and whether each has been searched completely.
filterLogEventsResponse_nextToken :: Lens' FilterLogEventsResponse (Maybe Text) Source #
The token to use when requesting the next set of items. The token expires after 24 hours.
filterLogEventsResponse_events :: Lens' FilterLogEventsResponse (Maybe [FilteredLogEvent]) Source #
The matched events.
filterLogEventsResponse_httpStatus :: Lens' FilterLogEventsResponse Int Source #
The response's http status code.