az iot hub device-identity children
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.59.0 or higher). 该扩展会在首次运行 az iot hub device-identity children 命令时自动安装。 Learn more about extensions.
管理 IoT 边缘设备的子设备关系。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az iot hub device-identity children add |
将设备作为子级添加到目标边缘设备。 |
Extension | GA |
az iot hub device-identity children list |
输出分配的子设备的集合。 |
Extension | GA |
az iot hub device-identity children remove |
从目标边缘设备中删除子设备。 |
Extension | GA |
az iot hub device-identity children add
将设备作为子级添加到目标边缘设备。
az iot hub device-identity children add --child-list --cl
--device-id
[--auth-type {key, login}]
[--force]
[--hub-name]
[--login]
[--resource-group]
示例
将设备 ID 的空间分隔列表作为子级添加到目标边缘设备。
az iot hub device-identity children add -d {edge_device_id} --child-list {child_device_id_1} {child_device_id_2} -n {iothub_name}
将设备作为子级添加到边缘设备,并覆盖子设备的现有父级。
az iot hub device-identity children add -d {edge_device_id} --child-list {child_device_id_1} {child_device_id_2} -n {iothub_name} -f
必需参数
子设备列表(空格分隔)。
边缘设备的 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指示操作是应自动派生策略密钥还是使用当前的 Azure AD 会话。 如果身份验证类型为登录,并且提供资源主机名,则除非需要,否则将跳过资源查找。可以使用 < a0/a0> 配置默认值 az configure --defaults iothub-data-auth-type={auth-type-value}
。
属性 | 值 |
---|---|
Parameter group: | Access Control Arguments |
默认值: | key |
接受的值: | key, login |
覆盖子设备的父设备。
属性 | 值 |
---|---|
默认值: | False |
IoT 中心名称或主机名。 如果未提供 --login,则为必需。
属性 | 值 |
---|---|
Parameter group: | IoT Hub Identifier Arguments |
此命令支持具有执行操作权限的实体连接字符串。 用于避免通过“az login”进行会话登录。 如果同时提供实体连接字符串和名称,则连接字符串优先。 如果未提供 --hub-name,则为必需。
属性 | 值 |
---|---|
Parameter group: | IoT Hub Identifier Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az iot hub device-identity children list
输出分配的子设备的集合。
az iot hub device-identity children list --device-id
[--auth-type {key, login}]
[--hub-name]
[--login]
[--resource-group]
示例
列出所有分配的子设备。
az iot hub device-identity children list -d {edge_device_id} -n {iothub_name}
列出其设备 ID 包含“test”子字符串的所有已分配子设备。
az iot hub device-identity children list -d {edge_device_id} -n {iothub_name} --query "[?contains(@,'test')]"
必需参数
边缘设备的 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指示操作是应自动派生策略密钥还是使用当前的 Azure AD 会话。 如果身份验证类型为登录,并且提供资源主机名,则除非需要,否则将跳过资源查找。可以使用 < a0/a0> 配置默认值 az configure --defaults iothub-data-auth-type={auth-type-value}
。
属性 | 值 |
---|---|
Parameter group: | Access Control Arguments |
默认值: | key |
接受的值: | key, login |
IoT 中心名称或主机名。 如果未提供 --login,则为必需。
属性 | 值 |
---|---|
Parameter group: | IoT Hub Identifier Arguments |
此命令支持具有执行操作权限的实体连接字符串。 用于避免通过“az login”进行会话登录。 如果同时提供实体连接字符串和名称,则连接字符串优先。 如果未提供 --hub-name,则为必需。
属性 | 值 |
---|---|
Parameter group: | IoT Hub Identifier Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az iot hub device-identity children remove
从目标边缘设备中删除子设备。
az iot hub device-identity children remove --device-id
[--auth-type {key, login}]
[--child-list --cl]
[--hub-name]
[--login]
[--remove-all]
[--resource-group]
示例
从目标父设备中删除以空格分隔的子设备列表。
az iot hub device-identity children remove -d {edge_device_id} --child-list {space_separated_device_id} -n {iothub_name}
从目标父设备中删除所有子设备。
az iot hub device-identity children remove -d {edge_device_id} --remove-all
必需参数
边缘设备的 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
指示操作是应自动派生策略密钥还是使用当前的 Azure AD 会话。 如果身份验证类型为登录,并且提供资源主机名,则除非需要,否则将跳过资源查找。可以使用 < a0/a0> 配置默认值 az configure --defaults iothub-data-auth-type={auth-type-value}
。
属性 | 值 |
---|---|
Parameter group: | Access Control Arguments |
默认值: | key |
接受的值: | key, login |
子设备列表(空格分隔)。
IoT 中心名称或主机名。 如果未提供 --login,则为必需。
属性 | 值 |
---|---|
Parameter group: | IoT Hub Identifier Arguments |
此命令支持具有执行操作权限的实体连接字符串。 用于避免通过“az login”进行会话登录。 如果同时提供实体连接字符串和名称,则连接字符串优先。 如果未提供 --hub-name,则为必需。
属性 | 值 |
---|---|
Parameter group: | IoT Hub Identifier Arguments |
删除所有子级。
属性 | 值 |
---|---|
默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |