你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Add-AzIotHubEventHubConsumerGroup
创建 eventhub 使用者组。
语法
Add-AzIotHubEventHubConsumerGroup
[-ResourceGroupName] <String>
[-Name] <String>
[-EventHubConsumerGroupName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
在与指定的 IotHub 关联的 Eventhub 中创建使用者组。
示例
示例 1:将使用者组添加到遥测事件中心
Add-AzIotHubEventHubConsumerGroup -ResourceGroupName "myresourcegroup" -Name "myiothub" -EventHubConsumerGroupName "myconsumergroup"
将名为“myconsumergroup”的新使用者组添加到事件中心,用于 iothub 中名为“myiothub”的遥测事件
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 azure 通信的凭据、帐户、租户和订阅
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-EventHubConsumerGroupName
要添加的 EventHub ConsumerGroup 的名称。
类型: | String |
Position: | 2 |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Name
IoT 中心的名称
类型: | String |
Position: | 1 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
资源组的名称。
类型: | String |
Position: | 0 |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |