Skip to main content

accounts

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

Overview

Nameaccounts
TypeResource
Idazure.device_update.accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
encryptionobjectCMK encryption at rest properties.
hostNamestringAPI host name.
identityobjectThe type of identity used for the resource.
locationstringThe geo-location where the resource lives. Required.
locationsarrayDevice Update account primary and failover location details.
privateEndpointConnectionsarrayList of private endpoint connections associated with the account.
provisioningStatestringProvisioning state. Known values are: "Succeeded", "Deleted", "Failed", "Canceled", "Accepted", and "Creating".
publicNetworkAccessstringWhether or not public network access is allowed for the account. Known values are: "Enabled" and "Disabled".
skustringDevice Update Sku. Known values are: "Free" and "Standard".
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, account_name, subscription_idReturns account details for the given account name.
list_by_resource_groupselectresource_group_name, subscription_idReturns list of Accounts.
list_by_subscriptionselectsubscription_idReturns list of Accounts.
createinsertresource_group_name, account_name, subscription_id, locationCreates or updates Account.
updateupdateresource_group_name, account_name, subscription_idUpdates account's patchable properties.
deletedeleteresource_group_name, account_name, subscription_idDeletes account.
headexecresource_group_name, account_name, subscription_idChecks whether account exists.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_namestringAccount name. Required.
resource_group_namestringThe resource group name. Required.
subscription_idstring

SELECT examples

Returns account details for the given account name.

SELECT
id,
name,
encryption,
hostName,
identity,
location,
locations,
privateEndpointConnections,
provisioningState,
publicNetworkAccess,
sku,
systemData,
tags,
type
FROM azure.device_update.accounts
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND account_name = '{{ account_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates Account.

INSERT INTO azure.device_update.accounts (
tags,
location,
identity,
properties,
resource_group_name,
account_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ identity }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ account_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates account's patchable properties.

UPDATE azure.device_update.accounts
SET
tags = '{{ tags }}',
identity = '{{ identity }}',
location = '{{ location }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes account.

DELETE FROM azure.device_update.accounts
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND account_name = '{{ account_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Checks whether account exists.

EXEC azure.device_update.accounts.head 
@resource_group_name='{{ resource_group_name }}' --required,
@account_name='{{ account_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;