CloudWatchLogsClient.put_log_events
rboto-cloudwatch-logs==0.4.0 · Service index · Types
Model summary (excerpt): 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...
Install and imports
from rboto import CloudWatchLogsClient
from collections.abc import Sequence
from rboto_cloudwatch_logs.types import (
Entity,
InputLogEvent,
PutLogEventsOutput,
)
Signature
async def put_log_events(
*,
log_group_name: str,
log_stream_name: str,
log_events: Sequence[InputLogEvent],
sequence_token: str | None = None,
entity: Entity | None = None,
) -> PutLogEventsOutput: ...
Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.
Arguments
| Argument | Required | Model notes (excerpt) |
|---|---|---|
log_group_name |
Yes | The name of the log group. |
log_stream_name |
Yes | The name of the log stream. |
log_events |
Yes | The log events. |
sequence_token |
No | 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. |
entity |
No | The entity associated with the log events. |
Output
PutLogEventsOutput.
Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.
| Field | Type | Presence | References |
|---|---|---|---|
next_sequence_token |
str | None |
Always present | — |
rejected_log_events_info |
RejectedLogEventsInfoOutput | None |
Always present | RejectedLogEventsInfoOutput |
rejected_entity_info |
RejectedEntityInfoOutput | None |
Always present | RejectedEntityInfoOutput |
| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.
Related types
Entity, InputLogEvent, PutLogEventsOutput
Follow these links for nested inputs and outputs; recursive types link back to the same type page.
Pagination and streaming
No generated paginator for this operation.
No output stream.
Errors
Import from rboto_cloudwatch_logs.exceptions:
DataAlreadyAcceptedError, InvalidParameterError, InvalidSequenceTokenError, ResourceNotFoundError, ServiceUnavailableError, UnrecognizedClientError.
Other service failures use the service base error; credential, transport and timeout failures use shared errors.