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
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure SDK for Python