schema_versions
Creates, updates, deletes, gets or lists a schema_versions
resource.
Overview
Name | schema_versions |
Type | Resource |
Id | azure.device_registry.schema_versions |
Fields
- vw_schema_versions
- schema_versions
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
hash | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
schemaName | text | field from the properties object |
schemaRegistryName | text | field from the properties object |
schemaVersionName | text | field from the properties object |
schema_content | text | field from the properties object |
subscriptionId | text | field from the properties object |
uuid | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Defines the schema version properties. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | resourceGroupName, schemaName, schemaRegistryName, schemaVersionName, subscriptionId | Get a SchemaVersion |
list_by_schema | SELECT | resourceGroupName, schemaName, schemaRegistryName, subscriptionId | List SchemaVersion resources by Schema |
create_or_replace | INSERT | resourceGroupName, schemaName, schemaRegistryName, schemaVersionName, subscriptionId | Create a SchemaVersion |
delete | DELETE | resourceGroupName, schemaName, schemaRegistryName, schemaVersionName, subscriptionId | Delete a SchemaVersion |
SELECT
examples
List SchemaVersion resources by Schema
- vw_schema_versions
- schema_versions
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 }}';
SELECT
properties
FROM azure.device_registry.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.device_registry.schema_versions (
resourceGroupName,
schemaName,
schemaRegistryName,
schemaVersionName,
subscriptionId,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ schemaName }}',
'{{ schemaRegistryName }}',
'{{ schemaVersionName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: uuid
value: string
- name: description
value: string
- name: schemaContent
value: string
- name: hash
value: string
- name: provisioningState
value: []
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 }}';