az iot adr schema version

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 version command. Learn more about extensions.

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

Manage Schema Versions.

A version name must contain 1 to 10 digits.

Commands

Name Description Type Status
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 version create

Preview

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

Create a Schema Version.

The --schema-content value is sent directly to properties.schemaContent. After a version is created, its schemaContent cannot be changed.

az iot adr schema version create --registry
                                 --resource-group
                                 --schema
                                 --schema-content
                                 --version
                                 [--acquire-policy-token]
                                 [--change-reference]
                                 [--desc --description]

Examples

Create a Message Schema version

az iot adr schema version create --registry site-a --schema telemetry \
  --version 1 --schema-content '{"type":"object"}' -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>.

--schema

Schema name.

--schema-content

Schema content string written to properties.schemaContent.

--version

Schema Version name. Must contain 1 to 10 digits.

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

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 version delete

Preview

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

Delete a Schema Version.

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

Examples

Delete version 2

az iot adr schema version delete --registry site-a --schema smart-lamp \
  --version 2 -g MyRG --yes

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.

--version

Schema Version name. Must contain 1 to 10 digits.

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 version list

Preview

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

List Schema Versions.

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

Examples

List all versions of a Schema

az iot adr schema version list --registry site-a --schema smart-lamp -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>.

--schema

Schema 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 version show

Preview

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

Show a Schema Version and its content.

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

Examples

Get the resource ID for a Thing Model version

THING_MODEL_ID=$(az iot adr schema version show --registry site-a \
  --schema smart-lamp --version 1 -g MyRG --query id -o tsv)

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.

--version

Schema Version name. Must contain 1 to 10 digits.

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 version wait

Preview

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

Wait for a Schema Version operation to finish.

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

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

Examples

Wait for a Schema Version to be deleted

az iot adr schema version wait --registry site-a --schema smart-lamp \
  --version 2 -g MyRG --deleted

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.

--version

Schema Version name. Must contain 1 to 10 digits.

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