Skip to main content

default_accounts

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

Overview

Namedefault_accounts
TypeResource
Idazure.purview.default_accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
accountNamestringThe name of the account that is set as the default.
resourceGroupNamestringThe resource group name of the account that is set as the default.
scopestringThe scope object ID. For example, sub ID or tenant ID.
scopeTenantIdstringThe scope tenant in which the default account is set.
scopeTypestringThe scope where the default account is set. Known values are: "Tenant" and "Subscription".
subscriptionIdstringThe subscription ID of the account that is set as the default.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectscopeTenantId, scopeTypescopeGets the default account information set for the scope. Get the default account for the scope.
setexecSets the default account for the scope. Sets the default account for the scope.
removeexecscopeTenantId, scopeTypescopeRemoves the default account from the scope. Removes the default account from the scope.

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
scopeTenantIdstringThe tenant ID. Required.
scopeTypestringThe scope for the default account. Known values are: "Tenant" and "Subscription". Required.
scopestringThe Id of the scope object, for example if the scope is "Subscription" then it is the ID of that subscription. Default value is None.

SELECT examples

Gets the default account information set for the scope. Get the default account for the scope.

SELECT
accountName,
resourceGroupName,
scope,
scopeTenantId,
scopeType,
subscriptionId
FROM azure.purview.default_accounts
WHERE scopeTenantId = '{{ scopeTenantId }}' -- required
AND scopeType = '{{ scopeType }}' -- required
AND scope = '{{ scope }}'
;

Lifecycle Methods

Sets the default account for the scope. Sets the default account for the scope.

EXEC azure.purview.default_accounts.set 
@@json=
'{
"accountName": "{{ accountName }}",
"resourceGroupName": "{{ resourceGroupName }}",
"scope": "{{ scope }}",
"scopeTenantId": "{{ scopeTenantId }}",
"scopeType": "{{ scopeType }}",
"subscriptionId": "{{ subscriptionId }}"
}'
;