libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.CloudWatchLogs.GetLogEvents

Description

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

Creating a Request

data GetLogEvents Source #

See: newGetLogEvents smart constructor.

Constructors

GetLogEvents' 

Fields

  • startTime :: Maybe Natural

    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.

  • startFromHead :: Maybe Bool

    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.

  • nextToken :: Maybe Text

    The token for the next set of items to return. (You received this token from a previous call.)

  • endTime :: Maybe Natural

    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.

  • limit :: Maybe Natural

    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.

  • logGroupName :: Text

    The name of the log group.

  • logStreamName :: Text

    The name of the log stream.

Instances

Instances details
Eq GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Read GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Show GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Generic GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Associated Types

type Rep GetLogEvents :: Type -> Type #

NFData GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Methods

rnf :: GetLogEvents -> () #

Hashable GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

ToJSON GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

AWSRequest GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Associated Types

type AWSResponse GetLogEvents #

ToHeaders GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

ToPath GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

ToQuery GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

type Rep GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

type Rep GetLogEvents = D1 ('MetaData "GetLogEvents" "Amazonka.CloudWatchLogs.GetLogEvents" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "GetLogEvents'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "startTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: (S1 ('MetaSel ('Just "startFromHead") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "nextToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "endTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural)) :*: S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "logGroupName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "logStreamName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse GetLogEvents Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

newGetLogEvents Source #

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.

Destructuring the Response

data GetLogEventsResponse Source #

See: newGetLogEventsResponse smart constructor.

Constructors

GetLogEventsResponse' 

Fields

  • nextBackwardToken :: Maybe Text

    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.

  • nextForwardToken :: Maybe Text

    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.

  • events :: Maybe [OutputLogEvent]

    The events.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq GetLogEventsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Read GetLogEventsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Show GetLogEventsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Generic GetLogEventsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Associated Types

type Rep GetLogEventsResponse :: Type -> Type #

NFData GetLogEventsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

Methods

rnf :: GetLogEventsResponse -> () #

type Rep GetLogEventsResponse Source # 
Instance details

Defined in Amazonka.CloudWatchLogs.GetLogEvents

type Rep GetLogEventsResponse = D1 ('MetaData "GetLogEventsResponse" "Amazonka.CloudWatchLogs.GetLogEvents" "libZSservicesZSamazonka-cloudwatch-logsZSamazonka-cloudwatch-logs" 'False) (C1 ('MetaCons "GetLogEventsResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "nextBackwardToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "nextForwardToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "events") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [OutputLogEvent])) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

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.