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
Colabore connosco no GitHub
A origem deste conteúdo pode ser encontrada no GitHub, onde também pode criar e rever problemas e pedidos Pull. Para mais informações, consulte o nosso guia do contribuidor.
Azure SDK for Python