Skip to main content

accounts

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

Overview

Nameaccounts
TypeResource
Idazure.device_update.accounts

Fields

NameDatatypeDescription
identityobjectManaged service identity (system assigned and/or user assigned identities)
locationstringThe geo-location where the resource lives
propertiesobjectDevice Update account properties.
tagsobjectResource tags.

Methods

NameAccessible byRequired ParamsDescription
getSELECTaccountName, resourceGroupName, subscriptionIdReturns account details for the given account name.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdReturns list of Accounts.
list_by_subscriptionSELECTsubscriptionIdReturns list of Accounts.
createINSERTaccountName, resourceGroupName, subscriptionIdCreates or updates Account.
deleteDELETEaccountName, resourceGroupName, subscriptionIdDeletes account.
updateUPDATEaccountName, resourceGroupName, subscriptionIdUpdates account's patchable properties

SELECT examples

Returns list of Accounts.

SELECT
identity,
location,
properties,
tags
FROM azure.device_update.accounts
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

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

UPDATE example

Updates a accounts resource.

/*+ update */
UPDATE azure.device_update.accounts
SET
identity = '{{ identity }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
accountName = '{{ accountName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified accounts resource.

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