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

az iot central export destination

注意

此参考是 Azure CLI(版本 2.37.0 或更高版本)的 azure-iot 扩展的一部分。 该扩展将在首次运行 az iot central export destination 命令时自动安装。 详细了解扩展。

命令组“iot 中央导出”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

管理和配置 IoT Central 导出目标。

命令

名称 说明 类型 状态
az iot central export destination create

为 IoT Central 应用程序创建导出目标。

分机 预览版
az iot central export destination delete

删除 IoT Central 应用程序的导出目标。

分机 预览
az iot central export destination list

获取 IoT Central 应用程序导出目标的完整列表。

分机 预览版
az iot central export destination show

获取导出目标详细信息。

分机 预览
az iot central export destination update

更新 IoT Central 应用程序的导出目标。

扩展 预览版

az iot central export destination create

预览

命令组“iot 中央导出目标”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

为 IoT Central 应用程序创建导出目标。

az iot central export destination create --app-id
                                         --dest-id
                                         --display-name
                                         --type {blobstorage@v1, dataexplorer@v1, eventhubs@v1, servicebusqueue@v1, servicebustopic@v1, webhook@v1}
                                         [--api-version {2022-06-30-preview}]
                                         [--au]
                                         [--central-api-uri]
                                         [--cluster-url]
                                         [--database]
                                         [--header]
                                         [--table]
                                         [--token]
                                         [--url]

示例

使用 json 有效负载创建 Webhook 导出目标

az iot central export destination create --app-id {appid} --dest-id {destinationid} --name {displayname} --url {url} --type webhook@v1 --header '{"x-custom-region":{"value":"westus", "secret": false}}'

使用 json 有效负载创建 Blob 存储导出目标

az iot central export destination create --app-id {appid} --dest-id {destintionid} --type blobstorage@v1 --name {displayname} --authorization '{
  "type": "connectionString",
  "connectionString":"DefaultEndpointsProtocol=https;AccountName=[accountName];AccountKey=[key];EndpointSuffix=core.windows.net",
  "containerName": "test"
}'

使用 json 有效负载创建 Azure 数据资源管理器导出目标

az iot central export destination create --app-id {appid} --dest-id {destintionid} --type dataexplorer@v1 --name {displayname} --cluster-url {clusterurl} --database {database} --table {table} --authorization '{
  "type": "servicePrincipal",
  "clientId": "3b420743-2020-44c6-9b70-cc42f945db0x",
  "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
  "clientSecret": "[Secret]"
}'

使用 json 有效负载创建事件中心导出目标

az iot central export destination create --app-id {appid} --dest-id {destintionid} --type eventhubs@v1 --name {displayname} --authorization '{
  "type": "connectionString",
  "connectionString": "Endpoint=sb://[hubName].servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=*****;EntityPath=entityPath1"
}'

使用 json 有效负载创建服务总线队列目标

az iot central export destination create --app-id {appid} --dest-id {destintionid} --type servicebusqueue@v1 --name {displayname} --authorization '{
  "type": "connectionString",
  "connectionString": "Endpoint=sb://[namespance].servicebus.windows.net/;SharedAccessKeyName=xxx;SharedAccessKey=[key];EntityPath=[name]"
}'

使用 json 有效负载创建服务总线主题目标

az iot central export destination create --app-id {appid} --dest-id {destintionid} --type servicebustopic@v1 --name {displayname} --authorization '{
  "type": "connectionString",
  "connectionString": "Endpoint=sb://[namespace].servicebus.windows.net/;SharedAccessKeyName=xxx;SharedAccessKey=[key];EntityPath=[name]"
}'

必需参数

--app-id -n

要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。

--dest-id

导出目标的唯一标识符。

--display-name --name

目标显示名称。

--type -t

目标类型。

接受的值: blobstorage@v1, dataexplorer@v1, eventhubs@v1, servicebusqueue@v1, servicebustopic@v1, webhook@v1

可选参数

--api-version --av
已放弃

参数“api_version”已弃用,将在将来的版本中删除。

所请求操作的 API 版本。

接受的值: 2022-06-30-preview
默认值: 2022-06-30-preview
--au --authorization

json 中的授权配置。

--central-api-uri --central-dns-suffix

与应用程序关联的 IoT Central DNS 后缀。

默认值: azureiotcentral.com
--cluster-url --cu

Azure 数据资源管理器群集 URL。

--database

Azure 数据资源管理器数据库。

--header

json 中的 webhook 目标 custimized 标头集合。

--table

Azure 数据资源管理器表。

--token

如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 更多信息请访问 https://aka.ms/iotcentraldocsapi

