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.

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_all

Gets all the Event Hubs in a Namespace.

list_authorization_rules

Gets the authorization rules for an Event Hub.

list_keys

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

post_authorization_rule

Gets an AuthorizationRule for an Event Hub by rule name.

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.EventHubCreateOrUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.EventHubResource

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 EventHubCreateOrUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

EventHubResource or the result of cls(response)

Exceptions

Type Description
See also

create_or_update_authorization_rule

Creates or updates an AuthorizationRule for the specified Event Hub.

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

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 SharedAccessAuthorizationRuleCreateOrUpdateParameters type or a IO[bytes] type. Required.

Returns

Type Description

SharedAccessAuthorizationRuleResource or the result of cls(response)

Exceptions

Type Description
See also

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
See also

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
See also

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) -> EventHubResource

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

EventHubResource or the result of cls(response)

Exceptions

Type Description
See also

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) -> SharedAccessAuthorizationRuleResource

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

SharedAccessAuthorizationRuleResource or the result of cls(response)

Exceptions

Type Description
See also

list_all

Gets all the Event Hubs in a Namespace.

list_all(resource_group_name: str, namespace_name: str, **kwargs: Any) -> AsyncIterable[EventHubResource]

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.

Returns

Type Description

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

Exceptions

Type Description
See also

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[SharedAccessAuthorizationRuleResource]

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 SharedAccessAuthorizationRuleResource 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) -> ResourceListKeys

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

ResourceListKeys or the result of cls(response)

Exceptions

Type Description
See also

post_authorization_rule

Gets an AuthorizationRule for an Event Hub by rule name.

async post_authorization_rule(resource_group_name: str, namespace_name: str, event_hub_name: str, authorization_rule_name: str, **kwargs: Any) -> SharedAccessAuthorizationRuleResource

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

SharedAccessAuthorizationRuleResource or the result of cls(response)

Exceptions

Type Description
See also

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.RegenerateKeysParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.ResourceListKeys

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 RegenerateKeysParameters type or a IO[bytes] type. Required.

Returns

Type Description

ResourceListKeys or the result of cls(response)

Exceptions

Type Description
See also

Attributes

models

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