Skip to main content

schemas

Creates, updates, deletes, gets or lists a schemas resource.

Overview

Nameschemas
TypeResource
Idazure.device_registry.schemas

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
descriptionstringHuman-readable description of the schema.
displayNamestringHuman-readable display name.
formatstringFormat of the schema. Required. Known values are: "JsonSchema/draft-07" and "Delta/1.0". (JsonSchema/draft-07, Delta/1.0)
provisioningStatestringProvisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", and "Deleting". (Succeeded, Failed, Canceled, Accepted, Deleting)
schemaTypestringType of the schema. Required. "MessageSchema" (MessageSchema)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectSchema tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
uuidstringGlobally unique, immutable, non-reusable id.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, schema_registry_name, schema_name, subscription_idGet a Schema.
list_by_schema_registryselectresource_group_name, schema_registry_name, subscription_idList Schema resources by SchemaRegistry.
create_or_replaceinsertresource_group_name, schema_registry_name, schema_name, subscription_idCreate a Schema.
create_or_replacereplaceresource_group_name, schema_registry_name, schema_name, subscription_idCreate a Schema.
deletedeleteresource_group_name, schema_registry_name, schema_name, subscription_idDelete a Schema.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
schema_namestringSchema name parameter. Required.
schema_registry_namestringSchema registry name parameter. Required.
subscription_idstring

SELECT examples

Get a Schema.

SELECT
id,
name,
description,
displayName,
format,
provisioningState,
schemaType,
systemData,
tags,
type,
uuid
FROM azure.device_registry.schemas
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND schema_registry_name = '{{ schema_registry_name }}' -- required
AND schema_name = '{{ schema_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a Schema.

INSERT INTO azure.device_registry.schemas (
properties,
resource_group_name,
schema_registry_name,
schema_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ schema_registry_name }}',
'{{ schema_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Create a Schema.

REPLACE azure.device_registry.schemas
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND schema_registry_name = '{{ schema_registry_name }}' --required
AND schema_name = '{{ schema_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Delete a Schema.

DELETE FROM azure.device_registry.schemas
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND schema_registry_name = '{{ schema_registry_name }}' --required
AND schema_name = '{{ schema_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;