assets
Creates, updates, deletes, gets or lists a assets
resource.
Overview
Name | assets |
Type | Resource |
Id | azure.device_registry.assets |
Fields
- vw_assets
- assets
Name | Datatype | Description |
---|---|---|
description | text | field from the properties object |
assetName | text | field from the properties object |
asset_endpoint_profile_ref | text | field from the properties object |
attributes | text | field from the properties object |
datasets | text | field from the properties object |
default_datasets_configuration | text | field from the properties object |
default_events_configuration | text | field from the properties object |
default_topic | text | field from the properties object |
discovered_asset_refs | text | field from the properties object |
display_name | text | field from the properties object |
documentation_uri | text | field from the properties object |
enabled | text | field from the properties object |
events | text | field from the properties object |
extended_location | text | field from the properties object |
external_asset_id | text | field from the properties object |
hardware_revision | text | field from the properties object |
location | text | The geo-location where the resource lives |
manufacturer | text | field from the properties object |
manufacturer_uri | text | field from the properties object |
model | text | field from the properties object |
product_code | text | field from the properties object |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
serial_number | text | field from the properties object |
software_revision | text | field from the properties object |
status | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
uuid | text | field from the properties object |
version | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
extendedLocation | object | The extended location. |
location | string | The geo-location where the resource lives |
properties | object | Defines the asset properties. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | assetName, resourceGroupName, subscriptionId | Get a Asset |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List Asset resources by resource group |
list_by_subscription | SELECT | subscriptionId | List Asset resources by subscription ID |
create_or_replace | INSERT | assetName, resourceGroupName, subscriptionId, data__extendedLocation | Create a Asset |
delete | DELETE | assetName, resourceGroupName, subscriptionId | Delete a Asset |
update | UPDATE | assetName, resourceGroupName, subscriptionId | Update a Asset |
SELECT
examples
List Asset resources by subscription ID
- vw_assets
- assets
SELECT
description,
assetName,
asset_endpoint_profile_ref,
attributes,
datasets,
default_datasets_configuration,
default_events_configuration,
default_topic,
discovered_asset_refs,
display_name,
documentation_uri,
enabled,
events,
extended_location,
external_asset_id,
hardware_revision,
location,
manufacturer,
manufacturer_uri,
model,
product_code,
provisioning_state,
resourceGroupName,
serial_number,
software_revision,
status,
subscriptionId,
tags,
uuid,
version
FROM azure.device_registry.vw_assets
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
extendedLocation,
location,
properties,
tags
FROM azure.device_registry.assets
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new assets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.device_registry.assets (
assetName,
resourceGroupName,
subscriptionId,
data__extendedLocation,
properties,
extendedLocation,
tags,
location
)
SELECT
'{{ assetName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__extendedLocation }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: uuid
value: string
- name: enabled
value: boolean
- name: externalAssetId
value: string
- name: displayName
value: string
- name: description
value: string
- name: assetEndpointProfileRef
value: string
- name: version
value: integer
- name: manufacturer
value: string
- name: manufacturerUri
value: string
- name: model
value: string
- name: productCode
value: string
- name: hardwareRevision
value: string
- name: softwareRevision
value: string
- name: documentationUri
value: string
- name: serialNumber
value: string
- name: attributes
value: object
- name: discoveredAssetRefs
value:
- string
- name: defaultDatasetsConfiguration
value: string
- name: defaultEventsConfiguration
value: string
- name: defaultTopic
value:
- name: path
value: string
- name: retain
value: string
- name: datasets
value:
- - name: name
value: string
- name: datasetConfiguration
value: string
- name: dataPoints
value:
- - name: observabilityMode
value: string
- name: name
value: string
- name: dataSource
value: string
- name: dataPointConfiguration
value: string
- name: events
value:
- - name: observabilityMode
value: string
- name: name
value: string
- name: eventNotifier
value: string
- name: eventConfiguration
value: string
- name: status
value:
- name: errors
value:
- - name: code
value: integer
- name: message
value: string
- name: version
value: integer
- name: datasets
value:
- - name: name
value: string
- name: messageSchemaReference
value:
- name: schemaRegistryNamespace
value: string
- name: schemaName
value: string
- name: schemaVersion
value: string
- name: events
value:
- - name: name
value: string
- name: provisioningState
value: []
- name: extendedLocation
value:
- name: type
value: string
- name: name
value: string
- name: tags
value: object
- name: location
value: string
UPDATE
example
Updates a assets
resource.
/*+ update */
UPDATE azure.device_registry.assets
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
assetName = '{{ assetName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified assets
resource.
/*+ delete */
DELETE FROM azure.device_registry.assets
WHERE assetName = '{{ assetName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';