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

Copyright(c) 2013-2016 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.FilterLogEvents

Contents

Description

Retrieves log events, optionally filtered by a filter pattern from the specified log group. You can provide an optional time range to filter the results on the event timestamp. You can limit the streams searched to an explicit list of logStreamNames.

By default, this operation returns as much matching log events as can fit in a response size of 1MB, up to 10,000 log events, or all the events found within a time-bounded scan window. If the response includes a nextToken, then there is more data to search, and the search can be resumed with a new request providing the nextToken. The response will contain a list of searchedLogStreams that contains information about which streams were searched in the request and whether they have been searched completely or require further pagination. The limit parameter in the request. can be used to specify the maximum number of events to return in a page.

This operation returns paginated results.

Synopsis

Creating a Request

filterLogEvents Source #

Creates a value of FilterLogEvents with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data FilterLogEvents Source #

See: filterLogEvents smart constructor.

Instances

Eq FilterLogEvents Source # 
Data FilterLogEvents Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FilterLogEvents -> c FilterLogEvents #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FilterLogEvents #

toConstr :: FilterLogEvents -> Constr #

dataTypeOf :: FilterLogEvents -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c FilterLogEvents) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FilterLogEvents) #

gmapT :: (forall b. Data b => b -> b) -> FilterLogEvents -> FilterLogEvents #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FilterLogEvents -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FilterLogEvents -> r #

gmapQ :: (forall d. Data d => d -> u) -> FilterLogEvents -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FilterLogEvents -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FilterLogEvents -> m FilterLogEvents #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FilterLogEvents -> m FilterLogEvents #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FilterLogEvents -> m FilterLogEvents #

Read FilterLogEvents Source # 
Show FilterLogEvents Source # 
Generic FilterLogEvents Source # 
ToJSON FilterLogEvents Source # 
Hashable FilterLogEvents Source # 
NFData FilterLogEvents Source # 

Methods

rnf :: FilterLogEvents -> () #

AWSPager FilterLogEvents Source # 
AWSRequest FilterLogEvents Source # 
ToPath FilterLogEvents Source # 
ToHeaders FilterLogEvents Source # 
ToQuery FilterLogEvents Source # 
type Rep FilterLogEvents Source # 
type Rep FilterLogEvents = D1 (MetaData "FilterLogEvents" "Network.AWS.CloudWatchLogs.FilterLogEvents" "amazonka-cloudwatch-logs-1.4.2-Guhy1kU17hv1viJ0bxq77f" False) (C1 (MetaCons "FilterLogEvents'" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_fleStartTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat))) (S1 (MetaSel (Just Symbol "_fleNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_fleLogStreamNames") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe (List1 Text)))) (S1 (MetaSel (Just Symbol "_fleEndTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_fleLimit") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Nat))) (S1 (MetaSel (Just Symbol "_fleFilterPattern") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_fleInterleaved") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) (S1 (MetaSel (Just Symbol "_fleLogGroupName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))))
type Rs FilterLogEvents Source # 

Request Lenses

fleStartTime :: Lens' FilterLogEvents (Maybe Natural) Source #

A point in time expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC. If provided, events with a timestamp prior to this time are not returned.

fleNextToken :: Lens' FilterLogEvents (Maybe Text) Source #

A pagination token obtained from a FilterLogEvents response to continue paginating the FilterLogEvents results. This token is omitted from the response when there are no other events to display.

fleLogStreamNames :: Lens' FilterLogEvents (Maybe (NonEmpty Text)) Source #

Optional list of log stream names within the specified log group to search. Defaults to all the log streams in the log group.

fleEndTime :: Lens' FilterLogEvents (Maybe Natural) Source #

A point in time expressed as the number of milliseconds since Jan 1, 1970 00:00:00 UTC. If provided, events with a timestamp later than this time are not returned.

fleLimit :: Lens' FilterLogEvents (Maybe Natural) Source #

The maximum number of events to return in a page of results. Default is 10,000 events.

fleFilterPattern :: Lens' FilterLogEvents (Maybe Text) Source #

A valid CloudWatch Logs filter pattern to use for filtering the response. If not provided, all the events are matched.

fleInterleaved :: Lens' FilterLogEvents (Maybe Bool) Source #

If provided, the API will make a best effort to provide responses that contain events from multiple log streams within the log group interleaved in a single response. If not provided, all the matched log events in the first log stream will be searched first, then those in the next log stream, etc.

fleLogGroupName :: Lens' FilterLogEvents Text Source #

The name of the log group to query.

Destructuring the Response

filterLogEventsResponse Source #

Creates a value of FilterLogEventsResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data FilterLogEventsResponse Source #

See: filterLogEventsResponse smart constructor.

Instances

Eq FilterLogEventsResponse Source # 
Data FilterLogEventsResponse Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FilterLogEventsResponse -> c FilterLogEventsResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FilterLogEventsResponse #

toConstr :: FilterLogEventsResponse -> Constr #

dataTypeOf :: FilterLogEventsResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c FilterLogEventsResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FilterLogEventsResponse) #

gmapT :: (forall b. Data b => b -> b) -> FilterLogEventsResponse -> FilterLogEventsResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FilterLogEventsResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FilterLogEventsResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> FilterLogEventsResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FilterLogEventsResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FilterLogEventsResponse -> m FilterLogEventsResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FilterLogEventsResponse -> m FilterLogEventsResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FilterLogEventsResponse -> m FilterLogEventsResponse #

Read FilterLogEventsResponse Source # 
Show FilterLogEventsResponse Source # 
Generic FilterLogEventsResponse Source # 
NFData FilterLogEventsResponse Source # 

Methods

rnf :: FilterLogEventsResponse -> () #

type Rep FilterLogEventsResponse Source # 
type Rep FilterLogEventsResponse = D1 (MetaData "FilterLogEventsResponse" "Network.AWS.CloudWatchLogs.FilterLogEvents" "amazonka-cloudwatch-logs-1.4.2-Guhy1kU17hv1viJ0bxq77f" False) (C1 (MetaCons "FilterLogEventsResponse'" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_flersSearchedLogStreams") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [SearchedLogStream]))) (S1 (MetaSel (Just Symbol "_flersNextToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_flersEvents") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [FilteredLogEvent]))) (S1 (MetaSel (Just Symbol "_flersResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))))

Response Lenses

flersSearchedLogStreams :: Lens' FilterLogEventsResponse [SearchedLogStream] Source #

A list of SearchedLogStream objects indicating which log streams have been searched in this request and whether each has been searched completely or still has more to be paginated.

flersNextToken :: Lens' FilterLogEventsResponse (Maybe Text) Source #

A pagination token obtained from a FilterLogEvents response to continue paginating the FilterLogEvents results. This token is omitted from the response when there are no other events to display.

flersEvents :: Lens' FilterLogEventsResponse [FilteredLogEvent] Source #

A list of FilteredLogEvent objects representing the matched events from the request.