Skip to main content

targets

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

Overview

Nametargets
TypeResource
Idazure.iot_orchestrator.targets

Fields

NameDatatypeDescription
nametextfield from the properties object
componentstextfield from the properties object
extended_locationtextfield from the properties object
locationtextThe geo-location where the resource lives
provisioning_statetextfield from the properties object
reconciliation_policytextfield from the properties object
resourceGroupNametextfield from the properties object
scopetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
topologiestextfield from the properties object
versiontextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTname, resourceGroupName, subscriptionIdGet a Target
list_by_resource_groupSELECTresourceGroupName, subscriptionIdList Target resources by resource group
list_by_subscriptionSELECTsubscriptionIdList Target resources by subscription ID
create_or_updateINSERTname, resourceGroupName, subscriptionId, data__extendedLocationCreate a Target
deleteDELETEname, resourceGroupName, subscriptionIdDelete a Target
updateUPDATEname, resourceGroupName, subscriptionIdUpdate a Target

SELECT examples

List Target resources by subscription ID

SELECT
name,
components,
extended_location,
location,
provisioning_state,
reconciliation_policy,
resourceGroupName,
scope,
subscriptionId,
tags,
topologies,
version
FROM azure.iot_orchestrator.vw_targets
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.iot_orchestrator.targets (
name,
resourceGroupName,
subscriptionId,
data__extendedLocation,
properties,
extendedLocation,
tags,
location
)
SELECT
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__extendedLocation }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ tags }}',
'{{ location }}'
;

UPDATE example

Updates a targets resource.

/*+ update */
UPDATE azure.iot_orchestrator.targets
SET
tags = '{{ tags }}'
WHERE
name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified targets resource.

/*+ delete */
DELETE FROM azure.iot_orchestrator.targets
WHERE name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';