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 stream. You can list all of the log events or filter using a time range.
By default, this operation returns as many log events as can fit in a response size of 1MB (up to 10,000 log events). You can get additional log events by specifying one of the tokens in a subsequent call. This operation can return empty results while there are more log events available through the token.
Synopsis
- data GetLogEvents = GetLogEvents' {}
- newGetLogEvents :: Text -> Text -> GetLogEvents
- getLogEvents_startTime :: Lens' GetLogEvents (Maybe Natural)
- getLogEvents_startFromHead :: Lens' GetLogEvents (Maybe Bool)
- getLogEvents_nextToken :: Lens' GetLogEvents (Maybe Text)
- getLogEvents_endTime :: Lens' GetLogEvents (Maybe Natural)
- getLogEvents_limit :: Lens' GetLogEvents (Maybe Natural)
- getLogEvents_logGroupName :: Lens' GetLogEvents Text
- getLogEvents_logStreamName :: Lens' GetLogEvents Text
- data GetLogEventsResponse = GetLogEventsResponse' {}
- newGetLogEventsResponse :: Int -> GetLogEventsResponse
- getLogEventsResponse_nextBackwardToken :: Lens' GetLogEventsResponse (Maybe Text)
- getLogEventsResponse_nextForwardToken :: Lens' GetLogEventsResponse (Maybe Text)
- getLogEventsResponse_events :: Lens' GetLogEventsResponse (Maybe [OutputLogEvent])
- getLogEventsResponse_httpStatus :: Lens' GetLogEventsResponse Int
Creating a Request
data GetLogEvents Source #
See: newGetLogEvents
smart constructor.
GetLogEvents' | |
|
Instances
Create a value of GetLogEvents
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:GetLogEvents'
, getLogEvents_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 equal to this
time or later than this time are included. Events with a timestamp
earlier than this time are not included.
$sel:startFromHead:GetLogEvents'
, getLogEvents_startFromHead
- If the value is true, the earliest log events are returned first. If the
value is false, the latest log events are returned first. The default
value is false.
If you are using a previous nextForwardToken
value as the nextToken
in this operation, you must specify true
for startFromHead
.
$sel:nextToken:GetLogEvents'
, getLogEvents_nextToken
- The token for the next set of items to return. (You received this token
from a previous call.)
$sel:endTime:GetLogEvents'
, getLogEvents_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 equal to or later than
this time are not included.
$sel:limit:GetLogEvents'
, getLogEvents_limit
- The maximum number of log events returned. If you don't specify a
value, the maximum is as many log events as can fit in a response size
of 1 MB, up to 10,000 log events.
$sel:logGroupName:GetLogEvents'
, getLogEvents_logGroupName
- The name of the log group.
$sel:logStreamName:GetLogEvents'
, getLogEvents_logStreamName
- The name of the log stream.
Request Lenses
getLogEvents_startTime :: Lens' GetLogEvents (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 equal to this time or later than this time are included. Events with a timestamp earlier than this time are not included.
getLogEvents_startFromHead :: Lens' GetLogEvents (Maybe Bool) Source #
If the value is true, the earliest log events are returned first. If the value is false, the latest log events are returned first. The default value is false.
If you are using a previous nextForwardToken
value as the nextToken
in this operation, you must specify true
for startFromHead
.
getLogEvents_nextToken :: Lens' GetLogEvents (Maybe Text) Source #
The token for the next set of items to return. (You received this token from a previous call.)
getLogEvents_endTime :: Lens' GetLogEvents (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 equal to or later than this time are not included.
getLogEvents_limit :: Lens' GetLogEvents (Maybe Natural) Source #
The maximum number of log events returned. If you don't specify a value, the maximum is as many log events as can fit in a response size of 1 MB, up to 10,000 log events.
getLogEvents_logGroupName :: Lens' GetLogEvents Text Source #
The name of the log group.
getLogEvents_logStreamName :: Lens' GetLogEvents Text Source #
The name of the log stream.
Destructuring the Response
data GetLogEventsResponse Source #
See: newGetLogEventsResponse
smart constructor.
GetLogEventsResponse' | |
|
Instances
newGetLogEventsResponse Source #
Create a value of GetLogEventsResponse
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:nextBackwardToken:GetLogEventsResponse'
, getLogEventsResponse_nextBackwardToken
- The token for the next set of items in the backward direction. The token
expires after 24 hours. This token is never null. If you have reached
the end of the stream, it returns the same token you passed in.
$sel:nextForwardToken:GetLogEventsResponse'
, getLogEventsResponse_nextForwardToken
- The token for the next set of items in the forward direction. The token
expires after 24 hours. If you have reached the end of the stream, it
returns the same token you passed in.
$sel:events:GetLogEventsResponse'
, getLogEventsResponse_events
- The events.
$sel:httpStatus:GetLogEventsResponse'
, getLogEventsResponse_httpStatus
- The response's http status code.
Response Lenses
getLogEventsResponse_nextBackwardToken :: Lens' GetLogEventsResponse (Maybe Text) Source #
The token for the next set of items in the backward direction. The token expires after 24 hours. This token is never null. If you have reached the end of the stream, it returns the same token you passed in.
getLogEventsResponse_nextForwardToken :: Lens' GetLogEventsResponse (Maybe Text) Source #
The token for the next set of items in the forward direction. The token expires after 24 hours. If you have reached the end of the stream, it returns the same token you passed in.
getLogEventsResponse_events :: Lens' GetLogEventsResponse (Maybe [OutputLogEvent]) Source #
The events.
getLogEventsResponse_httpStatus :: Lens' GetLogEventsResponse Int Source #
The response's http status code.