Skip to main content

schemas

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

Overview

Nameschemas
TypeResource
Idazure.device_registry.schemas

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
display_nametextfield from the properties object
formattextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
schemaNametextfield from the properties object
schemaRegistryNametextfield from the properties object
schema_typetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextfield from the properties object
uuidtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, schemaName, schemaRegistryName, subscriptionIdGet a Schema
list_by_schema_registrySELECTresourceGroupName, schemaRegistryName, subscriptionIdList Schema resources by SchemaRegistry
create_or_replaceINSERTresourceGroupName, schemaName, schemaRegistryName, subscriptionIdCreate a Schema
deleteDELETEresourceGroupName, schemaName, schemaRegistryName, subscriptionIdDelete a Schema

SELECT examples

List Schema resources by SchemaRegistry

SELECT
description,
display_name,
format,
provisioning_state,
resourceGroupName,
schemaName,
schemaRegistryName,
schema_type,
subscriptionId,
tags,
uuid
FROM azure.device_registry.vw_schemas
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND schemaRegistryName = '{{ schemaRegistryName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new schemas resource.

/*+ create */
INSERT INTO azure.device_registry.schemas (
resourceGroupName,
schemaName,
schemaRegistryName,
subscriptionId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ schemaName }}',
'{{ schemaRegistryName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified schemas resource.

/*+ delete */
DELETE FROM azure.device_registry.schemas
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND schemaName = '{{ schemaName }}'
AND schemaRegistryName = '{{ schemaRegistryName }}'
AND subscriptionId = '{{ subscriptionId }}';