az iot ops schema
Note
此参考是 Azure CLI(版本 2.67.0 或更高版本)的 azure-iot-ops 扩展的一部分。 该扩展将在首次运行 az iot ops schema 命令时自动安装。 了解更多关于扩展的信息。
架构注册表和架构管理。
架构是描述数据以启用处理和上下文化的文档。 消息架构描述消息及其内容的格式。 创建和管理架构需要架构注册表。
命令
| 名称 | 说明 | 类型 | Status |
|---|---|---|---|
| az iot ops schema create |
在架构注册表中创建架构。 |
Extension | GA |
| az iot ops schema delete |
删除架构注册表中的目标架构。 |
Extension | GA |
| az iot ops schema list |
列出架构注册表中的架构。 |
Extension | GA |
| az iot ops schema registry |
架构注册表管理。 |
Extension | GA |
| az iot ops schema registry create |
创建架构注册表。 |
Extension | GA |
| az iot ops schema registry delete |
删除目标架构注册表。 |
Extension | GA |
| az iot ops schema registry list |
列出资源组或订阅中的架构注册表。 |
Extension | GA |
| az iot ops schema registry show |
显示架构注册表的详细信息。 |
Extension | GA |
| az iot ops schema show |
显示架构注册表中架构的详细信息。 |
Extension | GA |
| az iot ops schema show-dataflow-refs |
显示用于数据流的架构引用。 |
Extension | Experimental |
| az iot ops schema version |
架构版本管理。 |
Extension | GA |
| az iot ops schema version add |
将架构版本添加到架构。 |
Extension | GA |
| az iot ops schema version list |
列出特定架构的架构版本。 |
Extension | GA |
| az iot ops schema version remove |
删除目标架构版本。 |
Extension | GA |
| az iot ops schema version show |
显示架构版本的详细信息。 |
Extension | GA |
az iot ops schema create
在架构注册表中创建架构。
此操作需要预先创建的架构注册表,并添加架构版本。 若要创建架构并添加版本,关联的存储帐户需要启用公用网络访问。 有关增量文件格式的详细信息,请参阅 aka.ms/lakehouse-delta-sample。
az iot ops schema create --format {delta, json}
--name
--registry
--resource-group
--type {message}
--vc --version-content
[--desc]
[--display-name]
[--vd --version-desc]
[--ver --version]
示例
使用最小输入在注册表“myregistry”中创建名为“myschema”的架构。 将使用文件内容为此架构创建架构版本 1。
az iot ops schema create -n myschema -g myresourcegroup --registry myregistry --format json --type message --version-content myschema.json
使用其他自定义创建名为“myschema”的架构。 将为此架构创建架构版本 14。 内联内容是 bash 语法示例。 有关更多示例,请参阅 https://aka.ms/inline-json-examples
az iot ops schema create -n myschema -g myresourcegroup --registry myregistry --format delta --type message --desc "Schema for Assets" --display-name myassetschema --version-content '{"hello": "world"}' --ver 14 --vd "14th version"
必需参数
架构格式。
| 属性 | 值 |
|---|---|
| 接受的值: | delta, json |
架构名称。
架构注册表名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
架构类型。
| 属性 | 值 |
|---|---|
| 接受的值: | message |
包含版本内容或内联内容的文件路径。
| 属性 | 值 |
|---|---|
| Parameter group: | Version Arguments |
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
架构的说明。
架构的显示名称。
版本的说明。
| 属性 | 值 |
|---|---|
| Parameter group: | Version Arguments |
架构版本名称。
| 属性 | 值 |
|---|---|
| Parameter group: | Version Arguments |
| 默认值: | 1 |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot ops schema delete
删除架构注册表中的目标架构。
az iot ops schema delete --name
--registry
--resource-group
[--yes {false, true}]
示例
删除架构注册表“myregistry”中的目标架构“myschema”。
az iot ops schema delete --name myschema --registry myregistry -g myresourcegroup
必需参数
架构名称。
架构注册表名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
在没有提示的情况下确认 [y]es。 适用于 CI 和自动化方案。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot ops schema list
列出架构注册表中的架构。
az iot ops schema list --registry
--resource-group
示例
列出架构注册表“myregistry”中的架构寄存器。
az iot ops schema list -g myresourcegroup --registry myregistry
必需参数
架构注册表名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot ops schema show
显示架构注册表中架构的详细信息。
az iot ops schema show --name
--registry
--resource-group
示例
显示架构注册表“myregistry”中目标架构“myschema”的详细信息。
az iot ops schema show --name myschema --registry myregistry -g myresourcegroup
必需参数
架构名称。
架构注册表名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
az iot ops schema show-dataflow-refs
此命令是实验性的,正在开发中。 参考和支持级别:https://aka.ms/CLI_refstatus
显示用于数据流的架构引用。
az iot ops schema show-dataflow-refs --registry
--resource-group
[--latest {false, true}]
[--schema]
[--ver --version]
示例
显示架构“myschema”和版本 1 的架构参考。
az iot ops schema show-dataflow-refs --version 1 --schema myschema --registry myregistry -g myresourcegroup
显示架构“myschema”中所有版本的架构参考。
az iot ops schema show-dataflow-refs --schema myschema --registry myregistry -g myresourcegroup
显示架构注册表“myregistry”中所有版本和架构的架构参考。
az iot ops schema show-dataflow-refs --registry myregistry -g myresourcegroup
显示所有架构的架构引用,但仅显示架构注册表“myregistry”中的最新版本。
az iot ops schema show-dataflow-refs --registry myregistry -g myresourcegroup --latest
必需参数
架构注册表名称。
资源组的名称。 可以使用 az configure --defaults group=<name>配置默认组。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
仅显示最新版本的标志。
| 属性 | 值 |
|---|---|
| 接受的值: | false, true |
架构名称。 如果使用 --version,则为必需。
架构版本名称。 如果使用,将忽略 --latest。
全局参数
提高日志记录详细程度以显示所有调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
| 属性 | 值 |
|---|---|
| 默认值: | False |
输出格式。
| 属性 | 值 |
|---|---|
| 默认值: | json |
| 接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
| 属性 | 值 |
|---|---|
| 默认值: | False |