Skip to main content

accounts

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

Overview

Nameaccounts
TypeResource
Idazure.purview.accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringGets or sets the identifier.
namestringGets or sets the name.
identityobjectThe Managed Identity of the resource
locationstringGets or sets the location.
propertiesobjectThe account properties
skuobjectThe Sku
systemDataobjectMetadata pertaining to creation and last modification of the resource.
tagsobjectTags on the azure resource.
typestringGets or sets the type.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, accountNameapi-versionGet an account
list_by_resource_groupselectsubscriptionId, resourceGroupNameapi-version, $skipTokenList accounts in ResourceGroup
list_by_subscriptionselectsubscriptionIdapi-version, $skipTokenList accounts in Subscription
create_or_updateinsertsubscriptionId, resourceGroupName, accountNameapi-versionCreates or updates an account
updateupdatesubscriptionId, resourceGroupName, accountNameapi-versionUpdates an account
deletedeletesubscriptionId, resourceGroupName, accountNameapi-versionDeletes an account resource
add_root_collection_adminexecsubscriptionId, resourceGroupName, accountNameapi-versionAdd the administrator for root collection associated with this account.
check_name_availabilityexecsubscriptionIdapi-versionChecks if account name is available.

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
accountNamestringThe name of the account.
resourceGroupNamestringThe resource group name.
subscriptionIdstringThe subscription identifier
$skipTokenstringThe skip token.
api-versionstringThe api version to use.

SELECT examples

Get an account

SELECT
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
FROM azure.purview.accounts
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND api-version = '{{ api-version }}'
;

INSERT examples

Creates or updates an account

INSERT INTO azure.purview.accounts (
data__identity,
data__location,
data__tags,
data__properties,
data__sku,
subscriptionId,
resourceGroupName,
accountName,
api-version
)
SELECT
'{{ identity }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ sku }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ accountName }}',
'{{ api-version }}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type
;

UPDATE examples

Updates an account

UPDATE azure.purview.accounts
SET
data__identity = '{{ identity }}',
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND api-version = '{{ api-version}}'
RETURNING
id,
name,
identity,
location,
properties,
sku,
systemData,
tags,
type;

DELETE examples

Deletes an account resource

DELETE FROM azure.purview.accounts
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND accountName = '{{ accountName }}' --required
AND api-version = '{{ api-version }}'
;

Lifecycle Methods

Add the administrator for root collection associated with this account.

EXEC azure.purview.accounts.add_root_collection_admin 
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@accountName='{{ accountName }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"objectId": "{{ objectId }}"
}'
;