Skip to main content

discovered_assets

Creates, updates, deletes, gets or lists a discovered_assets resource.

Overview

Namediscovered_assets
TypeResource
Idazure.device_registry.discovered_assets

Fields

NameDatatypeDescription
asset_endpoint_profile_reftextfield from the properties object
datasetstextfield from the properties object
default_datasets_configurationtextfield from the properties object
default_events_configurationtextfield from the properties object
default_topictextfield from the properties object
discoveredAssetNametextfield from the properties object
discovery_idtextfield from the properties object
documentation_uritextfield from the properties object
eventstextfield from the properties object
extended_locationtextfield from the properties object
hardware_revisiontextfield from the properties object
locationtextThe geo-location where the resource lives
manufacturertextfield from the properties object
manufacturer_uritextfield from the properties object
modeltextfield from the properties object
product_codetextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
serial_numbertextfield from the properties object
software_revisiontextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdiscoveredAssetName, resourceGroupName, subscriptionIdGet a DiscoveredAsset
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList DiscoveredAsset resources by resource group
list_by_subscriptionSELECTsubscriptionIdList DiscoveredAsset resources by subscription ID
create_or_replaceINSERTdiscoveredAssetName, resourceGroupName, subscriptionId, data__extendedLocationCreate a DiscoveredAsset
deleteDELETEdiscoveredAssetName, resourceGroupName, subscriptionIdDelete a DiscoveredAsset
updateUPDATEdiscoveredAssetName, resourceGroupName, subscriptionIdUpdate a DiscoveredAsset

SELECT examples

List DiscoveredAsset resources by subscription ID

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new discovered_assets resource.

/*+ 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 }}'
;

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 }}';