EventBridgeV2 / Client / put_events
put_events¶
- EventBridgeV2.Client.put_events(**kwargs)¶
Publishes events to an event bus.
See also: AWS API Documentation
Request Syntax
response = client.put_events( EventBusArn='string', Entries=[ { 'Source': 'string', 'DetailType': 'string', 'Detail': 'string', 'Resources': [ 'string', ], 'Time': datetime(2015, 1, 1), 'SystemMetadata': { 'EventGroupId': 'string', 'DeduplicationId': '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 PutEvents request.
Source (string) – [REQUIRED]
The source of the event. The
aws.value prefix is service-reserved and cannot be used as a value.DetailType (string) – [REQUIRED]
Free-form detail-type classifying an event within its source.
Detail (string) –
The event payload, as a valid JSON string.
Resources (list) –
ARNs of resources the event concerns. Included in the event delivered to subscribers.
(string) –
Time (datetime) –
The time the event occurred. Defaults to the time the service receives the event when omitted.
SystemMetadata (dict) –
System metadata for PutEvents entries. ContentType is not applicable (always application/eventbridge+json, set server-side).
EventGroupId (string) –
Event group ID for FIFO ordering.
DeduplicationId (string) –
Deduplication ID for FIFO deduplication.
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.
EventId (string) –
Unique event ID assigned by the service.
SequenceNumber (string) –
Sequence number assigned to the message for ordering within the message group.
SuccessCode (string) –
Indicates the outcome for a successfully processed publish entry.
ErrorCode (string) –
Error code identifying why a publish batch entry failed.
ErrorMessage (string) –
Human-readable explanation of why a publish batch entry failed.
Exceptions