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

az iot ops schema version

Note

This reference is part of the azure-iot-ops extension for the Azure CLI (version 2.53.0 or higher). The extension will automatically install the first time you run an az iot ops schema version command. Learn more about extensions.

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Schema version management.

A schema version contains the schema content associated with that version.

Commands

Name Description Type Status
az iot ops schema version add

Add a schema version to a schema.

Extension Preview
az iot ops schema version list

List schema versions for a specific schema.

Extension Preview
az iot ops schema version remove

Remove a target schema version.

Extension Preview
az iot ops schema version show

Show details of a schema version.

Extension Preview

az iot ops schema version add

Preview

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Add a schema version to a schema.

To add a version, the associated storage account will need to have public network access enabled. For more information on the delta file format, please see aka.ms/lakehouse-delta-sample.

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

Examples

Add a schema version 1 to a schema called 'myschema' within the registry 'myregistry' with minimum inputs. The content is inline json (powershell syntax example).

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

Add a schema version 1 to a schema called 'myschema' within the registry 'myregistry' with minimum inputs. The content is inline json (cmd syntax example).

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

Add a schema version 1 to a schema called 'myschema' within the registry 'myregistry' with minimum inputs. The content is inline json (bash syntax example).

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

Add a schema version 2 to a schema called 'myschema' within the registry 'myregistry' with a description. The file should contain the schema content.

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

Required Parameters

--content

File path containing or inline content for the version.

--name -n

Schema version name.

--registry

Schema registry name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--schema

Schema name.

Optional Parameters

--desc

Description for the schema version.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops schema version list

Preview

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List schema versions for a specific schema.

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

Examples

List all schema versions for the schema 'myschema' in the schema registry 'myregistry'.

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

Required Parameters

--registry

Schema registry name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--schema

Schema name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops schema version remove

Preview

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Remove a target schema version.

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

Examples

Remove schema version 1.

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

Required Parameters

--name -n

Schema version name.

--registry

Schema registry name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--schema

Schema name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az iot ops schema version show

Preview

Command group 'iot ops' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show details of a schema version.

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

Examples

Show details of target schema version 1.

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

Required Parameters

--name -n

Schema version name.

--registry

Schema registry name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--schema

Schema name.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.