EventHubsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

EventHubManagementClient's

<xref:event_hubs> attribute.

Inheritance
builtins.object
EventHubsOperations

Constructor

EventHubsOperations(*args, **kwargs)

Methods

create_or_update

Creates or updates a new Event Hub as a nested resource within a Namespace.

create_or_update_authorization_rule

Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.

delete

Deletes an Event Hub from the specified Namespace and resource group.

delete_authorization_rule

Deletes an Event Hub AuthorizationRule.

get

Gets an Event Hubs description for the specified Event Hub.

get_authorization_rule

Gets an AuthorizationRule for an Event Hub by rule name.

list_authorization_rules

Gets the authorization rules for an Event Hub.

list_by_namespace

Gets all the Event Hubs in a Namespace.

list_keys

Gets the ACS and SAS connection strings for the Event Hub.

regenerate_keys

Regenerates the ACS and SAS connection strings for the Event Hub.

create_or_update

Creates or updates a new Event Hub as a nested resource within a Namespace.

async create_or_update(resource_group_name: str, namespace_name: str, event_hub_name: str, parameters: _models.Eventhub, *, content_type: str = 'application/json', **kwargs: Any) -> _models.Eventhub

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

parameters
Required

Parameters supplied to create an Event Hub resource. Is either a Eventhub type or a IO[bytes] type. Required.

Returns

Type Description

Eventhub or the result of cls(response)

Exceptions

Type Description

create_or_update_authorization_rule

Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the AuthorizationRule will take a few seconds to take effect.

async create_or_update_authorization_rule(resource_group_name: str, namespace_name: str, event_hub_name: str, authorization_rule_name: str, parameters: _models.AuthorizationRule, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AuthorizationRule

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

parameters
Required

The shared access AuthorizationRule. Is either a AuthorizationRule type or a IO[bytes] type. Required.

Returns

Type Description

AuthorizationRule or the result of cls(response)

Exceptions

Type Description

delete

Deletes an Event Hub from the specified Namespace and resource group.

async delete(resource_group_name: str, namespace_name: str, event_hub_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

delete_authorization_rule

Deletes an Event Hub AuthorizationRule.

async delete_authorization_rule(resource_group_name: str, namespace_name: str, event_hub_name: str, authorization_rule_name: str, **kwargs: Any) -> None

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets an Event Hubs description for the specified Event Hub.

async get(resource_group_name: str, namespace_name: str, event_hub_name: str, **kwargs: Any) -> Eventhub

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

Returns

Type Description

Eventhub or the result of cls(response)

Exceptions

Type Description

get_authorization_rule

Gets an AuthorizationRule for an Event Hub by rule name.

async get_authorization_rule(resource_group_name: str, namespace_name: str, event_hub_name: str, authorization_rule_name: str, **kwargs: Any) -> AuthorizationRule

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

Returns

Type Description

AuthorizationRule or the result of cls(response)

Exceptions

Type Description

list_authorization_rules

Gets the authorization rules for an Event Hub.

list_authorization_rules(resource_group_name: str, namespace_name: str, event_hub_name: str, **kwargs: Any) -> AsyncIterable[AuthorizationRule]

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

Returns

Type Description

An iterator like instance of either AuthorizationRule or the result of cls(response)

Exceptions

Type Description

list_by_namespace

Gets all the Event Hubs in a Namespace.

list_by_namespace(resource_group_name: str, namespace_name: str, skip: int | None = None, top: int | None = None, **kwargs: Any) -> AsyncIterable[Eventhub]

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

skip
Required
int

Skip is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skip parameter that specifies a starting point to use for subsequent calls. Default value is None.

top
Required
int

May be used to limit the number of results to the most recent N usageDetails. Default value is None.

Returns

Type Description

An iterator like instance of either Eventhub or the result of cls(response)

Exceptions

Type Description

list_keys

Gets the ACS and SAS connection strings for the Event Hub.

async list_keys(resource_group_name: str, namespace_name: str, event_hub_name: str, authorization_rule_name: str, **kwargs: Any) -> AccessKeys

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

Returns

Type Description

AccessKeys or the result of cls(response)

Exceptions

Type Description

regenerate_keys

Regenerates the ACS and SAS connection strings for the Event Hub.

async regenerate_keys(resource_group_name: str, namespace_name: str, event_hub_name: str, authorization_rule_name: str, parameters: _models.RegenerateAccessKeyParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.AccessKeys

Parameters

Name Description
resource_group_name
Required
str

Name of the resource group within the azure subscription. Required.

namespace_name
Required
str

The Namespace name. Required.

event_hub_name
Required
str

The Event Hub name. Required.

authorization_rule_name
Required
str

The authorization rule name. Required.

parameters
Required

Parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey). Is either a RegenerateAccessKeyParameters type or a IO[bytes] type. Required.

Returns

Type Description

AccessKeys or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.eventhub.v2022_01_01_preview.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\eventhub\\v2022_01_01_preview\\models\\__init__.py'>