Skip to main content

accounts

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

Overview

Nameaccounts
TypeResource
Idazure.graph_services.accounts

Fields

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
namestringThe name of the resource
propertiesobjectProperty bag from billing account
systemDataobjectMetadata pertaining to creation and last modification of the resource.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Methods

NameAccessible byRequired ParamsDescription
getSELECTresourceGroupName, resourceName, subscriptionIdReturns account resource for a given name.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdReturns list of accounts apps.
list_by_subscriptionSELECTsubscriptionIdReturns list of accounts belonging to a subscription.
create_and_updateINSERTresourceGroupName, resourceName, subscriptionId, data__propertiesCreate or update account resource.
deleteDELETEresourceGroupName, resourceName, subscriptionIdDeletes a account resource.
updateUPDATEresourceGroupName, resourceName, subscriptionIdUpdate account details.

SELECT examples

Returns list of accounts belonging to a subscription.

SELECT
id,
name,
properties,
systemData,
type
FROM azure.graph_services.accounts
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.graph_services.accounts (
resourceGroupName,
resourceName,
subscriptionId,
data__properties,
properties
)
SELECT
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ properties }}'
;

UPDATE example

Updates a accounts resource.

/*+ update */
UPDATE azure.graph_services.accounts
SET
tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified accounts resource.

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