az iot edge
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.59.0 or higher). 该扩展将在首次运行 az iot edge 命令时自动安装。 Learn more about extensions.
管理 Edge 中的 IoT 解决方案。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az iot edge deployment |
大规模管理 IoT Edge 部署。 |
Extension | GA |
az iot edge deployment create |
在目标IoT 中心中创建 IoT Edge 部署。 |
Extension | GA |
az iot edge deployment delete |
删除 IoT Edge 部署。 |
Extension | GA |
az iot edge deployment list |
列出IoT 中心中的 IoT Edge 部署。 |
Extension | GA |
az iot edge deployment show |
获取 IoT Edge 部署的详细信息。 |
Extension | GA |
az iot edge deployment show-metric |
评估 IoT Edge 部署中定义的目标系统指标。 |
Extension | GA |
az iot edge deployment update |
更新 IoT Edge 部署的指定属性。 |
Extension | GA |
az iot edge devices |
用于管理 IoT Edge 设备的命令。 |
Extension | GA |
az iot edge devices create |
在IoT 中心中创建和配置多个边缘设备。 |
Extension | Experimental |
az iot edge export-modules |
在单个边缘设备上导出边缘模块的配置。 |
Extension | GA |
az iot edge set-modules |
在单个设备上设置边缘模块。 |
Extension | GA |
az iot edge export-modules
在单个边缘设备上导出边缘模块的配置。
模块孪生配置输出可以直接用作 “az iot edge set-modules” 的内容。
az iot edge export-modules --device-id
[--auth-type {key, login}]
[--hub-name]
[--login]
[--resource-group]
示例
在目标设备上导出模块孪生配置。
az iot edge export-modules --hub-name {iothub_name} --device-id {device_id}
必需参数
目标设备 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 edge set-modules
在单个设备上设置边缘模块。
模块内容为 json,格式为 {“modulesContent”:{...}} or {"content":{"modulesContent":{...}}}.
默认情况下,系统模块的属性$edgeAgent和$edgeHub根据随 IoT 扩展一起安装的架构进行验证。 可以使用 --no-validation 开关禁用此功能。
注意:执行后,该命令将输出应用于设备的模块集合。
az iot edge set-modules --content
--device-id
[--auth-type {key, login}]
[--hub-name]
[--login]
[--resource-group]
示例
通过在目标设备上设置模块,在开发过程中测试边缘模块。
az iot edge set-modules --hub-name {iothub_name} --device-id {device_id} --content ../modules_content.json
必需参数
IoT Edge 部署内容。 提供文件路径或原始 json。
目标设备 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 |