amazonka-cloudwatch-logs-1.6.0: 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 #

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 #

See: putLogEvents smart constructor.

Instances

Eq PutLogEvents # 
Data 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 # 
Show PutLogEvents # 
Generic PutLogEvents # 

Associated Types

type Rep PutLogEvents :: * -> * #

Hashable PutLogEvents # 
ToJSON PutLogEvents # 
NFData PutLogEvents # 

Methods

rnf :: PutLogEvents -> () #

AWSRequest PutLogEvents # 
ToHeaders PutLogEvents # 
ToPath PutLogEvents # 
ToQuery PutLogEvents # 
type Rep PutLogEvents # 
type Rep PutLogEvents = D1 * (MetaData "PutLogEvents" "Network.AWS.CloudWatchLogs.PutLogEvents" "amazonka-cloudwatch-logs-1.6.0-HKcajwmKjdx6seMLJU2od6" False) (C1 * (MetaCons "PutLogEvents'" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "_pleSequenceToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (Maybe Text))) (S1 * (MetaSel (Just Symbol "_pleLogGroupName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text))) ((:*:) * (S1 * (MetaSel (Just Symbol "_pleLogStreamName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Text)) (S1 * (MetaSel (Just Symbol "_pleLogEvents") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * (List1 InputLogEvent))))))
type Rs PutLogEvents # 

Request Lenses

pleSequenceToken :: Lens' PutLogEvents (Maybe Text) #

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 #

The name of the log group.

pleLogStreamName :: Lens' PutLogEvents Text #

The name of the log stream.

Destructuring the Response

putLogEventsResponse #

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 #

See: putLogEventsResponse smart constructor.

Instances

Eq PutLogEventsResponse # 
Data PutLogEventsResponse # 

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 # 
Show PutLogEventsResponse # 
Generic PutLogEventsResponse # 
NFData PutLogEventsResponse # 

Methods

rnf :: PutLogEventsResponse -> () #

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

Response Lenses

plersResponseStatus :: Lens' PutLogEventsResponse Int #

  • - | The response status code.