Skip to main content

consumer_groups

Creates, updates, deletes, gets or lists a consumer_groups resource.

Overview

Nameconsumer_groups
TypeResource
Idazure.event_hub.consumer_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
createdAtstring (date-time)Exact time the message was created.
locationstringThe geo-location where the resource lives.
systemDataobjectThe system meta data relating to this resource.
typestringThe type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs".
updatedAtstring (date-time)The exact time the message was updated.
userMetadatastringUser Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, namespace_name, event_hub_name, consumer_group_name, subscription_idGets a description for the specified consumer group.
list_by_event_hubselectresource_group_name, namespace_name, event_hub_name, subscription_id$skip, $topGets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
create_or_updateinsertresource_group_name, namespace_name, event_hub_name, consumer_group_name, subscription_idCreates or updates an Event Hubs consumer group as a nested resource within a Namespace.
create_or_updatereplaceresource_group_name, namespace_name, event_hub_name, consumer_group_name, subscription_idCreates or updates an Event Hubs consumer group as a nested resource within a Namespace.
deletedeleteresource_group_name, namespace_name, event_hub_name, consumer_group_name, subscription_idDeletes a consumer group from the specified Event Hub and resource group.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
consumer_group_namestringThe consumer group name. Required.
event_hub_namestringThe Event Hub name. Required.
namespace_namestringThe Namespace name. Required.
resource_group_namestringName of the resource group within the azure subscription. Required.
subscription_idstring
$skipintegerSkip 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.
$topintegerMay be used to limit the number of results to the most recent N usageDetails. Default value is None.

SELECT examples

Gets a description for the specified consumer group.

SELECT
id,
name,
createdAt,
location,
systemData,
type,
updatedAt,
userMetadata
FROM azure.event_hub.consumer_groups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND namespace_name = '{{ namespace_name }}' -- required
AND event_hub_name = '{{ event_hub_name }}' -- required
AND consumer_group_name = '{{ consumer_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

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

INSERT INTO azure.event_hub.consumer_groups (
properties,
resource_group_name,
namespace_name,
event_hub_name,
consumer_group_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ namespace_name }}',
'{{ event_hub_name }}',
'{{ consumer_group_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;

REPLACE examples

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

REPLACE azure.event_hub.consumer_groups
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND event_hub_name = '{{ event_hub_name }}' --required
AND consumer_group_name = '{{ consumer_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;

DELETE examples

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

DELETE FROM azure.event_hub.consumer_groups
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND namespace_name = '{{ namespace_name }}' --required
AND event_hub_name = '{{ event_hub_name }}' --required
AND consumer_group_name = '{{ consumer_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;