Partilhar via


ConsumerGroupsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

EventHubManagementClient's

<xref:consumer_groups> attribute.

Inheritance
builtins.object
ConsumerGroupsOperations

Constructor

ConsumerGroupsOperations(*args, **kwargs)

Methods

create_or_update

Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.

delete

Deletes a consumer group from the specified Event Hub and resource group.

get

Gets a description for the specified consumer group.

list_by_event_hub

Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.

create_or_update

Creates or updates an Event Hubs consumer group as a nested resource within a Namespace.

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

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.

consumer_group_name
Required
str

The consumer group name. Required.

parameters
Required

Parameters supplied to create or update a consumer group resource. Is either a ConsumerGroup type or a IO[bytes] type. Required.

Returns

Type Description

ConsumerGroup or the result of cls(response)

Exceptions

Type Description

delete

Deletes a consumer group from the specified Event Hub and resource group.

delete(resource_group_name: str, namespace_name: str, event_hub_name: str, consumer_group_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.

consumer_group_name
Required
str

The consumer group name. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

Gets a description for the specified consumer group.

get(resource_group_name: str, namespace_name: str, event_hub_name: str, consumer_group_name: str, **kwargs: Any) -> ConsumerGroup

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.

consumer_group_name
Required
str

The consumer group name. Required.

Returns

Type Description

ConsumerGroup or the result of cls(response)

Exceptions

Type Description

list_by_event_hub

Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.

list_by_event_hub(resource_group_name: str, namespace_name: str, event_hub_name: str, skip: int | None = None, top: int | None = None, **kwargs: Any) -> Iterable[ConsumerGroup]

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.

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 ConsumerGroup or the result of cls(response)

Exceptions

Type Description

Attributes

models

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