| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.CloudWatchLogs.PutLogEvents
Description
Uploads a batch of log events to the specified log stream.
The sequence token is now ignored in PutLogEvents actions.
PutLogEvents actions are always accepted and never return
InvalidSequenceTokenException or DataAlreadyAcceptedException even
if the sequence token is not valid. You can use parallel PutLogEvents
actions on the same log stream.
The batch of events must satisfy the following constraints:
- The maximum batch size is 1,048,576 bytes. 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 more than 14 days in the past. Also, none of the log events can be from earlier than the retention period of the log group.
- The log events in the batch must be in chronological order by their
timestamp. The timestamp is the time that the event occurred,
expressed as the number of milliseconds after
Jan 1, 1970 00:00:00 UTC. (In Amazon Web Services Tools for PowerShell and the Amazon Web Services SDK for .NET, the timestamp is specified in .NET format:yyyy-mm-ddThh:mm:ss. For example,2017-09-15T13:45:30.) - A batch of log events in a single request cannot span more than 24 hours. Otherwise, the operation fails.
- The maximum number of log events in a batch is 10,000.
- The quota of five requests per second per log stream has been
removed. Instead,
PutLogEventsactions are throttled based on a per-second per-account quota. You can request an increase to the per-second throttling quota by using the Service Quotas service.
If a call to PutLogEvents returns "UnrecognizedClientException" the
most likely cause is a non-valid Amazon Web Services access key ID or
secret key.
Synopsis
- data PutLogEvents = PutLogEvents' {}
- newPutLogEvents :: Text -> Text -> NonEmpty InputLogEvent -> PutLogEvents
- putLogEvents_sequenceToken :: Lens' PutLogEvents (Maybe Text)
- putLogEvents_logGroupName :: Lens' PutLogEvents Text
- putLogEvents_logStreamName :: Lens' PutLogEvents Text
- putLogEvents_logEvents :: Lens' PutLogEvents (NonEmpty InputLogEvent)
- data PutLogEventsResponse = PutLogEventsResponse' {}
- newPutLogEventsResponse :: Int -> PutLogEventsResponse
- putLogEventsResponse_nextSequenceToken :: Lens' PutLogEventsResponse (Maybe Text)
- putLogEventsResponse_rejectedLogEventsInfo :: Lens' PutLogEventsResponse (Maybe RejectedLogEventsInfo)
- putLogEventsResponse_httpStatus :: Lens' PutLogEventsResponse Int
Creating a Request
data PutLogEvents Source #
See: newPutLogEvents smart constructor.
Constructors
| PutLogEvents' | |
Fields
| |
Instances
Arguments
| :: Text | |
| -> Text | |
| -> NonEmpty InputLogEvent | |
| -> PutLogEvents |
Create a value of PutLogEvents 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:sequenceToken:PutLogEvents', putLogEvents_sequenceToken - The sequence token obtained from the response of the previous
PutLogEvents call.
The sequenceToken parameter is now ignored in PutLogEvents actions.
PutLogEvents actions are now accepted and never return
InvalidSequenceTokenException or DataAlreadyAcceptedException even
if the sequence token is not valid.
PutLogEvents, putLogEvents_logGroupName - The name of the log group.
PutLogEvents, putLogEvents_logStreamName - The name of the log stream.
$sel:logEvents:PutLogEvents', putLogEvents_logEvents - The log events.
Request Lenses
putLogEvents_sequenceToken :: Lens' PutLogEvents (Maybe Text) Source #
The sequence token obtained from the response of the previous
PutLogEvents call.
The sequenceToken parameter is now ignored in PutLogEvents actions.
PutLogEvents actions are now accepted and never return
InvalidSequenceTokenException or DataAlreadyAcceptedException even
if the sequence token is not valid.
putLogEvents_logGroupName :: Lens' PutLogEvents Text Source #
The name of the log group.
putLogEvents_logStreamName :: Lens' PutLogEvents Text Source #
The name of the log stream.
putLogEvents_logEvents :: Lens' PutLogEvents (NonEmpty InputLogEvent) Source #
The log events.
Destructuring the Response
data PutLogEventsResponse Source #
See: newPutLogEventsResponse smart constructor.
Constructors
| PutLogEventsResponse' | |
Fields
| |
Instances
newPutLogEventsResponse Source #
Arguments
| :: Int | |
| -> PutLogEventsResponse |
Create a value of PutLogEventsResponse 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:nextSequenceToken:PutLogEventsResponse', putLogEventsResponse_nextSequenceToken - The next sequence token.
This field has been deprecated.
The sequence token is now ignored in PutLogEvents actions.
PutLogEvents actions are always accepted even if the sequence token is
not valid. You can use parallel PutLogEvents actions on the same log
stream and you do not need to wait for the response of a previous
PutLogEvents action to obtain the nextSequenceToken value.
$sel:rejectedLogEventsInfo:PutLogEventsResponse', putLogEventsResponse_rejectedLogEventsInfo - The rejected events.
$sel:httpStatus:PutLogEventsResponse', putLogEventsResponse_httpStatus - The response's http status code.
Response Lenses
putLogEventsResponse_nextSequenceToken :: Lens' PutLogEventsResponse (Maybe Text) Source #
The next sequence token.
This field has been deprecated.
The sequence token is now ignored in PutLogEvents actions.
PutLogEvents actions are always accepted even if the sequence token is
not valid. You can use parallel PutLogEvents actions on the same log
stream and you do not need to wait for the response of a previous
PutLogEvents action to obtain the nextSequenceToken value.
putLogEventsResponse_rejectedLogEventsInfo :: Lens' PutLogEventsResponse (Maybe RejectedLogEventsInfo) Source #
The rejected events.
putLogEventsResponse_httpStatus :: Lens' PutLogEventsResponse Int Source #
The response's http status code.