Skip to content

AzureeventgridClient

Attributes

EventSchema module-attribute

EventSchema = List[Dict[str, Any]]

TRIGGER_OPERATIONS module-attribute

TRIGGER_OPERATIONS: Dict[str, Dict[str, Any]] = {'CreateSubscription': {'operation_id': 'CreateSubscription', 'path': '/{connectionId}/subscriptions/{subscriptionId}/providers/{resourceType}/resource/eventSubscriptions', 'method': 'post', 'required_parameters': ['subscriptionId', 'resourceType', 'body'], 'callback_payload_type': None}}

Classes

SubscriptionListResult dataclass

SubscriptionListResult(*, value: Optional[List[Subscription | Mapping[str, Any]]] = None)

Response for List subscriptions

Attributes

value class-attribute instance-attribute
value: Optional[List[Subscription | Mapping[str, Any]]] = dataclass_field(default=None, kw_only=True)

The subscriptions available to the user.

TopicTypesResponse dataclass

TopicTypesResponse(*, value: Optional[List[Dict[str, Any]]] = None)

Response for TopicTypes_List

EventRequest dataclass

EventRequest(properties: Dict[str, Any])

Definition: EventRequest

EventTypesResponse dataclass

EventTypesResponse(*, value: Optional[List[Dict[str, Any]]] = None)

Definition: EventTypesResponse

ResourceNameResponse dataclass

ResourceNameResponse(*, value: Optional[List[Dict[str, Any]]] = None)

Definition: ResourceNameResponse

Subscription dataclass

Subscription(*, id: Optional[str] = None, subscription_id: Optional[str] = None, display_name: Optional[str] = None)

Definition: Subscription

Attributes

id class-attribute instance-attribute
id: Optional[str] = dataclass_field(default=None, kw_only=True)

The fully qualified Id. For example, /subscriptions/00000000-0000-0000-0000-000000000000.

subscription_id class-attribute instance-attribute
subscription_id: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'subscriptionId'})

The subscription Id.

display_name class-attribute instance-attribute
display_name: Optional[str] = dataclass_field(default=None, kw_only=True, metadata={'wire_name': 'displayName'})

The subscription display name.

AzureeventgridClient

AzureeventgridClient(connection_runtime_url: str, credential: AsyncTokenCredential | AzureKeyCredential, *, max_retry_attempts: int = 3, timeout: float = 30.0, use_exponential_backoff: bool = True, initial_retry_delay_seconds: float = 0.5, maximum_retry_delay_seconds: float = 120.0, retry_jitter_factor: float = 0.1, retry_unsafe_http_methods: bool = False, transport: Optional[AsyncHttpTransport] = None, **kwargs: Any)

Bases: ConnectorClientBase

Typed client for azureeventgrid connector.

Initialize a AzureeventgridClient.

Parameters:

Name Type Description Default
connection_runtime_url str

The connection runtime URL from Azure Portal.

required
credential AsyncTokenCredential | AzureKeyCredential

Caller-owned Azure Core credential.

required
max_retry_attempts int

The maximum number of request attempts.

3
timeout float

The network timeout in seconds for each request. The value configures Azure Core retry and transport deadlines. Nonpositive values disable SDK and transport deadlines.

30.0
use_exponential_backoff bool

Whether retries use exponential backoff.

True
initial_retry_delay_seconds float

The initial retry delay in seconds.

0.5
maximum_retry_delay_seconds float

The maximum retry delay in seconds.

120.0
retry_jitter_factor float

The jitter fraction applied to retry delays.

0.1
retry_unsafe_http_methods bool

Whether unsafe HTTP methods may be retried.

False
transport Optional[AsyncHttpTransport]

Optional Azure Core async HTTP transport closed by the client through its asynchronous lifecycle.

None
**kwargs Any

Optional Azure Core pipeline policy settings.

{}

Methods:

list_subscriptions
list_subscriptions(*, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]

List subscriptions

Gets a list of all the subscriptions to which the principal has access.

Returns a single-page Azure Core async collection.

Swagger operation ID: Subscriptions_List.

Parameters:

Name Type Description Default
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
AsyncItemPaged[dict[str, Any]]

AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector results. Consume it with async for.

Raises:

Type Description
ConnectorException

If the connector request fails.

list_topic_types
list_topic_types(*, timeout: Optional[float] = None, headers: Optional[Mapping[str, str]] = None, client_request_id: Optional[str] = None, response_hook: Optional[ConnectorResponseHook] = None) -> AsyncItemPaged[dict[str, Any]]

TopicTypes_List

Returns a single-page Azure Core async collection.

Swagger operation ID: TopicTypes_List.

Parameters:

Name Type Description Default
timeout Optional[float]

The request timeout in seconds.

None
headers Optional[Mapping[str, str]]

Additional HTTP request headers.

None
client_request_id Optional[str]

A caller-provided request identifier.

None
response_hook Optional[ConnectorResponseHook]

A callback invoked with the connector response.

None

Returns:

Type Description
AsyncItemPaged[dict[str, Any]]

AsyncItemPaged[dict[str, Any]]: An Azure Core pager over connector results. Consume it with async for.

Raises:

Type Description
ConnectorException

If the connector request fails.