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

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

Network.AWS.CloudWatchLogs.PutLogEvents

Contents

Description

Uploads a batch of log events to the specified log stream.

You must include the sequence token obtained from the response of the previous call. An upload in a newly created log stream does not require a sequence token. You can also get the sequence token using DescribeLogStreams . If you call PutLogEvents twice within a narrow time period using the same value for sequenceToken , both calls may be successful, or one may be rejected.

The batch of events must satisfy the following constraints:

  • The maximum batch size is 1,048,576 bytes, and this size is calculated as the sum of all event messages in UTF-8, plus 26 bytes for each log event.
  • None of the log events in the batch can be more than 2 hours in the future.
  • None of the log events in the batch can be older than 14 days or the retention period of the log group.
  • The log events in the batch must be in chronological ordered by their time stamp (the time the event occurred, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC).
  • The maximum number of log events in a batch is 10,000.
  • A batch of log events in a single request cannot span more than 24 hours. Otherwise, the operation fails.
Synopsis

Creating a Request

putLogEvents Source #

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

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

  • pleSequenceToken - The sequence token obtained from the response of the previous PutLogEvents call. An upload in a newly created log stream does not require a sequence token. You can also get the sequence token using DescribeLogStreams . If you call PutLogEvents twice within a narrow time period using the same value for sequenceToken , both calls may be successful, or one may be rejected.
  • pleLogGroupName - The name of the log group.
  • pleLogStreamName - The name of the log stream.
  • pleLogEvents - The log events.

data PutLogEvents Source #

See: putLogEvents smart constructor.

Instances
Eq PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Data PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Methods

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

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

toConstr :: PutLogEvents -> Constr #

dataTypeOf :: PutLogEvents -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Show PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Generic PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Associated Types

type Rep PutLogEvents :: Type -> Type #

Hashable PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

ToJSON PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

AWSRequest PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Associated Types

type Rs PutLogEvents :: Type #

ToHeaders PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

ToPath PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

ToQuery PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

NFData PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Methods

rnf :: PutLogEvents -> () #

type Rep PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

type Rep PutLogEvents = D1 (MetaData "PutLogEvents" "Network.AWS.CloudWatchLogs.PutLogEvents" "amazonka-cloudwatch-logs-1.6.1-3MDuvRaDmjeBjiAkGx8qXs" False) (C1 (MetaCons "PutLogEvents'" PrefixI True) ((S1 (MetaSel (Just "_pleSequenceToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_pleLogGroupName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)) :*: (S1 (MetaSel (Just "_pleLogStreamName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_pleLogEvents") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (List1 InputLogEvent)))))
type Rs PutLogEvents Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Request Lenses

pleSequenceToken :: Lens' PutLogEvents (Maybe Text) Source #

The sequence token obtained from the response of the previous PutLogEvents call. An upload in a newly created log stream does not require a sequence token. You can also get the sequence token using DescribeLogStreams . If you call PutLogEvents twice within a narrow time period using the same value for sequenceToken , both calls may be successful, or one may be rejected.

pleLogGroupName :: Lens' PutLogEvents Text Source #

The name of the log group.

pleLogStreamName :: Lens' PutLogEvents Text Source #

The name of the log stream.

Destructuring the Response

putLogEventsResponse Source #

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

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

data PutLogEventsResponse Source #

See: putLogEventsResponse smart constructor.

Instances
Eq PutLogEventsResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Data PutLogEventsResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Methods

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

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

toConstr :: PutLogEventsResponse -> Constr #

dataTypeOf :: PutLogEventsResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read PutLogEventsResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Show PutLogEventsResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Generic PutLogEventsResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Associated Types

type Rep PutLogEventsResponse :: Type -> Type #

NFData PutLogEventsResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

Methods

rnf :: PutLogEventsResponse -> () #

type Rep PutLogEventsResponse Source # 
Instance details

Defined in Network.AWS.CloudWatchLogs.PutLogEvents

type Rep PutLogEventsResponse = D1 (MetaData "PutLogEventsResponse" "Network.AWS.CloudWatchLogs.PutLogEvents" "amazonka-cloudwatch-logs-1.6.1-3MDuvRaDmjeBjiAkGx8qXs" False) (C1 (MetaCons "PutLogEventsResponse'" PrefixI True) (S1 (MetaSel (Just "_plersRejectedLogEventsInfo") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe RejectedLogEventsInfo)) :*: (S1 (MetaSel (Just "_plersNextSequenceToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_plersResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int))))

Response Lenses

plersResponseStatus :: Lens' PutLogEventsResponse Int Source #

  • - | The response status code.