amazonka-cloudwatch-logs-1.1.0: Amazon CloudWatch Logs SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CloudWatchLogs.GetLogEvents

Contents

Description

Retrieves log events from the specified log stream. You can provide an optional time range to filter the results on the event timestamp.

By default, this operation returns as much log events as can fit in a response size of 1MB, up to 10,000 log events. The response will always include a nextForwardToken and a nextBackwardToken in the response body. You can use any of these tokens in subsequent GetLogEvents requests to paginate through events in either forward or backward direction. You can also limit the number of log events returned in the response by specifying the limit parameter in the request.

See: AWS API Reference for GetLogEvents.

Synopsis

Creating a Request

getLogEvents Source

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:

Request Lenses

gleStartFromHead :: Lens' GetLogEvents (Maybe Bool) Source

If set to true, the earliest log events would be returned first. The default is false (the latest log events are returned first).

gleNextToken :: Lens' GetLogEvents (Maybe Text) Source

A string token used for pagination that points to the next page of results. It must be a value obtained from the nextForwardToken or nextBackwardToken fields in the response of the previous GetLogEvents request.

gleEndTime :: Lens' GetLogEvents (Maybe Natural) Source

Undocumented member.

gleLimit :: Lens' GetLogEvents (Maybe Natural) Source

The maximum number of log events returned in the response. If you don't specify a value, the request would return as many log events as can fit in a response size of 1MB, up to 10,000 log events.

gleLogGroupName :: Lens' GetLogEvents Text Source

The name of the log group to query.

gleLogStreamName :: Lens' GetLogEvents Text Source

The name of the log stream to query.

Destructuring the Response

getLogEventsResponse Source

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:

Response Lenses

glersStatus :: Lens' GetLogEventsResponse Int Source

The response status code.