Skip to content

EventBridgeClient.put_events

rboto-eventbridge==0.4.0 · Service index · Types

Model summary (excerpt): Sends custom events to Amazon EventBridge so that they can be matched to rules. You can batch multiple event entries into one request for efficiency. However, the total entry size must be less than 1MB. You can calculate the entry size before you send the events. For more information, see Calculating PutEvents event entry size in the Amazon EventBridge User Guide . PutEvents accepts the data...

Install and imports

python -m pip install "rboto[eventbridge]==0.4.0"
from rboto import EventBridgeClient
from collections.abc import Sequence
from rboto_eventbridge.types import (
    PutEventsOutput,
    PutEventsRequestEntry,
)

Signature

async def put_events(
    *,
    entries: Sequence[PutEventsRequestEntry],
    endpoint_id: str | None = None,
) -> PutEventsOutput: ...

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)
entries Yes The entry that defines an event in your system. You can specify several parameters for the entry such as the source and type of the event, resources associated with the event, and so on.
endpoint_id No The URL subdomain of the endpoint. For example, if the URL for Endpoint is https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is abcde.veo . When using Java, you must include auth-crt on the class path.

Output

PutEventsOutput.

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
failed_entry_count int Always present —
entries list[PutEventsResultEntryOutput] | None Always present PutEventsResultEntryOutput

| 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.

PutEventsOutput, PutEventsRequestEntry

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_eventbridge.exceptions:

InternalError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Example

Complete, type-checked service example. Replace its placeholders and configure credentials before running it.

import asyncio

from rboto import EventBridgeClient
from rboto_eventbridge.types import PutEventsRequestEntry


async def main() -> None:
    client = EventBridgeClient(region="us-east-1")
    entry: PutEventsRequestEntry = {
        "event_bus_name": "default",
        "source": "example.orders",
        "detail_type": "OrderCreated",
        "detail": '{"order_id":"123"}',
    }
    response = await client.put_events(entries=[entry])
    if response.failed_entry_count:
        raise RuntimeError(f"Event publication failed: {response.entries}")
    print(response.entries)


if __name__ == "__main__":
    asyncio.run(main())

Service guide · Pinned model