Share via


az iot ops schema registry

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

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

Schema registry management.

A schema registry is a centralized repository for managing schemas. Schema registry enables schema generation and retrieval both at the edge and in the cloud. It ensures consistency and compatibility across systems by providing a single source of truth for schema definitions.

Commands

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

Preview

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

Create a schema registry.

This operation will create a schema registry with system managed identity enabled.

It will then assign the system identity the built-in "Storage Blob Data Contributor" role against the storage account container scope by default. If necessary you can provide a custom role via --custom-role-id to use instead.

If the indicated storage account container does not exist it will be created with default settings.

This operation will also register the Microsoft.DeviceRegistry resource provider if it is not registered.

az iot ops schema registry create --name
                                  --registry-namespace
                                  --resource-group
                                  --sa-resource-id
                                  [--custom-role-id]
                                  [--desc]
                                  [--display-name]
                                  [--location]
                                  [--sa-container]
                                  [--tags]

Examples

Create a schema registry called 'myregistry' with minimum inputs.

az iot ops schema registry create -n myregistry -g myresourcegroup --registry-namespace myschemas --sa-resource-id $STORAGE_ACCOUNT_RESOURCE_ID

Create a schema registry called 'myregistry' in region westus2 with additional customization.

az iot ops schema registry create -n myregistry -g myresourcegroup --registry-namespace myschemas --sa-resource-id $STORAGE_ACCOUNT_RESOURCE_ID --sa-container myschemacontainer -l westus2 --desc 'Contoso factory X1 schemas' --display-name 'Contoso X1' --tags env=prod

Required Parameters

--name -n

Schema registry name.

--registry-namespace --rn

Schema registry namespace. Uniquely identifies a schema registry within a tenant.

--resource-group -g

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

--sa-resource-id

Storage account resource Id to be used with the schema registry.

Optional Parameters

--custom-role-id

Fully qualified role definition Id in the following format: /subscriptions/{subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/{roleId}.

--desc

Description for the schema registry.

--display-name

Display name for the schema registry.

--location -l

Region to create the schema registry. If no location is provided the resource group location will be used.

--sa-container

Storage account container name where schemas will be stored.

Default value: schemas
--tags

Schema registry tags. Property bag in key-value pairs with the following format: a=b c=d. Use --tags "" to remove all tags.

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

Preview

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

Delete a target schema registry.

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

Examples

Delete schema registry 'myregistry'.

az iot ops schema registry delete -n myregistry -g myresourcegroup

Required Parameters

--name -n

Schema registry name.

Optional Parameters

--resource-group -g

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

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

Preview

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

List schema registries in a resource group or subscription.

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

Examples

List schema registeries in the resource group 'myresourcegroup'.

az iot ops schema registry list -g myresourcegroup

List schema registeries in the default subscription filtering on a particular tag.

az iot ops schema registry list --query "[?tags.env == 'prod']"

Optional Parameters

--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 registry show

Preview

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

Show details of a schema registry.

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

Examples

Show details of target schema registry 'myregistry'.

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

Required Parameters

--name -n

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.