Skip to main content

schema_versions

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

Overview

Nameschema_versions
TypeResource
Idazure.device_registry.schema_versions

Fields

NameDatatypeDescription
descriptiontextfield from the properties object
hashtextfield 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
schemaVersionNametextfield from the properties object
schema_contenttextfield from the properties object
subscriptionIdtextfield from the properties object
uuidtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, schemaName, schemaRegistryName, schemaVersionName, subscriptionIdGet a SchemaVersion
list_by_schemaSELECTresourceGroupName, schemaName, schemaRegistryName, subscriptionIdList SchemaVersion resources by Schema
create_or_replaceINSERTresourceGroupName, schemaName, schemaRegistryName, schemaVersionName, subscriptionIdCreate a SchemaVersion
deleteDELETEresourceGroupName, schemaName, schemaRegistryName, schemaVersionName, subscriptionIdDelete a SchemaVersion

SELECT examples

List SchemaVersion resources by Schema

SELECT
description,
hash,
provisioning_state,
resourceGroupName,
schemaName,
schemaRegistryName,
schemaVersionName,
schema_content,
subscriptionId,
uuid
FROM azure.device_registry.vw_schema_versions
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND schemaName = '{{ schemaName }}'
AND schemaRegistryName = '{{ schemaRegistryName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

DELETE example

Deletes the specified schema_versions resource.

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