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

az iot hub message-endpoint

注意

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

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

管理 IoT 中心的自定义终结点。

命令

名称 说明 类型 状态
az iot hub message-endpoint create

将终结点添加到IoT 中心。

分机 预览版
az iot hub message-endpoint create cosmosdb-container

为IoT 中心添加 Cosmos DB 容器终结点。

扩展 预览
az iot hub message-endpoint create eventhub

为IoT 中心添加事件中心终结点。

分机 预览版
az iot hub message-endpoint create servicebus-queue

为IoT 中心添加服务总线队列终结点。

分机 预览
az iot hub message-endpoint create servicebus-topic

为IoT 中心添加服务总线主题终结点。

扩展 预览版
az iot hub message-endpoint create storage-container

为IoT 中心添加存储容器终结点。

分机 预览
az iot hub message-endpoint delete

删除IoT 中心的所有或特定终结点。

分机 预览
az iot hub message-endpoint list

获取有关IoT 中心的所有终结点的信息。

分机 预览
az iot hub message-endpoint show

获取有关IoT 中心提及终结点的信息。

扩展 预览版
az iot hub message-endpoint update

更新IoT 中心的现有终结点的属性。

分机 预览
az iot hub message-endpoint update cosmosdb-container

更新IoT 中心的现有 Cosmos DB 容器终结点的属性。

分机 预览
az iot hub message-endpoint update eventhub

更新IoT 中心的现有事件中心终结点的属性。

分机 预览
az iot hub message-endpoint update servicebus-queue

更新IoT 中心的现有服务总线队列终结点的属性。

分机 预览
az iot hub message-endpoint update servicebus-topic

更新IoT 中心的现有服务总线主题终结点的属性。

扩展 预览版
az iot hub message-endpoint update storage-container

更新IoT 中心的现有存储容器终结点的属性。

分机 预览

az iot hub message-endpoint delete

预览

命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

删除IoT 中心的所有或特定终结点。

在删除终结点之前,必须先删除任何路由和消息扩充到终结点。

az iot hub message-endpoint delete --hub-name
                                   [--en]
                                   [--endpoint-type {cosmosdb-container, eventhub, servicebus-queue, servicebus-topic, storage-container}]
                                   [--force]
                                   [--resource-group]
                                   [--yes {false, true}]

示例

从IoT 中心中删除终结点。

az iot hub message-endpoint delete -n {iothub_name} --endpoint-name {endpoint_name}

从IoT 中心中删除类型为“EventHub”的所有终结点。

az iot hub message-endpoint delete -n {iothub_name} --endpoint-type eventhub

从IoT 中心中删除所有终结点。

az iot hub message-endpoint delete -n {iothub_name}

强制从IoT 中心中删除终结点。 这将删除与此终结点关联的任何路由和消息扩充。

az iot hub message-endpoint delete -n {iothub_name} --endpoint-name {endpoint_name} -f

从IoT 中心强制删除类型为“EventHub”的所有终结点。 这将删除与此终结点关联的任何路由和消息扩充。

az iot hub message-endpoint delete -n {iothub_name} --endpoint-type eventhub -f

必需参数

--hub-name -n

IoT 中心名称。

可选参数

--en --endpoint --endpoint-name

路由终结点的名称。

--endpoint-type --type -t

路由终结点的类型。

接受的值: cosmosdb-container, eventhub, servicebus-queue, servicebus-topic, storage-container
--force -f

强制删除终结点以及关联的任何路由和消息扩充。

默认值: False
--resource-group -g

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

--yes -y

跳过用户提示。 指示接受操作。 主要用于自动化方案。 默认值:false。

接受的值: false, true
全局参数
--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 hub message-endpoint list

预览

命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

获取有关IoT 中心的所有终结点的信息。

还可以指定要获取相关信息的终结点类型。

az iot hub message-endpoint list --hub-name
                                 [--endpoint-type {cosmosdb-container, eventhub, servicebus-queue, servicebus-topic, storage-container}]
                                 [--resource-group]

示例

从IoT 中心获取所有终结点。

az iot hub message-endpoint list -n {iothub_name}

从IoT 中心获取类型为“EventHub”的所有终结点。

az iot hub message-endpoint list -n {iothub_name} --endpoint-type eventhub

必需参数

--hub-name -n

IoT 中心名称。

可选参数

--endpoint-type --type -t

路由终结点的类型。

接受的值: cosmosdb-container, eventhub, servicebus-queue, servicebus-topic, storage-container
--resource-group -g

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

全局参数
--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 hub message-endpoint show

预览

命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别: https://aka.ms/CLI_refstatus

获取有关IoT 中心提及终结点的信息。

az iot hub message-endpoint show --en
                                 --hub-name
                                 [--resource-group]

示例

从IoT 中心获取终结点信息。

az iot hub message-endpoint show -n {iothub_name} --endpoint-name {endpoint_name}

必需参数

--en --endpoint --endpoint-name

路由终结点的名称。

--hub-name -n

IoT 中心名称。

可选参数

--resource-group -g

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

全局参数
--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 获取完整的调试日志。