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=2026-11-01

URI 參數

名稱 位於 必要 類型 Description
eventHubEndpointName
path True

string

EventHubEndpoint 的名稱

name
path True

string

要擷取的取用者群組名稱。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

資源群組的名稱。 名稱不區分大小寫。

resourceName
path True

string

IoT 中樞的名稱。

subscriptionId
path True

string (uuid)

目標訂用帳戶的標識碼。 此值必須是 UUID。

api-version
query True

string

minLength: 1

用於此作業的 API 版本。

要求本文

名稱 必要 類型 Description
properties True

EventHubConsumerGroupName

EventHub 取用者組名。

回覆

名稱 類型 Description
200 OK

EventHubConsumerGroupInfo

資源「EventHubConsumerGroupInfo」更新操作成功

Other Status Codes

ErrorDetails

未預期的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

名稱 Description
user_impersonation 冒用您的使用者帳戶

範例

IotHubResource_CreateEventHubConsumerGroup

範例要求

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

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

範例回覆

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

定義

名稱 Description
createdByType

建立此資源的身分識別類型。

ErrorDetails

錯誤詳細數據。

EventHubConsumerGroupBodyDescription

EventHub 取用者群組。

EventHubConsumerGroupInfo

EventHubConsumerGroupInfo 物件的屬性。

EventHubConsumerGroupName

EventHub 取用者組名。

systemData

與建立和上次修改資源相關的元數據。

createdByType

建立此資源的身分識別類型。

值 Description
User
Application
ManagedIdentity
Key

ErrorDetails

錯誤詳細數據。

名稱 類型 Description
code

string

錯誤碼。

details

string

錯誤詳情

httpStatusCode

string

HTTP 狀態代碼。

message

string

錯誤訊息。

EventHubConsumerGroupBodyDescription

EventHub 取用者群組。

名稱 類型 Description
properties

EventHubConsumerGroupName

EventHub 取用者組名。

EventHubConsumerGroupInfo

EventHubConsumerGroupInfo 物件的屬性。

名稱 類型 Description
etag

string

etag。

id

string (arm-id)

資源的完整資源標識碼。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

資源的名稱

properties

標記。

systemData

systemData

包含 createdBy 和 modifiedBy 資訊的 Azure Resource Manager 元數據。

type

string

資源的類型。 例如:「Microsoft.Compute/virtualMachines」或「Microsoft.Storage/storageAccounts」

EventHubConsumerGroupName

EventHub 取用者組名。

名稱 類型 Description
name

string

EventHub 取用者組名

systemData

與建立和上次修改資源相關的元數據。

名稱 類型 Description
createdAt

string (date-time)

資源建立的時間戳(UTC)。

createdBy

string

建立此資源的身分。

createdByType

createdByType

建立此資源的身分識別類型。

lastModifiedAt

string (date-time)

上次修改的資源時間戳 (UTC)

lastModifiedBy

string

上次修改資源的身分識別。

lastModifiedByType

createdByType

上次修改資源的身分識別類型。