discovered_assets
Creates, updates, deletes, gets or lists a discovered_assets
resource.
Overview
Name | discovered_assets |
Type | Resource |
Id | azure.device_registry.discovered_assets |
Fields
- vw_discovered_assets
- discovered_assets
Name | Datatype | Description |
---|---|---|
asset_endpoint_profile_ref | 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 |
discoveredAssetName | text | field from the properties object |
discovery_id | text | field from the properties object |
documentation_uri | text | field from the properties object |
events | text | field from the properties object |
extended_location | 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 |
subscriptionId | text | field from the properties object |
tags | text | Resource tags. |
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 discovered asset properties. |
tags | object | Resource tags. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | discoveredAssetName, resourceGroupName, subscriptionId | Get a DiscoveredAsset |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | List DiscoveredAsset resources by resource group |
list_by_subscription | SELECT | subscriptionId | List DiscoveredAsset resources by subscription ID |
create_or_replace | INSERT | discoveredAssetName, resourceGroupName, subscriptionId, data__extendedLocation | Create a DiscoveredAsset |
delete | DELETE | discoveredAssetName, resourceGroupName, subscriptionId | Delete a DiscoveredAsset |
update | UPDATE | discoveredAssetName, resourceGroupName, subscriptionId | Update a DiscoveredAsset |
SELECT
examples
List DiscoveredAsset resources by subscription ID
- vw_discovered_assets
- discovered_assets
SELECT
asset_endpoint_profile_ref,
datasets,
default_datasets_configuration,
default_events_configuration,
default_topic,
discoveredAssetName,
discovery_id,
documentation_uri,
events,
extended_location,
hardware_revision,
location,
manufacturer,
manufacturer_uri,
model,
product_code,
provisioning_state,
resourceGroupName,
serial_number,
software_revision,
subscriptionId,
tags,
version
FROM azure.device_registry.vw_discovered_assets
WHERE subscriptionId = '{{ subscriptionId }}';
SELECT
extendedLocation,
location,
properties,
tags
FROM azure.device_registry.discovered_assets
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new discovered_assets
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.device_registry.discovered_assets (
discoveredAssetName,
resourceGroupName,
subscriptionId,
data__extendedLocation,
properties,
extendedLocation,
tags,
location
)
SELECT
'{{ discoveredAssetName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__extendedLocation }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ location }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: assetEndpointProfileRef
value: string
- name: discoveryId
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: 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: name
value: string
- name: dataSource
value: string
- name: dataPointConfiguration
value: string
- name: lastUpdatedOn
value: string
- name: events
value:
- - name: name
value: string
- name: eventNotifier
value: string
- name: eventConfiguration
value: string
- name: lastUpdatedOn
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 discovered_assets
resource.
/*+ update */
UPDATE azure.device_registry.discovered_assets
SET
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
discoveredAssetName = '{{ discoveredAssetName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified discovered_assets
resource.
/*+ delete */
DELETE FROM azure.device_registry.discovered_assets
WHERE discoveredAssetName = '{{ discoveredAssetName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';