consumer_groups
Creates, updates, deletes, gets or lists a consumer_groups resource.
Overview
| Name | consumer_groups |
| Type | Resource |
| Id | azure.event_hub.consumer_groups |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_event_hub
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
createdAt | string (date-time) | Exact time the message was created. |
location | string | The geo-location where the resource lives. |
systemData | object | The system meta data relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs". |
updatedAt | string (date-time) | The exact time the message was updated. |
userMetadata | string | User 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. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
createdAt | string (date-time) | Exact time the message was created. |
location | string | The geo-location where the resource lives. |
systemData | object | The system meta data relating to this resource. |
type | string | The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or "Microsoft.EventHub/Namespaces/EventHubs". |
updatedAt | string (date-time) | The exact time the message was updated. |
userMetadata | string | User 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, namespace_name, event_hub_name, consumer_group_name, subscription_id | Gets a description for the specified consumer group. | |
list_by_event_hub | select | resource_group_name, namespace_name, event_hub_name, subscription_id | $skip, $top | Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace. |
create_or_update | insert | resource_group_name, namespace_name, event_hub_name, consumer_group_name, subscription_id | Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. | |
create_or_update | replace | resource_group_name, namespace_name, event_hub_name, consumer_group_name, subscription_id | Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. | |
delete | delete | resource_group_name, namespace_name, event_hub_name, consumer_group_name, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
consumer_group_name | string | The consumer group name. Required. |
event_hub_name | string | The Event Hub name. Required. |
namespace_name | string | The Namespace name. Required. |
resource_group_name | string | Name of the resource group within the azure subscription. Required. |
subscription_id | string | |
$skip | integer | 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 | integer | May be used to limit the number of results to the most recent N usageDetails. Default value is None. |
SELECT examples
- get
- list_by_event_hub
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
;
Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group exists in the Namespace.
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 subscription_id = '{{ subscription_id }}' -- required
AND $skip = '{{ $skip }}'
AND $top = '{{ $top }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: consumer_groups
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the consumer_groups resource.
- name: namespace_name
value: "{{ namespace_name }}"
description: Required parameter for the consumer_groups resource.
- name: event_hub_name
value: "{{ event_hub_name }}"
description: Required parameter for the consumer_groups resource.
- name: consumer_group_name
value: "{{ consumer_group_name }}"
description: Required parameter for the consumer_groups resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the consumer_groups resource.
- name: properties
value:
userMetadata: "{{ userMetadata }}"
REPLACE examples
- create_or_update
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
- delete
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
;