Skip to main content

management_groups

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

Overview

Namemanagement_groups
TypeResource
Idazure.management_groups.management_groups

Fields

NameDatatypeDescription
idtextThe fully qualified ID for the management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
nametextThe name of the management group. For example, 00000000-0000-0000-0000-000000000000
childrentextfield from the properties object
detailstextfield from the properties object
display_nametextfield from the properties object
groupIdtextfield from the properties object
tenant_idtextfield from the properties object
typetextThe type of the resource. For example, Microsoft.Management/managementGroups

Methods

NameAccessible byRequired ParamsDescription
getSELECTgroupIdGet the details of the management group.
listSELECTList management groups for the authenticated user.
create_or_updateINSERTgroupIdCreate or update a management group.
If a management group is already created and a subsequent create request is issued with different properties, the management group properties will be updated.
deleteDELETEgroupIdDelete management group.
If a management group contains child resources, the request will fail.
updateUPDATEgroupIdUpdate a management group.

SELECT examples

List management groups for the authenticated user.

SELECT
id,
name,
children,
details,
display_name,
groupId,
tenant_id,
type
FROM azure.management_groups.vw_management_groups
;

INSERT example

Use the following StackQL query and manifest file to create a new management_groups resource.

/*+ create */
INSERT INTO azure.management_groups.management_groups (
groupId,
name,
properties
)
SELECT
'{{ groupId }}',
'{{ name }}',
'{{ properties }}'
;

UPDATE example

Updates a management_groups resource.

/*+ update */
UPDATE azure.management_groups.management_groups
SET
displayName = '{{ displayName }}',
parentGroupId = '{{ parentGroupId }}'
WHERE
groupId = '{{ groupId }}';

DELETE example

Deletes the specified management_groups resource.

/*+ delete */
DELETE FROM azure.management_groups.management_groups
WHERE groupId = '{{ groupId }}';