EventHubEvent Class

A concrete implementation of Event Hub message type.

Inheritance
azure.functions._abc.EventHubEvent
EventHubEvent

Constructor

EventHubEvent(*, body: bytes, trigger_metadata: Optional[Mapping[str, azure.functions.meta.Datum]] = None, enqueued_time: Optional[datetime.datetime] = None, partition_key: Optional[str] = None, sequence_number: Optional[int] = None, offset: Optional[str] = None, iothub_metadata: Optional[Mapping[str, str]] = None)

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

typing.Mapping[str, object] Return the Python dictionary of trigger metadata

offset

partition_key

sequence_number