EventHubEvent Class
A concrete implementation of Event Hub message type.
- Inheritance
-
azure.functions._abc.EventHubEventEventHubEvent
Constructor
EventHubEvent(*, body: bytes, trigger_metadata: Mapping[str, Datum] = None, enqueued_time: datetime | None = None, partition_key: str | None = None, sequence_number: int | None = None, offset: str | None = None, iothub_metadata: Mapping[str, str] | None = None)
Keyword-Only Parameters
Name | Description |
---|---|
body
Required
|
|
trigger_metadata
Required
|
|
enqueued_time
Required
|
|
partition_key
Required
|
|
sequence_number
Required
|
|
offset
Required
|
|
iothub_metadata
Required
|
|
Methods
get_body |
get_body
get_body() -> bytes
Attributes
enqueued_time
iothub_metadata
metadata
Getting read-only trigger metadata in a Python dictionary.
Exposing the raw trigger_metadata to our customer. For cardinality=many scenarios, each event points to the common metadata of all the events.
So when using metadata field when cardinality=many, it only needs to take one of the events to get all the data (e.g. events[0].metadata).
Returns:
typing.Mapping[str, object] Return the Python dictionary of trigger metadata
offset
partition_key
sequence_number
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for Python
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for