Skip to main content

consumer_groups

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

Overview

Nameconsumer_groups
TypeResource
Idazure.event_hubs.consumer_groups

Fields

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
locationstringThe geo-location where the resource lives
properties``Single item in List or Get Consumer group operation
systemDataobjectMetadata pertaining to creation and last modification of the resource.
typestringThe type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"

Methods

NameAccessible byRequired ParamsDescription
getSELECTconsumerGroupName, eventHubName, namespaceName, resourceGroupName, subscriptionIdGets a description for the specified consumer group.
list_by_event_hubSELECTeventHubName, namespaceName, resourceGroupName, subscriptionIdGets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
create_or_updateINSERTconsumerGroupName, eventHubName, namespaceName, resourceGroupName, subscriptionIdCreates or updates an Event Hubs consumer group as a nested resource within a Namespace.
deleteDELETEconsumerGroupName, eventHubName, namespaceName, resourceGroupName, subscriptionIdDeletes a consumer group from the specified Event Hub and resource group.

SELECT examples

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

SELECT
id,
name,
location,
properties,
systemData,
type
FROM azure.event_hubs.consumer_groups
WHERE eventHubName = '{{ eventHubName }}'
AND namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new consumer_groups resource.

/*+ create */
INSERT INTO azure.event_hubs.consumer_groups (
consumerGroupName,
eventHubName,
namespaceName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ consumerGroupName }}',
'{{ eventHubName }}',
'{{ namespaceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified consumer_groups resource.

/*+ delete */
DELETE FROM azure.event_hubs.consumer_groups
WHERE consumerGroupName = '{{ consumerGroupName }}'
AND eventHubName = '{{ eventHubName }}'
AND namespaceName = '{{ namespaceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';