default_accounts
Creates, updates, deletes, gets or lists a default_accounts resource.
Overview
| Name | default_accounts |
| Type | Resource |
| Id | azure.purview.default_accounts |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
accountName | string | The name of the account that is set as the default. |
resourceGroupName | string | The resource group name of the account that is set as the default. |
scope | string | The scope object ID. For example, sub ID or tenant ID. |
scopeTenantId | string | The scope tenant in which the default account is set. |
scopeType | string | The scope where the default account is set. Known values are: "Tenant" and "Subscription". |
subscriptionId | string | The subscription ID of the account that is set as the default. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | scopeTenantId, scopeType | scope | Gets the default account information set for the scope. Get the default account for the scope. |
set | exec | Sets the default account for the scope. Sets the default account for the scope. | ||
remove | exec | scopeTenantId, scopeType | scope | Removes 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.
| Name | Datatype | Description |
|---|---|---|
scopeTenantId | string | The tenant ID. Required. |
scopeType | string | The scope for the default account. Known values are: "Tenant" and "Subscription". Required. |
scope | string | The 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
- get
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
- set
- remove
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 }}"
}'
;
Removes the default account from the scope. Removes the default account from the scope.
EXEC azure.purview.default_accounts.remove
@scopeTenantId='{{ scopeTenantId }}' --required,
@scopeType='{{ scopeType }}' --required,
@scope='{{ scope }}'
;