az iot adr schema

Note

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

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage schemas and their versions in a Schema Registry.

A Schema stores information such as the document type and format. Each Schema Version stores one Message Schema, Thing Model, or Thing Description document. When another resource asks for a schema or model reference, use the full resource ID of a specific Schema Version.

Commands

Name Description Type Status
az iot adr schema create

Create a Schema.

Extension Preview
az iot adr schema delete

Delete a Schema.

Extension Preview
az iot adr schema list

List Schemas in a Schema Registry.

Extension Preview
az iot adr schema registry

Manage Schema Registries.

Extension Preview
az iot adr schema registry create

Create a Schema Registry backed by Azure Data Lake Storage Gen2.

Extension Preview
az iot adr schema registry delete

Delete a Schema Registry.

Extension Preview
az iot adr schema registry list

List Schema Registries.

Extension Preview
az iot adr schema registry show

Show a Schema Registry.

Extension Preview
az iot adr schema registry update

Update writable Schema Registry properties.

Extension Preview
az iot adr schema registry wait

Wait for a Schema Registry operation to finish.

Extension Preview
az iot adr schema show

Show a Schema.

Extension Preview
az iot adr schema version

Manage Schema Versions.

Extension Preview
az iot adr schema version create

Create a Schema Version.

Extension Preview
az iot adr schema version delete

Delete a Schema Version.

Extension Preview
az iot adr schema version list

List Schema Versions.

Extension Preview
az iot adr schema version show

Show a Schema Version and its content.

Extension Preview
az iot adr schema version wait

Wait for a Schema Version operation to finish.

Extension Preview
az iot adr schema wait

Wait for a Schema operation to finish.

Extension Preview

az iot adr schema create

Preview

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

Create a Schema.

Creates Schema metadata. Use 'schema version create' to create a version and provide its schemaContent value.

az iot adr schema create --format
                         --name
                         --registry
                         --resource-group
                         --schema-type
                         [--acquire-policy-token]
                         [--change-reference]
                         [--desc --description]
                         [--display-name]
                         [--tags]

Examples

Create a Thing Model Schema

az iot adr schema create -n smart-lamp -g MyRG --registry site-a \
  --schema-type ThingModel --format JsonLD/1.1

Required Parameters

--format

Schema format written to properties.format. Current values include JsonSchema/draft-07, Delta/1.0, and JsonLD/1.1.

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

--schema-type

Schema type written to properties.schemaType. Current values include MessageSchema, ThingModel, and ThingDescription.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--desc --description

Description for the schema.

--display-name

Display name for the schema.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot adr schema delete

Preview

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

Delete a Schema.

az iot adr schema delete --name
                         --registry
                         --resource-group
                         [--acquire-policy-token]
                         [--change-reference]
                         [--no-wait]
                         [--yes {false, true}]

Examples

Delete a Schema

az iot adr schema delete -n smart-lamp --registry site-a -g MyRG --yes

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--yes -y

Skip user prompts. Indicates acceptance of action. Used primarily for automation scenarios. Default: false.

Property Value
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot adr schema list

Preview

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

List Schemas in a Schema Registry.

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

Examples

List Schemas

az iot adr schema list --registry site-a -g MyRG

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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot adr schema show

Preview

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

Show a Schema.

Shows the Schema type, format, and other properties. Use 'schema version show' to retrieve the document stored in a version.

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

Examples

Show a Schema

az iot adr schema show -n smart-lamp --registry site-a -g MyRG

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.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az iot adr schema wait

Preview

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

Wait for a Schema operation to finish.

Use after starting an operation with --no-wait. Specify a condition such as --deleted, --exists, or --custom.

az iot adr schema wait --name
                       --registry
                       --resource-group
                       [--acquire-policy-token]
                       [--change-reference]
                       [--created]
                       [--custom]
                       [--deleted]
                       [--exists]
                       [--interval]
                       [--timeout]
                       [--updated]

Examples

Wait for a Schema to be deleted

az iot adr schema wait -n smart-lamp --registry site-a -g MyRG --deleted

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False