Skip to main content

instances

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

Overview

Nameinstances
TypeResource
Idazure.device_update.instances

Fields

NameDatatypeDescription
locationstringThe geo-location where the resource lives
propertiesobjectDevice Update instance properties.
tagsobjectResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, instanceName, resourceGroupName, subscriptionIdReturns instance details for the given instance and account name.
list_by_accountSELECTaccountName, resourceGroupName, subscriptionIdReturns instances for the given account name.
createINSERTaccountName, instanceName, resourceGroupName, subscriptionId, data__propertiesCreates or updates instance.
deleteDELETEaccountName, instanceName, resourceGroupName, subscriptionIdDeletes instance.
updateUPDATEaccountName, instanceName, resourceGroupName, subscriptionIdUpdates instance's tags.

SELECT examples

Returns instances for the given account name.

SELECT
location,
properties,
tags
FROM azure.device_update.instances
WHERE accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.device_update.instances (
accountName,
instanceName,
resourceGroupName,
subscriptionId,
data__properties,
tags,
location,
properties
)
SELECT
'{{ accountName }}',
'{{ instanceName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ tags }}',
'{{ location }}',
'{{ properties }}'
;

UPDATE example

Updates a instances resource.

/*+ update */
UPDATE azure.device_update.instances
SET
tags = '{{ tags }}'
WHERE
accountName = '{{ accountName }}'
AND instanceName = '{{ instanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified instances resource.

/*+ delete */
DELETE FROM azure.device_update.instances
WHERE accountName = '{{ accountName }}'
AND instanceName = '{{ instanceName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';