hierarchy_settings
Creates, updates, deletes, gets or lists a hierarchy_settings resource.
Overview
| Name | hierarchy_settings |
| Type | Resource |
| Id | azure.management_groups.hierarchy_settings |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
defaultManagementGroup | string | Settings that sets the default Management Group under which new subscriptions get added in this tenant. For example, /providers/Microsoft.Management/managementGroups/defaultGroup. |
requireAuthorizationForGroupCreation | boolean | Indicates 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. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tenantId | string | The AAD Tenant ID associated with the hierarchy settings. For example, 00000000-0000-0000-0000-000000000000. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | group_id | Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root Management Group of the hierarchy. | |
create_or_update | insert | group_id | Creates or updates the hierarchy settings defined at the Management Group level. | |
update | update | group_id | Updates the hierarchy settings defined at the Management Group level. | |
create_or_update | replace | group_id | Creates or updates the hierarchy settings defined at the Management Group level. | |
delete | delete | group_id | Deletes the hierarchy settings defined at the Management Group level. | |
list_raw | exec | group_id | Gets 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.
| Name | Datatype | Description |
|---|---|---|
group_id | string | Management Group ID. Required. |
SELECT examples
- get
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
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: hierarchy_settings
props:
- name: group_id
value: "{{ group_id }}"
description: Required parameter for the hierarchy_settings resource.
- name: properties
description: |
The properties of the request to create or update Management Group settings.
value:
requireAuthorizationForGroupCreation: {{ requireAuthorizationForGroupCreation }}
defaultManagementGroup: "{{ defaultManagementGroup }}"
UPDATE examples
- update
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
- create_or_update
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
- delete
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
- list_raw
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
;