| Copyright | (c) 2013-2018 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 |
| Language | Haskell2010 |
Network.AWS.CloudWatchLogs.GetLogEvents
Description
Lists log events from the specified log stream. You can list all 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.
Synopsis
- getLogEvents :: Text -> Text -> GetLogEvents
- data GetLogEvents
- gleStartTime :: Lens' GetLogEvents (Maybe Natural)
- gleStartFromHead :: Lens' GetLogEvents (Maybe Bool)
- gleNextToken :: Lens' GetLogEvents (Maybe Text)
- gleEndTime :: Lens' GetLogEvents (Maybe Natural)
- gleLimit :: Lens' GetLogEvents (Maybe Natural)
- gleLogGroupName :: Lens' GetLogEvents Text
- gleLogStreamName :: Lens' GetLogEvents Text
- getLogEventsResponse :: Int -> GetLogEventsResponse
- data GetLogEventsResponse
- glersNextBackwardToken :: Lens' GetLogEventsResponse (Maybe Text)
- glersNextForwardToken :: Lens' GetLogEventsResponse (Maybe Text)
- glersEvents :: Lens' GetLogEventsResponse [OutputLogEvent]
- glersResponseStatus :: Lens' GetLogEventsResponse Int
Creating a Request
Arguments
| :: Text | |
| -> Text | |
| -> GetLogEvents |
Creates a value of GetLogEvents with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
gleStartTime- The start of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a time stamp earlier than this time are not included.gleStartFromHead- 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.gleNextToken- The token for the next set of items to return. (You received this token from a previous call.)gleEndTime- The end of the time range, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. Events with a time stamp later than this time are not included.gleLimit- 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.gleLogGroupName- The name of the log group.gleLogStreamName- The name of the log stream.
data GetLogEvents Source #
See: getLogEvents smart constructor.
Instances
Request Lenses
gleStartTime :: 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 time stamp earlier than this time are not included.
gleStartFromHead :: 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.
gleNextToken :: Lens' GetLogEvents (Maybe Text) Source #
The token for the next set of items to return. (You received this token from a previous call.)
gleEndTime :: 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 time stamp later than this time are not included.
gleLimit :: 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.
gleLogGroupName :: Lens' GetLogEvents Text Source #
The name of the log group.
gleLogStreamName :: Lens' GetLogEvents Text Source #
The name of the log stream.
Destructuring the Response
Arguments
| :: Int | |
| -> GetLogEventsResponse |
Creates a value of GetLogEventsResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
glersNextBackwardToken- The token for the next set of items in the backward direction. The token expires after 24 hours.glersNextForwardToken- The token for the next set of items in the forward direction. The token expires after 24 hours.glersEvents- The events.glersResponseStatus- -- | The response status code.
data GetLogEventsResponse Source #
See: getLogEventsResponse smart constructor.
Instances
Response Lenses
glersNextBackwardToken :: Lens' GetLogEventsResponse (Maybe Text) Source #
The token for the next set of items in the backward direction. The token expires after 24 hours.
glersNextForwardToken :: Lens' GetLogEventsResponse (Maybe Text) Source #
The token for the next set of items in the forward direction. The token expires after 24 hours.
glersEvents :: Lens' GetLogEventsResponse [OutputLogEvent] Source #
The events.
glersResponseStatus :: Lens' GetLogEventsResponse Int Source #
- - | The response status code.