EventhubsClient
Attributes
TRIGGER_OPERATIONS
module-attribute
TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'OnNewEvents': {'operation_id': 'OnNewEvents', 'path': '/{connectionId}/{eventHubName}/events/batch/head', 'method': 'get', 'required_parameters': ['eventHubName'], 'callback_payload_type': 'Event'}}
Classes
Event
dataclass
ObjectEntity
dataclass
SystemProperties
dataclass
SystemProperties(enqueued_time_utc: Optional[str] = None, offset: Optional[str] = None, partition_key: Optional[str] = None, sequence_number: Optional[int] = None)
Definition: SystemProperties
Attributes
enqueued_time_utc
class-attribute
instance-attribute
Enqueued time
offset
class-attribute
instance-attribute
Offset in a partition
partition_key
class-attribute
instance-attribute
Partition Key
SendEvent
dataclass
Definition: SendEvent
Attributes
content_data
class-attribute
instance-attribute
Content of the event
EventhubsClient
EventhubsClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for eventhubs connector.
Initialize a EventhubsClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
token_provider
|
Optional[TokenProvider]
|
Optional token provider. Defaults to ManagedIdentityTokenProvider. |
None
|
options
|
Optional[ConnectorClientOptions]
|
Optional connector client options. |
None
|
Methods:
send_event_async
async
send_event_async(input: SendEvent, event_hub_name: str, partition_key: Optional[str] = None) -> None
Send event
Send event.
send_events_async
async
Send one or more events to the Event Hub partition
Send one or more events to the Event Hub partition.
get_event_hubs_async
async
Get all Event Hubs in a namespace
Get all Event Hubs in a namespace.
get_content_types_async
async
Get all content types
Get all content types.
get_consumer_groups_async
async
Get all the consumer groups for an event hub
Get all the consumer groups for an event hub.
get_partition_keys_async
async
Get all partition keys in an Event Hub
Get all partition keys in an Event Hub.