EventHubEvent Class

A concrete implementation of Event Hub message type.

Inheritance
azure.functions._abc.EventHubEvent
EventHubEvent

Constructor

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

Methods

get_body

get_body

get_body() -> bytes

Attributes

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