שתף באמצעות


az iot ops schema

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 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 and registry management.

Schemas are documents that describe data to enable processing and contextualization. Message schemas describe the format of a message and its contents. A schema registry is required to create and manage schemas.

Commands

Name Description Type Status
az iot ops schema create

Create a schema within a schema registry.

Extension Preview
az iot ops schema delete

Delete a target schema within a schema registry.

Extension Preview
az iot ops schema list

List schemas within a schema registry.

Extension Preview
az iot ops schema registry

Schema registry management.

Extension Preview
az iot ops schema registry create

Create a schema registry.

Extension Preview
az iot ops schema registry delete

Delete a target schema registry.

Extension Preview
az iot ops schema registry list

List schema registries in a resource group or subscription.

Extension Preview
az iot ops schema registry show

Show details of a schema registry.

Extension Preview
az iot ops schema show

Show details of a schema within a schema registry.

Extension Preview
az iot ops schema show-dataflow-refs

Show the schema references used for dataflows.

Extension Preview
az iot ops schema version

Schema version management.

Extension Preview
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 create

Preview

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

Create a schema within a schema registry.

This operation requires a pre-created schema registry and will add a schema version. To create the schema and 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 create --format {delta, json}
                         --name
                         --registry
                         --resource-group
                         --type {message}
                         --vc
                         [--desc]
                         [--display-name]
                         [--vd]
                         [--ver]

Examples

Create a schema called 'myschema' in the registry 'myregistry' with minimum inputs. Schema version 1 will be created for this schema with the file content.

az iot ops schema create -n myschema -g myresourcegroup --registry myregistry --format json --type message --version-content myschema.json

Create a schema called 'myschema' with additional customization. Schema version 14 will be created for this schema. The inline content is a powershell syntax example.

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"

Create a schema called 'myschema'. Schema version 1 will be created for this schema. The inline content is a cmd syntax example.

az iot ops schema create -n myschema -g myresourcegroup --registry myregistry --format json --type message --version-content "{\"hello\": \"world\"}"

Create a schema called 'myschema'. Schema version 1 will be created for this schema. The inline content is a bash syntax example.

az iot ops schema create -n myschema -g myresourcegroup --registry myregistry --format json --type message --version-content '{"hello": "world"}'

Required Parameters

--format

Schema format.

Accepted values: delta, json
--name -n

Schema name.

--registry

Schema registry name.

--resource-group -g

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

--type

Schema type.

Accepted values: message
--vc --version-content

File path containing or inline content for the version.

Optional Parameters

--desc

Description for the schema.

--display-name

Display name for the schema.

--vd --version-desc

Description for the version.

--ver --version

Schema version name.

Default value: 1
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 delete

Preview

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

Delete a target schema within a schema registry.

az iot ops schema delete --name
                         --registry
                         --resource-group
                         [--yes {false, true}]

Examples

Delete a target schema 'myschema' within a schema registry 'myregistry'.

az iot ops schema delete --name myschema --registry myregistry -g myresourcegroup

Required Parameters

--name -n

Schema name.

--registry

Schema registry name.

--resource-group -g

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

Optional Parameters

--yes -y

Confirm [y]es without a prompt. Useful for CI and automation scenarios.

Accepted values: false, true
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 list

Preview

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

List schemas within a schema registry.

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

Examples

List schema registeries in the schema registry 'myregistry'.

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

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>.

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 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 within a schema registry.

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

Examples

Show details of target schema 'myschema' within a schema registry 'myregistry'.

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

Required Parameters

--name -n

Schema name.

--registry

Schema registry name.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<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 show-dataflow-refs

Preview

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

Show the schema references used for dataflows.

az iot ops schema show-dataflow-refs --registry
                                     --resource-group
                                     [--latest {false, true}]
                                     [--schema]
                                     [--ver]

Examples

Show schema reference for schema "myschema" and version 1.

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

Show schema reference for all versions in schema "myschema".

az iot ops schema show-dataflow-refs --schema myschema --registry myregistry -g myresourcegroup

Show schema reference for all versions and schemas in schema registry "myregistry".

az iot ops schema show-dataflow-refs --registry myregistry -g myresourcegroup

Show schema reference for all schemas but only the latest versions in schema registry "myregistry".

az iot ops schema show-dataflow-refs --registry myregistry -g myresourcegroup --latest

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>.

Optional Parameters

--latest

Flag to show only the latest version(s).

Accepted values: false, true
--schema

Schema name. Required if using --version.

--ver --version

Schema version name. If used, --latest will be ignored.

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.