ServiceBusMessage Class
An HTTP response object.
- Inheritance
-
azure.functions._servicebus.ServiceBusMessageServiceBusMessage
Constructor
ServiceBusMessage(*, body: bytes, trigger_metadata: Mapping[str, Any] = None, content_type: str | None = None, correlation_id: str | None = None, delivery_count: int | None = 0, enqueued_time_utc: datetime | None = None, expiration_time: datetime | None = None, expires_at_utc: datetime | None = None, label: str | None = None, message_id: str, partition_key: str | None = None, reply_to: str | None = None, reply_to_session_id: str | None = None, scheduled_enqueue_time: datetime | None = None, session_id: str | None = None, time_to_live: timedelta | None = None, to: str | None = None, user_properties: Dict[str, object])
Keyword-Only Parameters
Name | Description |
---|---|
body
Required
|
|
trigger_metadata
Required
|
|
content_type
Required
|
|
correlation_id
Required
|
|
delivery_count
Required
|
|
enqueued_time_utc
Required
|
|
expiration_time
Required
|
|
expires_at_utc
Required
|
|
label
Required
|
|
message_id
Required
|
|
partition_key
Required
|
|
reply_to
Required
|
|
reply_to_session_id
Required
|
|
scheduled_enqueue_time
Required
|
|
session_id
Required
|
|
time_to_live
Required
|
|
to
Required
|
|
user_properties
Required
|
|
Methods
get_body |
get_body
get_body() -> bytes
Attributes
content_type
correlation_id
delivery_count
enqueued_time_utc
expiration_time
expires_at_utc
label
message_id
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
partition_key
reply_to
reply_to_session_id
scheduled_enqueue_time
session_id
time_to_live
to
user_properties
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Azure SDK for Python