az iot hub message-endpoint create
Note
此引用是Azure CLI版本 2.70.0 或更高版本的 azure-iot 扩展的一部分。 该扩展会在首次运行 az iot hub message-endpoint create 命令时自动安装。 了解更多关于扩展的信息。
命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
将终结点添加到IoT 中心。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az iot hub message-endpoint create cosmosdb-container |
为IoT 中心添加 Cosmos DB 容器终结点。 |
Extension | Preview |
| az iot hub message-endpoint create eventhub |
为IoT 中心添加事件中心终结点。 |
Extension | Preview |
| az iot hub message-endpoint create servicebus-queue |
为IoT 中心添加服务总线队列终结点。 |
Extension | Preview |
| az iot hub message-endpoint create servicebus-topic |
为IoT 中心添加服务总线主题终结点。 |
Extension | Preview |
| az iot hub message-endpoint create storage-container |
为IoT 中心添加存储容器终结点。 |
Extension | Preview |
az iot hub message-endpoint create cosmosdb-container
命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
为IoT 中心添加 Cosmos DB 容器终结点。
az iot hub message-endpoint create cosmosdb-container --container --container-name
--database-name --db
--en --endpoint --endpoint-name
[--acquire-policy-token]
[--change-reference]
[--connection-string]
[--endpoint-account]
[--endpoint-resource-group --erg]
[--endpoint-subscription-id]
[--endpoint-uri]
[--hub-name]
[--identity]
[--ids]
[--partition-key-name --pkn]
[--partition-key-template --pkt]
[--pk --primary-key]
[--resource-group]
[--secondary-key --sk]
[--subscription]
示例
为IoT 中心创建基于密钥的 Cosmos DB 容器终结点。
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} --container {container} --db {database} --endpoint-account {account_name}
使用连接字符串为IoT 中心创建 Cosmos DB 容器终结点。
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} -c {connection_string} --container {container} --db {database}
使用指定的主密钥和终结点 URI 为IoT 中心创建 Cosmos DB 容器终结点。
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} --pk {primary_key} --endpoint-uri {endpoint_uri} --container {container} --db {database}
使用系统分配的标识和分区键名称为IoT 中心创建 Cosmos DB 容器终结点。 分区键模板将是默认值。
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --container {container} --db {database} --pkn {partition_key_name} --identity [system]
使用用户分配的标识、分区键名称和分区键模板为IoT 中心创建 Cosmos DB 容器终结点。
az iot hub message-endpoint create cosmosdb-container -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --container {container} --db {database} --pkn {partition_key_name} --pkt {partition_key_template} --identity {user_identity_resource_id}
必需参数
Cosmos DB 数据库中 Cosmos DB SQL 容器的名称。
cosmos DB 帐户中的 cosmos DB 数据库的名称。
路由终结点的名称。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
路由终结点的连接字符串。
终结点资源的帐户名称。
终结点的资源组会重新调整。 如果未提供,将使用IoT 中心的资源组。
终结点资源的订阅 ID。 如果未提供,将使用IoT 中心的订阅。
终结点资源的 URI。
IoT 中心名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
使用系统分配的或用户分配的托管标识进行终结点身份验证。 使用“[system]”来引用系统分配的标识或资源 ID 来引用用户分配的标识。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
与此 Cosmos DB SQL 容器关联的分区键的名称(如果存在)。
用于生成用于此 Cosmos DB SQL 容器的合成分区键值的模板。 模板必须至少包含以下占位符之一:{iothub}、{deviceid}、{DD}、{MM}和 {YYYY}。 最多可以指定一个占位符,但顺序和非占位符组件是任意的。 如果提供了分区键名称,则分区键模板默认为 {deviceid}-{YYYY}-{MM}。
cosmos DB 帐户的主键。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
cosmos DB 帐户的辅助密钥。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot hub message-endpoint create eventhub
命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
为IoT 中心添加事件中心终结点。
az iot hub message-endpoint create eventhub --en --endpoint --endpoint-name
[--acquire-policy-token]
[--change-reference]
[--connection-string]
[--endpoint-namespace-name --namespace]
[--endpoint-policy-name --policy]
[--endpoint-resource-group --erg]
[--endpoint-subscription-id]
[--endpoint-uri]
[--entity-path]
[--hub-name]
[--identity]
[--ids]
[--resource-group]
[--subscription]
示例
为IoT 中心创建基于密钥的事件中心终结点。
az iot hub message-endpoint create eventhub -n {iothub_name} --en {endpoint_name} --namespace {namespace_name} --entity-path {entity_path} --policy {policy_name}
使用连接字符串为IoT 中心创建事件中心终结点。 省略终结点 URI 和实体路径。
az iot hub message-endpoint create eventhub -n {iothub_name} --en {endpoint_name} -c {connection_string}
使用系统分配的标识为IoT 中心创建事件中心终结点。 必须指定终结点和实体路径。
az iot hub message-endpoint create eventhub -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity [system]
使用用户分配的标识为IoT 中心创建事件中心终结点。 必须指定终结点和实体路径。
az iot hub message-endpoint create eventhub -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity {user_identity_resource_id}
必需参数
路由终结点的名称。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
路由终结点的连接字符串。
终结点资源的命名空间名称。
用于连接字符串检索的策略名称。
终结点的资源组会重新调整。 如果未提供,将使用IoT 中心的资源组。
终结点资源的订阅 ID。 如果未提供,将使用IoT 中心的订阅。
终结点资源的 URI。
终结点资源的实体路径。
IoT 中心名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
使用系统分配的或用户分配的托管标识进行终结点身份验证。 使用“[system]”来引用系统分配的标识或资源 ID 来引用用户分配的标识。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot hub message-endpoint create servicebus-queue
命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
为IoT 中心添加服务总线队列终结点。
az iot hub message-endpoint create servicebus-queue --en --endpoint --endpoint-name
[--acquire-policy-token]
[--change-reference]
[--connection-string]
[--endpoint-namespace-name --namespace]
[--endpoint-policy-name --policy]
[--endpoint-resource-group --erg]
[--endpoint-subscription-id]
[--endpoint-uri]
[--entity-path]
[--hub-name]
[--identity]
[--ids]
[--resource-group]
[--subscription]
示例
为IoT 中心创建基于密钥的服务总线队列终结点。
az iot hub message-endpoint create servicebus-queue -n {iothub_name} --en {endpoint_name} --namespace {namespace_name} --entity-path {entity_path} --policy {policy_name}
使用连接字符串为IoT 中心创建服务总线队列终结点。 省略终结点 URI 和实体路径。
az iot hub message-endpoint create servicebus-queue -n {iothub_name} --en {endpoint_name} -c {connection_string}
使用系统分配的标识为IoT 中心创建服务总线队列终结点。 必须指定终结点和实体路径。
az iot hub message-endpoint create servicebus-queue -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity [system]
使用用户分配的标识为IoT 中心创建服务总线队列终结点。 必须指定终结点和实体路径。
az iot hub message-endpoint create servicebus-queue -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity {user_identity_resource_id}
必需参数
路由终结点的名称。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
路由终结点的连接字符串。
终结点资源的命名空间名称。
用于连接字符串检索的策略名称。
终结点的资源组会重新调整。 如果未提供,将使用IoT 中心的资源组。
终结点资源的订阅 ID。 如果未提供,将使用IoT 中心的订阅。
终结点资源的 URI。
终结点资源的实体路径。
IoT 中心名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
使用系统分配的或用户分配的托管标识进行终结点身份验证。 使用“[system]”来引用系统分配的标识或资源 ID 来引用用户分配的标识。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot hub message-endpoint create servicebus-topic
命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
为IoT 中心添加服务总线主题终结点。
az iot hub message-endpoint create servicebus-topic --en --endpoint --endpoint-name
[--acquire-policy-token]
[--change-reference]
[--connection-string]
[--endpoint-namespace-name --namespace]
[--endpoint-policy-name --policy]
[--endpoint-resource-group --erg]
[--endpoint-subscription-id]
[--endpoint-uri]
[--entity-path]
[--hub-name]
[--identity]
[--ids]
[--resource-group]
[--subscription]
示例
为IoT 中心创建基于密钥的服务总线主题终结点。
az iot hub message-endpoint create servicebus-topic -n {iothub_name} --en {endpoint_name} --namespace {namespace_name} --entity-path {entity_path} --policy {policy_name}
使用连接字符串为IoT 中心创建服务总线主题终结点。 省略终结点 URI 和实体路径。
az iot hub message-endpoint create servicebus-topic -n {iothub_name} --en {endpoint_name} -c {connection_string}
使用系统分配的标识为IoT 中心创建服务总线主题终结点。 必须指定终结点和实体路径。
az iot hub message-endpoint create servicebus-topic -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity [system]
使用用户分配的标识为IoT 中心创建服务总线主题终结点。 必须指定终结点和实体路径。
az iot hub message-endpoint create servicebus-topic -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --entity-path {entity_path} --identity {user_identity_resource_id}
必需参数
路由终结点的名称。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
路由终结点的连接字符串。
终结点资源的命名空间名称。
用于连接字符串检索的策略名称。
终结点的资源组会重新调整。 如果未提供,将使用IoT 中心的资源组。
终结点资源的订阅 ID。 如果未提供,将使用IoT 中心的订阅。
终结点资源的 URI。
终结点资源的实体路径。
IoT 中心名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
使用系统分配的或用户分配的托管标识进行终结点身份验证。 使用“[system]”来引用系统分配的标识或资源 ID 来引用用户分配的标识。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot hub message-endpoint create storage-container
命令组“iot 中心消息终结点”处于预览状态,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
为IoT 中心添加存储容器终结点。
az iot hub message-endpoint create storage-container --container --container-name
--en --endpoint --endpoint-name
[--acquire-policy-token]
[--batch-frequency]
[--change-reference]
[--chunk-size]
[--connection-string]
[--encoding {avro, json}]
[--endpoint-account]
[--endpoint-resource-group --erg]
[--endpoint-subscription-id]
[--endpoint-uri]
[--ff --file-name-format]
[--hub-name]
[--identity]
[--ids]
[--resource-group]
[--subscription]
示例
为IoT 中心创建基于密钥的存储容器终结点。
az iot hub message-endpoint create storage-container -n {iothub_name} --en {endpoint_name} --container {container_name} --endpoint-account {account_name}
使用连接字符串为IoT 中心创建存储容器终结点。 省略终结点 URI。
az iot hub message-endpoint create storage-container -n {iothub_name} --en {endpoint_name} -c {connection_string} --container {container_name}
使用具有给定批处理频率、区块大小和文件名格式的系统分配标识为IoT 中心创建存储容器终结点。 必须指定终结点。
az iot hub message-endpoint create storage-container -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --container {container_name} -b {batch_frequency} -w {chunk_size} --ff {file_format} --identity [system]
使用用户分配的标识和 json 编码为IoT 中心创建存储容器终结点。 必须指定终结点。
az iot hub message-endpoint create storage-container -n {iothub_name} --en {endpoint_name} --endpoint-uri {endpoint_uri} --container {container_name} --encoding json --identity {user_identity_resource_id}
必需参数
存储容器的名称。
路由终结点的名称。
可选参数
以下参数是可选的,但根据上下文,命令可能需要一个或多个参数才能成功执行。
为此资源操作自动获取Azure Policy令牌。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
请求批处理频率(以秒为单位)。 在将数据写入 Blob 之前可以经过的最长时间(介于 60 到 720 秒之间)。
| 属性 | 值 |
|---|---|
| 默认值: | 300 |
此资源操作的相关更改引用 ID。
| 属性 | 值 |
|---|---|
| 参数组: | Global Policy Arguments |
请求区块大小(MB)。 Blob 的最大大小,介于 10 到 500 MB 之间。
| 属性 | 值 |
|---|---|
| 默认值: | 300 |
路由终结点的连接字符串。
容器的编码格式。
| 属性 | 值 |
|---|---|
| 默认值: | avro |
| 接受的值: | avro, json |
终结点资源的帐户名称。
终结点的资源组会重新调整。 如果未提供,将使用IoT 中心的资源组。
终结点资源的订阅 ID。 如果未提供,将使用IoT 中心的订阅。
终结点资源的 URI。
Blob 的文件名格式。 文件名格式必须包含 {iothub}、{partition}、{YYYY}、{MM}、{DD}、{HH} 和 {mm} 字段。 所有参数都是必需参数,但可以使用或不带分隔符重新排序。
| 属性 | 值 |
|---|---|
| 默认值: | {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm} |
IoT 中心名称。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
使用系统分配的或用户分配的托管标识进行终结点身份验证。 使用“[system]”来引用系统分配的标识或资源 ID 来引用用户分配的标识。
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
| 属性 | 值 |
|---|---|
| 参数组: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |