schemas
Creates, updates, deletes, gets or lists a schemas resource.
Overview
| Name | schemas |
| Type | Resource |
| Id | azure.device_registry.schemas |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_schema_registry
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | Human-readable description of the schema. |
displayName | string | Human-readable display name. |
format | string | Format of the schema. Required. Known values are: "JsonSchema/draft-07" and "Delta/1.0". (JsonSchema/draft-07, Delta/1.0) |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", and "Deleting". (Succeeded, Failed, Canceled, Accepted, Deleting) |
schemaType | string | Type of the schema. Required. "MessageSchema" (MessageSchema) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Schema tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uuid | string | Globally unique, immutable, non-reusable id. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
description | string | Human-readable description of the schema. |
displayName | string | Human-readable display name. |
format | string | Format of the schema. Required. Known values are: "JsonSchema/draft-07" and "Delta/1.0". (JsonSchema/draft-07, Delta/1.0) |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", "Canceled", "Accepted", and "Deleting". (Succeeded, Failed, Canceled, Accepted, Deleting) |
schemaType | string | Type of the schema. Required. "MessageSchema" (MessageSchema) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Schema tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
uuid | string | Globally unique, immutable, non-reusable id. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, schema_registry_name, schema_name, subscription_id | Get a Schema. | |
list_by_schema_registry | select | resource_group_name, schema_registry_name, subscription_id | List Schema resources by SchemaRegistry. | |
create_or_replace | insert | resource_group_name, schema_registry_name, schema_name, subscription_id | Create a Schema. | |
create_or_replace | replace | resource_group_name, schema_registry_name, schema_name, subscription_id | Create a Schema. | |
delete | delete | resource_group_name, schema_registry_name, schema_name, subscription_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
schema_name | string | Schema name parameter. Required. |
schema_registry_name | string | Schema registry name parameter. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_schema_registry
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
;
List Schema resources by SchemaRegistry.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_replace
- Manifest
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
;
# Description fields are for documentation purposes
- name: schemas
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the schemas resource.
- name: schema_registry_name
value: "{{ schema_registry_name }}"
description: Required parameter for the schemas resource.
- name: schema_name
value: "{{ schema_name }}"
description: Required parameter for the schemas resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the schemas resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
uuid: "{{ uuid }}"
displayName: "{{ displayName }}"
description: "{{ description }}"
format: "{{ format }}"
schemaType: "{{ schemaType }}"
provisioningState: "{{ provisioningState }}"
tags: "{{ tags }}"
REPLACE examples
- create_or_replace
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
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
;