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