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

az iot ops schema version

注释

此参考是 Azure CLI(版本 2.53.0 或更高版本)的 azure-iot-ops 扩展的一部分。 该扩展会在首次运行 az iot ops schema version 命令时自动安装。 了解更多关于扩展 的相关信息。

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

架构版本管理。

架构版本包含与该版本关联的架构内容。

命令

名称 说明 类型 Status
az iot ops schema version add

将架构版本添加到架构。

扩展 预览
az iot ops schema version list

列出特定架构的架构版本。

扩展 预览
az iot ops schema version remove

删除目标架构版本。

扩展 预览
az iot ops schema version show

显示架构版本的详细信息。

扩展 预览

az iot ops schema version add

预览

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

将架构版本添加到架构。

若要添加版本,关联的存储帐户需要启用公用网络访问。 有关增量文件格式的详细信息,请参阅 aka.ms/lakehouse-delta-sample。

az iot ops schema version add --content
                              --name
                              --registry
                              --resource-group
                              --schema
                              [--desc]

示例

将架构版本 1 添加到注册表“myregistry”中名为“myschema”的架构,其中包含最小输入。 内容为内联 json(powershell 语法示例)。

az iot ops schema version add -n 1 -g myresourcegroup --registry myregistry --schema myschema --content '{\"hello\": \"world\"}'

将架构版本 1 添加到注册表“myregistry”中名为“myschema”的架构,其中包含最小输入。 内容为内联 json (cmd 语法示例)。

az iot ops schema version add -n 1 -g myresourcegroup --registry myregistry --schema myschema --content "{\"hello\": \"world\"}"

将架构版本 1 添加到注册表“myregistry”中名为“myschema”的架构,其中包含最小输入。 内容为内联 json (bash 语法示例)。

az iot ops schema version add -n 1 -g myresourcegroup --registry myregistry --schema myschema --content '{"hello": "world"}'

使用说明将架构版本 2 添加到注册表“myregistry”中名为“myschema”的架构。 该文件应包含架构内容。

az iot ops schema version add -n 2 -g myresourcegroup --registry myregistry --schema myschema --content myschemav2.json --desc "New schema"

必需参数

--content

包含版本内容或内联内容的文件路径。

--name -n

架构版本名称。

--registry

架构注册表名称。

--resource-group -g

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

--schema

架构名称。

可选参数

--desc

架构版本的说明。

全局参数
--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 ops schema version list

预览

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

列出特定架构的架构版本。

az iot ops schema version list --registry
                               --resource-group
                               --schema

示例

列出架构注册表“myregistry”中架构“myschema”的所有架构版本。

az iot ops schema version list -g myresourcegroup --registry myregistry --schema myschema

必需参数

--registry

架构注册表名称。

--resource-group -g

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

--schema

架构名称。

全局参数
--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 ops schema version remove

预览

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

删除目标架构版本。

az iot ops schema version remove --name
                                 --registry
                                 --resource-group
                                 --schema

示例

删除架构版本 1。

az iot ops schema version remove -n 1 -g myresourcegroup --registry myregistry --schema myschema

必需参数

--name -n

架构版本名称。

--registry

架构注册表名称。

--resource-group -g

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

--schema

架构名称。

全局参数
--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 ops schema version show

预览

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

显示架构版本的详细信息。

az iot ops schema version show --name
                               --registry
                               --resource-group
                               --schema

示例

显示目标架构版本 1 的详细信息。

az iot ops schema version show --name 1 --schema myschema --registry myregistry -g myresourcegroup

必需参数

--name -n

架构版本名称。

--registry

架构注册表名称。

--resource-group -g

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

--schema

架构名称。

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