--url

Webhook URL。

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az iot central export destination delete

预览

命令组“iot 中央导出目标”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

删除 IoT Central 应用程序的导出目标。

az iot central export destination delete --app-id
                                         --dest-id
                                         [--api-version {2022-06-30-preview}]
                                         [--central-api-uri]
                                         [--token]

示例

删除导出目标

az iot central export destination delete --app-id {appid} --dest-id {destinationid}

必需参数

--app-id -n

要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。

--dest-id

导出目标的唯一标识符。

可选参数

--api-version --av
已放弃

参数“api_version”已弃用,将在将来的版本中删除。

所请求操作的 API 版本。

接受的值: 2022-06-30-preview
默认值: 2022-06-30-preview
--central-api-uri --central-dns-suffix

与应用程序关联的 IoT Central DNS 后缀。

默认值: azureiotcentral.com
--token

如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 更多信息请访问 https://aka.ms/iotcentraldocsapi

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az iot central export destination list

预览

命令组“iot 中央导出目标”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

获取 IoT Central 应用程序导出目标的完整列表。

az iot central export destination list --app-id
                                       [--api-version {2022-06-30-preview}]
                                       [--central-api-uri]
                                       [--token]

示例

列出应用程序中的所有导出目标

az iot central export destination list --app-id {appid}

必需参数

--app-id -n

要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。

可选参数

--api-version --av
已放弃

参数“api_version”已弃用,将在将来的版本中删除。

所请求操作的 API 版本。

接受的值: 2022-06-30-preview
默认值: 2022-06-30-preview
--central-api-uri --central-dns-suffix

与应用程序关联的 IoT Central DNS 后缀。

默认值: azureiotcentral.com
--token

如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 更多信息请访问 https://aka.ms/iotcentraldocsapi

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az iot central export destination show

预览

命令组“iot 中央导出目标”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

获取导出目标详细信息。

az iot central export destination show --app-id
                                       --dest-id
                                       [--api-version {2022-06-30-preview}]
                                       [--central-api-uri]
                                       [--token]

示例

获取导出目标详细信息

az iot central export destination show --app-id {appid} --dest-id {destinationid}

必需参数

--app-id -n

要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。

--dest-id

导出目标的唯一标识符。

可选参数

--api-version --av
已放弃

参数“api_version”已弃用,将在将来的版本中删除。

所请求操作的 API 版本。

接受的值: 2022-06-30-preview
默认值: 2022-06-30-preview
--central-api-uri --central-dns-suffix

与应用程序关联的 IoT Central DNS 后缀。

默认值: azureiotcentral.com
--token

如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 更多信息请访问 https://aka.ms/iotcentraldocsapi

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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

az iot central export destination update

预览

命令组“iot 中央导出目标”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

更新 IoT Central 应用程序的导出目标。

创建目标类型后是不可变的。 必须使用新类型创建新目标。

az iot central export destination update --app-id
                                         --content
                                         --dest-id
                                         [--api-version {2022-06-30-preview}]
                                         [--central-api-uri]
                                         [--token]

示例

从文件更新导出目标

az iot central export destination update --app-id {appid} --dest-id {destinationid} --content './filepath/payload.json'

使用 json-patch 有效负载更新导出目标

az iot central export destination update --app-id {appid} --dest-id {destinationid} --content '{"displayName": "Web Hook Updated"}'

必需参数

--app-id -n

要管理的 IoT Central 应用的应用 ID。 可以在应用程序“关于”页面的帮助菜单下找到应用 ID。

--content -k

部分目标定义。 提供 JSON 文件或原始字符串化 JSON 的路径。 [文件路径示例:./path/to/file.json][字符串化 JSON::{} 的示例]。 请求正文必须包含目标的部分内容。

--dest-id

导出目标的唯一标识符。

可选参数

--api-version --av
已放弃

参数“api_version”已弃用,将在将来的版本中删除。

所请求操作的 API 版本。

接受的值: 2022-06-30-preview
默认值: 2022-06-30-preview
--central-api-uri --central-dns-suffix

与应用程序关联的 IoT Central DNS 后缀。

默认值: azureiotcentral.com
--token

如果想要在不对 Azure CLI 进行身份验证的情况下提交请求,可以指定有效的用户令牌对请求进行身份验证。 必须将密钥类型指定为请求的一部分。 更多信息请访问 https://aka.ms/iotcentraldocsapi

全局参数
--debug

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

--help -h

显示此帮助消息并退出。

--only-show-errors

只显示错误,取消显示警告。

--output -o

输出格式。

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

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

--subscription

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

--verbose

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