Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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
- putLogEvents :: Text -> Text -> NonEmpty InputLogEvent -> PutLogEvents
- data PutLogEvents
- pleSequenceToken :: Lens' PutLogEvents (Maybe Text)
- pleLogGroupName :: Lens' PutLogEvents Text
- pleLogStreamName :: Lens' PutLogEvents Text
- pleLogEvents :: Lens' PutLogEvents (NonEmpty InputLogEvent)
- putLogEventsResponse :: Int -> PutLogEventsResponse
- data PutLogEventsResponse
- plersRejectedLogEventsInfo :: Lens' PutLogEventsResponse (Maybe RejectedLogEventsInfo)
- plersNextSequenceToken :: Lens' PutLogEventsResponse (Maybe Text)
- plersResponseStatus :: Lens' PutLogEventsResponse Int
Creating a Request
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 previousPutLogEvents
call. An upload in a newly created log stream does not require a sequence token. You can also get the sequence token usingDescribeLogStreams
. If you callPutLogEvents
twice within a narrow time period using the same value forsequenceToken
, 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
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.
pleLogEvents :: Lens' PutLogEvents (NonEmpty InputLogEvent) Source #
The log events.
Destructuring the Response
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:
plersRejectedLogEventsInfo
- The rejected events.plersNextSequenceToken
- The next sequence token.plersResponseStatus
- -- | The response status code.
data PutLogEventsResponse Source #
See: putLogEventsResponse
smart constructor.
Instances
Response Lenses
plersRejectedLogEventsInfo :: Lens' PutLogEventsResponse (Maybe RejectedLogEventsInfo) Source #
The rejected events.
plersNextSequenceToken :: Lens' PutLogEventsResponse (Maybe Text) Source #
The next sequence token.
plersResponseStatus :: Lens' PutLogEventsResponse Int Source #
- - | The response status code.