EventBridgeV2 / Client / put_raw_events

put_raw_events

EventBridgeV2.Client.put_raw_events(**kwargs)

Publishes pre-shaped events to an event bus.

See also: AWS API Documentation

Request Syntax

response = client.put_raw_events(
    EventBusArn='string',
    Entries=[
        {
            'Data': b'bytes',
            'Metadata': {
                'string': 'string'
            },
            'SystemMetadata': {
                'ContentType': 'string',
                'DeduplicationId': 'string',
                'EventGroupId': 'string'
            }
        },
    ],
    SchemaRegistryConfiguration={
        'RegistryUri': 'string',
        'ConfluentPublicRegistryConfiguration': {
            'ConnectionArn': 'string'
        }
    },
    DeduplicationConfiguration={
        'DeduplicationType': 'CONTENT_BASED'
    }
)
Parameters:
  • EventBusArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) that uniquely identifies an event bus.

  • Entries (list) –

    [REQUIRED]

    List of event entries to publish. Must contain at least one entry.

    • (dict) –

      A single event entry in a raw publish request.

      • Data (bytes) – [REQUIRED]

        The event data as a base64-encoded blob. Supports binary formats.

      • Metadata (dict) –

        Metadata key-value pairs you define. Keys must be 1-128 characters and must not contain “/”.

        • (string) –

          Customer-defined metadata field name. Must be 1-128 characters and must not contain “/”.

          • (string) –

            Customer-defined metadata field value.

      • SystemMetadata (dict) – [REQUIRED]

        Structured system metadata with defined properties.

        • ContentType (string) – [REQUIRED]

          Content type of the event data (e.g., “application/cloudevents+json”).

        • DeduplicationId (string) –

          Deduplication ID for FIFO deduplication.

        • EventGroupId (string) –

          Event group ID for FIFO ordering.

  • SchemaRegistryConfiguration (dict) –

    Schema-registry settings for encoding open-format (Avro/Protobuf) events. Required for open-format entries; ignored for JSON entries. The registry is read with the caller’s credentials, so the caller needs read access to the registry it references.

    • RegistryUri (string) – [REQUIRED]

      Glue Schema Registry ARN, or Confluent Cloud HTTPS URL.

    • ConfluentPublicRegistryConfiguration (dict) –

      Required when RegistryUri is an HTTPS URL. Provides Connection-based auth for Confluent Cloud.

      • ConnectionArn (string) – [REQUIRED]

        EventBridge Connection ARN that provides API Key or OAuth credentials for the registry.

  • DeduplicationConfiguration (dict) –

    Request-level deduplication settings, applied to every entry in the batch.

    • DeduplicationType (string) – [REQUIRED]

      How duplicate events are detected: by a hash of the event content (CONTENT_BASED). To deduplicate by a caller-supplied token instead, omit DeduplicationConfiguration and set DeduplicationId on each entry.

Return type:

dict

Returns:

Response Syntax

{
    'FailedEntryCount': 123,
    'Entries': [
        {
            'EventId': 'string',
            'SequenceNumber': 'string',
            'SuccessCode': 'PUBLISHED'|'DEDUPLICATED',
            'ErrorCode': 'string',
            'ErrorMessage': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • FailedEntryCount (integer) –

      The number of entries in the batch that failed to be published.

    • Entries (list) –

      List of per-entry publish results, in the same order as the request entries.

      • (dict) –

        Result entry for a published event. The position of each entry in the response list aligns 1:1 with the corresponding request entry, enabling co-location by index.

        • EventId (string) –

          Unique event ID assigned by the service. Present on successful entries.

        • SequenceNumber (string) –

          Sequence number for ordering within the event group.

        • SuccessCode (string) –

          Indicates how the entry was processed. Present only on successful entries.

        • ErrorCode (string) –

          Error code if the entry failed.

        • ErrorMessage (string) –

          Error message if the entry failed.

Exceptions

  • EventBridgeV2.Client.exceptions.AccessDeniedException

  • EventBridgeV2.Client.exceptions.ResourceNotFoundException

  • EventBridgeV2.Client.exceptions.ThrottlingException

  • EventBridgeV2.Client.exceptions.InvalidInputException

  • EventBridgeV2.Client.exceptions.SchemaRegistryUnavailableException

  • EventBridgeV2.Client.exceptions.InternalException

  • EventBridgeV2.Client.exceptions.InvalidStateException