Skip to main content

resource_event_hub_consumer_groups

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

Overview

Nameresource_event_hub_consumer_groups
TypeResource
Idazure.iot_hub.resource_event_hub_consumer_groups

Fields

The following fields are returned by SELECT queries:

This is a synchronous operation. The body contains a JSON-serialized consumer group.

NameDatatypeDescription
idstringThe Event Hub-compatible consumer group identifier.
namestringThe Event Hub-compatible consumer group name.
etagstringThe etag.
propertiesobjectThe tags.
typestringthe resource type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, resourceName, eventHubEndpointName, nameapi-versionGet a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
listselectsubscriptionId, resourceGroupName, resourceName, eventHubEndpointNameapi-versionGet a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.
createinsertsubscriptionId, resourceGroupName, resourceName, eventHubEndpointName, name, data__propertiesapi-versionAdd a consumer group to an Event Hub-compatible endpoint in an IoT hub.
deletedeletesubscriptionId, resourceGroupName, resourceName, eventHubEndpointName, nameapi-versionDelete a consumer group from an Event Hub-compatible endpoint in an IoT hub.

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
eventHubEndpointNamestringThe name of the Event Hub-compatible endpoint in the IoT hub.
namestringThe name of the consumer group to delete.
resourceGroupNamestringThe name of the resource group that contains the IoT hub.
resourceNamestringThe name of the IoT hub.
subscriptionIdstringThe subscription identifier.
api-versionstringThe version of the API.

SELECT examples

Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.

SELECT
id,
name,
etag,
properties,
type
FROM azure.iot_hub.resource_event_hub_consumer_groups
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND eventHubEndpointName = '{{ eventHubEndpointName }}' -- required
AND name = '{{ name }}' -- required
AND api-version = '{{ api-version }}'
;

INSERT examples

Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.

INSERT INTO azure.iot_hub.resource_event_hub_consumer_groups (
data__properties,
subscriptionId,
resourceGroupName,
resourceName,
eventHubEndpointName,
name,
api-version
)
SELECT
'{{ properties }}' /* required */,
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ eventHubEndpointName }}',
'{{ name }}',
'{{ api-version }}'
RETURNING
id,
name,
etag,
properties,
type
;

DELETE examples

Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.

DELETE FROM azure.iot_hub.resource_event_hub_consumer_groups
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND resourceName = '{{ resourceName }}' --required
AND eventHubEndpointName = '{{ eventHubEndpointName }}' --required
AND name = '{{ name }}' --required
AND api-version = '{{ api-version }}'
;