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

The following fields are returned by SELECT queries:

Successfully retrieved the consumer group description.

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
propertiesSingle item in List or Get Consumer group operation
systemDataobjectThe system meta data relating to this resource.
typestringThe type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs"

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, namespaceName, eventHubName, consumerGroupName, subscriptionIdGets a description for the specified consumer group.
list_by_event_hubselectresourceGroupName, namespaceName, eventHubName, subscriptionId$skip, $topGets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
create_or_updateinsertresourceGroupName, namespaceName, eventHubName, consumerGroupName, subscriptionIdCreates or updates an Event Hubs consumer group as a nested resource within a Namespace.
deletedeleteresourceGroupName, namespaceName, eventHubName, consumerGroupName, subscriptionIdDeletes 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
consumerGroupNamestringThe consumer group name
eventHubNamestringThe Event Hub name
namespaceNamestringThe Namespace name
resourceGroupNamestringName of the resource group within the azure subscription.
subscriptionIdstringSubscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
$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.
$topintegerMay be used to limit the number of results to the most recent N usageDetails.

SELECT examples

Gets a description for the specified consumer group.

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

INSERT examples

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

INSERT INTO azure.event_hubs.consumer_groups (
data__properties,
resourceGroupName,
namespaceName,
eventHubName,
consumerGroupName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ namespaceName }}',
'{{ eventHubName }}',
'{{ consumerGroupName }}',
'{{ subscriptionId }}'
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_hubs.consumer_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND namespaceName = '{{ namespaceName }}' --required
AND eventHubName = '{{ eventHubName }}' --required
AND consumerGroupName = '{{ consumerGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;