你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Iot Hub Resource - Create Event Hub Consumer Group

将使用者组添加到 IoT 中心内与事件中心兼容的终结点。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}?api-version=2023-06-30

URI 参数

名称 必需 类型 说明
eventHubEndpointName
path True

string

IoT 中心内与事件中心兼容的终结点的名称。

name
path True

string

要添加的使用者组的名称。

resourceGroupName
path True

string

包含 IoT 中心的资源组的名称。

resourceName
path True

string

IoT 中心的名称。

subscriptionId
path True

string

订阅标识符。

api-version
query True

string

API 的版本。

请求正文

名称 必需 类型 说明
properties True

EventHubConsumerGroupName

EventHub 使用者组名称。

响应

名称 类型 说明
200 OK

EventHubConsumerGroupInfo

这是一个同步操作。

Other Status Codes

ErrorDetails

DefaultErrorResponse

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

IotHubResource_CreateEventHubConsumerGroup

Sample Request

PUT https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/eventHubEndpoints/events/ConsumerGroups/test?api-version=2023-06-30

{
  "properties": {
    "name": "test"
  }
}

Sample Response

{
  "properties": {
    "created": "Thu, 15 Jun 2017 19:20:58 GMT"
  },
  "id": "/subscriptions/cmd-sub-1/resourceGroups/cmd-rg-1/providers/Microsoft.Devices/IotHubs/test-hub-2/eventHubEndpoints/events/ConsumerGroups/%24Default",
  "name": "test",
  "type": "Microsoft.Devices/IotHubs/EventHubEndpoints/ConsumerGroups",
  "etag": "AAAAAAFD6M4="
}

定义

名称 说明
ErrorDetails

错误详细信息。

EventHubConsumerGroupBodyDescription

EventHub 使用者组。

EventHubConsumerGroupInfo

EventHubConsumerGroupInfo 对象的属性。

EventHubConsumerGroupName

EventHub 使用者组名称。

ErrorDetails

错误详细信息。

名称 类型 说明
code

string

错误代码。

details

string

错误详细信息。

httpStatusCode

string

HTTP 状态代码。

message

string

错误消息。

EventHubConsumerGroupBodyDescription

EventHub 使用者组。

名称 类型 说明
properties

EventHubConsumerGroupName

EventHub 使用者组名称。

EventHubConsumerGroupInfo

EventHubConsumerGroupInfo 对象的属性。

名称 类型 说明
etag

string

etag。

id

string

与事件中心兼容的使用者组标识符。

name

string

与事件中心兼容的使用者组名称。

properties

标记。

type

string

资源类型。

EventHubConsumerGroupName

EventHub 使用者组名称。

名称 类型 说明
name

string

EventHub 使用者组名称