Skip to main content

hierarchy_settings

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

Overview​

Namehierarchy_settings
TypeResource
Idazure.management_groups.hierarchy_settings

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.
defaultManagementGroupstringSettings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup.
requireAuthorizationForGroupCreationbooleanIndicates whether RBAC access is required upon group creation under the root Management Group. If set to true, user will require Microsoft.Management/managementGroups/write action on the root Management Group scope in order to create new Groups directly under the root. This will prevent new users from creating new Management Groups, unless they are given access.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tenantIdstringThe AAD Tenant ID associated with the hierarchy settings. For example, 00000000-0000-0000-0000-000000000000.
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
getselectgroup_idGets the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy.
create_or_updateinsertgroup_idCreates or updates the hierarchy settings defined at the Management Group level.
updateupdategroup_idUpdates the hierarchy settings defined at the Management Group level.
create_or_updatereplacegroup_idCreates or updates the hierarchy settings defined at the Management Group level.
deletedeletegroup_idDeletes the hierarchy settings defined at the Management Group level.
list_rawexecgroup_idGets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy.

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
group_idstringManagement Group ID. Required.

SELECT examples​

Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy.

SELECT
id,
name,
defaultManagementGroup,
requireAuthorizationForGroupCreation,
systemData,
tenantId,
type
FROM azure.management_groups.hierarchy_settings
WHERE group_id = '{{ group_id }}' -- required
;

INSERT examples​

Creates or updates the hierarchy settings defined at the Management Group level.

INSERT INTO azure.management_groups.hierarchy_settings (
properties,
group_id
)
SELECT
'{{ properties }}',
'{{ group_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples​

Updates the hierarchy settings defined at the Management Group level.

UPDATE azure.management_groups.hierarchy_settings
SET
properties = '{{ properties }}'
WHERE
group_id = '{{ group_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

REPLACE examples​

Creates or updates the hierarchy settings defined at the Management Group level.

REPLACE azure.management_groups.hierarchy_settings
SET
properties = '{{ properties }}'
WHERE
group_id = '{{ group_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples​

Deletes the hierarchy settings defined at the Management Group level.

DELETE FROM azure.management_groups.hierarchy_settings
WHERE group_id = '{{ group_id }}' --required
;

Lifecycle Methods​

Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy.

EXEC azure.management_groups.hierarchy_settings.list_raw
@group_id='{{ group_id }}' --required
;