你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

az iot ops asset endpoint

Note

此参考是 Azure CLI(版本 2.67.0 或更高版本)的 azure-iot-ops 扩展的一部分。 该扩展将在首次运行 az iot ops 资产终结点 命令时自动安装。 了解更多关于扩展的信息。

管理资产终结点配置文件。

命令

名称 说明 类型 Status
az iot ops asset endpoint create

创建资产终结点配置文件。

Extension GA
az iot ops asset endpoint create opcua

为 OPCUA 连接器创建资产终结点配置文件。

Extension GA
az iot ops asset endpoint delete

删除资产终结点配置文件。

Extension GA
az iot ops asset endpoint query

查询资源图中的资产终结点配置文件。

Extension GA
az iot ops asset endpoint show

显示资产终结点配置文件。

Extension GA
az iot ops asset endpoint update

更新资产终结点配置文件。

Extension GA

az iot ops asset endpoint delete

删除资产终结点配置文件。

az iot ops asset endpoint delete --name
                                 --resource-group

示例

删除资产终结点配置文件。

az iot ops asset endpoint delete --name myprofile -g myresourcegroup

必需参数

--name -n

资产终结点配置文件名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az iot ops asset endpoint query

查询资源图中的资产终结点配置文件。

az iot ops asset endpoint query [--am --authentication-mode {Anonymous, Certificate, UsernamePassword}]
                                [--cq --custom-query]
                                [--endpoint-profile-type --ept]
                                [--ig --instance-resource-group]
                                [--instance]
                                [--location]
                                [--name]
                                [--resource-group]
                                [--ta --target-address]

示例

查询具有匿名身份验证的资产终结点配置文件。

az iot ops asset endpoint query --authentication-mode Anonymous

查询具有给定目标地址和实例名称的资产终结点配置文件。

az iot ops asset endpoint query --target-address opc.tcp://opcplc-000000:50000 --instance myinstance

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--am --authentication-mode

身份验证模式。

属性
参数组: Authentication Arguments
接受的值: Anonymous, Certificate, UsernamePassword
--cq --custom-query

要使用的自定义查询。 将忽略所有其他查询参数。

--endpoint-profile-type --ept

终结点配置文件的连接器类型。

--ig --instance-resource-group

实例资源组。 如果未提供,将使用资产终结点配置文件资源组。

--instance

要与所创建资产关联的实例名称。

--location -l

Location. az account list-locations 中的值。 可以使用 az configure --defaults location=<location> 配置默认位置。

--name -n

资产终结点配置文件名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

--ta --target-address

目标地址。 必须是遵循 opc.tcp 协议的有效本地地址。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az iot ops asset endpoint show

显示资产终结点配置文件。

az iot ops asset endpoint show --name
                               --resource-group

示例

显示资产终结点配置文件的详细信息。

az iot ops asset endpoint show --name myprofile -g myresourcegroup

必需参数

--name -n

资产终结点配置文件名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az iot ops asset endpoint update

更新资产终结点配置文件。

若要更新拥有的证书,请使用命令组 az iot ops asset endpoint certificate

az iot ops asset endpoint update --name
                                 --resource-group
                                 [--am --authentication-mode {Anonymous, Certificate, UsernamePassword}]
                                 [--cert-ref --certificate-ref]
                                 [--cr]
                                 [--pass-ref --password-ref]
                                 [--pr]
                                 [--ta --target-address]
                                 [--tags]
                                 [--ur --username-reference]
                                 [--user-ref --username-ref]

示例

更新资产终结点配置文件的身份验证模式以使用匿名用户身份验证。

az iot ops asset endpoint update --name myprofile -g myresourcegroup --authentication-mode Anonymous

使用预填充的值更新资产终结点配置文件的用户名和密码引用。 这会将身份验证模式转换为用户名-密码(如果尚未这样做)。

az iot ops asset endpoint update --name myAssetEndpoint -g myRG --username-ref "aio-opc-ua-broker-user-authentication/opc-plc-username" --password-ref "aio-opc-ua-broker-user-authentication/opc-plc-password"

必需参数

--name -n

资产终结点配置文件名称。

--resource-group -g

资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。

可选参数

以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。

--am --authentication-mode

身份验证模式。

属性
参数组: Authentication Arguments
接受的值: Anonymous, Certificate, UsernamePassword
--cert-ref --certificate-ref

身份验证中使用的证书参考。 尚不支持这种用户身份验证方法。

属性
参数组: Authentication Arguments
--cr
已放弃

选项“--cr”已弃用,将在将来的版本中删除。 请改用“--cert-ref”。

身份验证中使用的证书参考。 尚不支持这种用户身份验证方法。

属性
参数组: Authentication Arguments
--pass-ref --password-ref

身份验证中使用的密码参考。

属性
参数组: Authentication Arguments
--pr
已放弃

选项“--pr”已弃用,将在将来的版本中删除。 请改用“--pass-ref”。

身份验证中使用的密码参考。

属性
参数组: Authentication Arguments
--ta --target-address

目标地址。 必须是遵循 opc.tcp 协议的有效本地地址。

--tags

资产终结点配置文件资源标记。 采用以下格式的键值对中的属性包:a=b c=d。

--ur --username-reference
已放弃

选项“--username-reference”已弃用,将在将来的版本中删除。 请改用“--user-ref”。

身份验证中使用的用户名参考。

属性
参数组: Authentication Arguments
--user-ref --username-ref

身份验证中使用的用户名参考。

属性
参数组: Authentication Arguments
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

输出格式。

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False