az iot central device
Note
This reference is part of the azure-iot extension for the Azure CLI (version 2.59.0 or higher). 该扩展将在首次运行 az iot central device 命令时自动安装。 Learn more about extensions.
管理和配置 IoT Central 设备。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az iot central device attestation |
管理和配置 IoT Central 设备证明。 |
Extension | GA |
az iot central device attestation create |
创建单个设备证明。 |
Extension | GA |
az iot central device attestation delete |
删除单个设备证明。 |
Extension | GA |
az iot central device attestation show |
获取设备证明。 |
Extension | GA |
az iot central device attestation update |
通过修补程序更新单个设备证明。 |
Extension | GA |
az iot central device c2d-message |
运行设备云到设备的消息传送命令。 |
Extension | GA |
az iot central device c2d-message purge |
清除目标设备的云到设备消息队列。 |
Extension | GA |
az iot central device command |
运行设备命令。 |
Extension | GA |
az iot central device command history |
获取发送到设备的最新命令请求和响应的详细信息。 |
Extension | GA |
az iot central device command run |
在设备上运行命令并查看关联的响应。 不监视命令可能执行的属性更新。 |
Extension | GA |
az iot central device compute-device-key |
生成派生的设备 SAS 密钥。 |
Extension | GA |
az iot central device create |
在 IoT Central 中创建设备。 |
Extension | GA |
az iot central device delete |
从 IoT Central 中删除设备。 |
Extension | GA |
az iot central device edge |
管理和配置 IoT Central Edge 设备。 |
Extension | GA |
az iot central device edge children |
管理 IoT Edge 设备子设备。 |
Extension | GA |
az iot central device edge children add |
将设备作为子级添加到目标边缘设备。 |
Extension | Preview |
az iot central device edge children list |
获取 IoT Edge 设备的子级列表。 |
Extension | GA |
az iot central device edge children remove |
从目标边缘设备中删除子设备。 |
Extension | Preview |
az iot central device edge manifest |
管理 IoT Edge 设备清单。 |
Extension | Preview |
az iot central device edge manifest show |
获取与指定的 IoT Edge 设备关联的部署清单。 |
Extension | Preview |
az iot central device edge module |
管理 IoT Edge 设备模块。 |
Extension | Preview |
az iot central device edge module list |
获取 IoT Edge 设备中的模块列表。 |
Extension | Preview |
az iot central device edge module restart |
在 IoT Edge 设备中重启模块。 |
Extension | Preview |
az iot central device edge module show |
获取 IoT Edge 设备中的模块。 |
Extension | Preview |
az iot central device list |
获取 IoT Central 应用程序的设备列表。 |
Extension | GA |
az iot central device list-components |
列出设备中存在的组件。 |
Extension | GA |
az iot central device list-modules |
列出设备中存在的模块。 |
Extension | GA |
az iot central device manual-failback |
通过将设备移回其原始IoT 中心来还原以前执行的故障转移命令。 |
Extension | GA |
az iot central device manual-failover |
跨多个IoT 中心执行设备的手动故障转移,以验证设备固件使用 DPS 重新连接到其他IoT 中心的能力。 |
Extension | GA |
az iot central device registration-info |
从 IoT Central 获取有关设备的注册信息。 |
Extension | GA |
az iot central device show |
从 IoT Central 获取设备。 |
Extension | GA |
az iot central device show-credentials |
从 IoT Central 获取设备凭据。 |
Extension | GA |
az iot central device telemetry |
查询 IoT Central 设备上次遥测值。 |
Extension | GA |
az iot central device telemetry show |
从设备获取最后一个遥测值。 |
Extension | GA |
az iot central device twin |
管理 IoT Central 设备孪生。 |
Extension | GA |
az iot central device twin replace |
替换设备、设备组件或设备模块或设备模块组件的可写属性值。 |
Extension | GA |
az iot central device twin show |
获取设备、设备组件、设备模块或设备模块组件的所有属性值。 |
Extension | GA |
az iot central device twin update |
更新设备、设备组件、设备模块或设备模块组件的可写属性值。 |
Extension | GA |
az iot central device update |
更新 IoT Central 中的设备。 |
Extension | GA |
az iot central device compute-device-key
生成派生的设备 SAS 密钥。
从组级 SAS 密钥生成派生的设备密钥。
az iot central device compute-device-key --device-id
--pk --primary-key
示例
Basic usage
az iot central device compute-device-key --pk {primaryKey} --device-id {deviceid}
必需参数
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
以 base64 格式存储的主对称共享访问密钥。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device create
在 IoT Central 中创建设备。
az iot central device create --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--device-name]
[--organizations --orgs]
[--simulated {false, true}]
[--template]
[--token]
示例
创建设备
az iot central device create --app-id {appid} --device-id {deviceid}
创建模拟设备
az iot central device create --app-id {appid} --device-id {deviceid} --template {devicetemplateid} --simulated
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
设备的唯一标识符。 ASCII 7 位字母数字字符加以下特定字符的区分大小写的字符串(长度最长为 128 个字符):- . + % _ # * ? ! ( ) , : = @ $ '.
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
人工可读设备名称。 Example: Fridge.
将设备分配给指定的组织。 逗号分隔的组织 ID 列表。 支持的最低版本:1.1-preview。
如果希望 IoT Central 将此标志设置为模拟设备,请添加此标志。 --template 是必需的(如果为 true)。
属性 | 值 |
---|---|
默认值: | False |
接受的值: | false, true |
中央模板 ID。示例:dtmi:ojpkindbz:modelDefinition:iild3tm_uo。
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device delete
从 IoT Central 中删除设备。
az iot central device delete --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--token]
示例
删除设备
az iot central device delete --app-id {appid} --device-id {deviceid}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device list
获取 IoT Central 应用程序的设备列表。
az iot central device list --app-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--edge-only]
[--token]
示例
列出应用程序中的所有设备,按设备 ID 排序(默认值)
az iot central device list --app-id {appid}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
仅列出 IoT Edge 设备。
属性 | 值 |
---|---|
默认值: | False |
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device list-components
列出设备中存在的组件。
az iot central device list-components --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--mn --module-name]
[--token]
示例
列出设备中存在的组件
az iot central device list-components --app-id {appid} --device-id {deviceid}
列出设备模块中存在的组件
az iot central device list-components --app-id {appid} --module-name {modulename} --device-id {deviceid}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
设备模块的名称。
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device list-modules
列出设备中存在的模块。
az iot central device list-modules --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--token]
示例
列出设备中存在的模块
az iot central device list-modules --app-id {appid} --device-id {deviceid}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device manual-failback
通过将设备移回其原始IoT 中心来还原以前执行的故障转移命令。
az iot central device manual-failback --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--token]
示例
通过将设备移回原始 IoT 中心来还原以前执行的故障转移命令
az iot central device manual-failback --app-id {appid} --device-id {deviceid}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device manual-failover
跨多个IoT 中心执行设备的手动故障转移,以验证设备固件使用 DPS 重新连接到其他IoT 中心的能力。
有关 ttl-minutes 访问 https://github.com/iot-for-all/iot-central-high-availability-clients#readme的高可用性和默认值的详细信息。
az iot central device manual-failover --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--token]
[--ttl --ttl-minutes]
示例
跨多个IoT 中心执行设备的手动故障转移,以验证设备固件使用 DPS 重新连接到其他IoT 中心的能力。
az iot central device manual-failover --app-id {appid} --device-id {deviceid} --ttl-minutes {ttl_minutes}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
正整数。 TTL 以分钟为单位将设备移回原始中心。后端中具有默认值。 请参阅有关访问 https://github.com/iot-for-all/iot-central-high-availability-clients#readme的最新后端默认生存时间的文档。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device registration-info
从 IoT Central 获取有关设备的注册信息。
注意:如果未指定任何设备 ID,并且应用包含大量设备,则此命令可能需要大量时间才能返回。
az iot central device registration-info --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--token]
示例
获取指定设备上的注册信息
az iot central device registration-info --app-id {appid} --device-id {deviceid}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device show
从 IoT Central 获取设备。
az iot central device show --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--token]
示例
获取设备
az iot central device show --app-id {appid} --device-id {deviceid}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device show-credentials
从 IoT Central 获取设备凭据。
az iot central device show-credentials --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--token]
示例
获取设备的设备凭据
az iot central device show-credentials --app-id {appid} --device-id {deviceid}
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 central device update
更新 IoT Central 中的设备。
允许更改设备的以下属性:“displayName”、“template”、“simulated”、“enabled”和“organizations”。 无法更改设备 ID。
az iot central device update --app-id
--device-id
[--api-version --av {2022-06-30-preview, 2022-07-31}]
[--central-api-uri --central-dns-suffix]
[--device-name]
[--enable {false, true}]
[--organizations --orgs]
[--simulated {false, true}]
[--template]
[--token]
示例
更新设备显示名称
az iot central device update --app-id {appid} --device-id {deviceid} --device-name {deviceName}
将模拟设备转换为真实设备
az iot central device update --app-id {appid} --device-id {deviceid} --simulated false
更新设备的组织
az iot central device update --app-id {appid} --device-id {deviceid} --organizations {organizations}
禁用设备
az iot central device update --app-id {appid} --device-id {deviceid} --enable false
必需参数
要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。
目标设备的设备 ID。可以通过单击“设备详细信息”页上的“连接”按钮找到设备 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
参数“api_version”已弃用,将在将来的版本中删除。
此命令参数已弃用,将被忽略。在未来版本中,我们仅支持最新版本的 IoT Central API。如果任何 API 尚未正式发布,我们将调用最新的预览版。
属性 | 值 |
---|---|
默认值: | 2022-07-31 |
接受的值: | 2022-06-30-preview, 2022-07-31 |
与应用程序关联的 IoT Central DNS 后缀。
属性 | 值 |
---|---|
默认值: | azureiotcentral.com |
人工可读设备名称。 Example: Fridge.
如果希望 IoT Central 启用或禁用设备,请添加此标志。
属性 | 值 |
---|---|
接受的值: | false, true |
将设备分配给指定的组织。 逗号分隔的组织 ID 列表。 支持的最低版本:1.1-preview。
如果希望 IoT Central 将此标志设置为模拟设备,请添加此标志。 --template 是必需的(如果为 true)。
属性 | 值 |
---|---|
接受的值: | false, true |
中央模板 ID。示例:dtmi:ojpkindbz:modelDefinition:iild3tm_uo。
如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 在 https://aka.ms/iotcentraldocsapi了解详细信息。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | 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 |