ManagementGroupsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ManagementGroupsMgmtClient's

<xref:management_groups> attribute.

Constructor

ManagementGroupsOperations(*args, **kwargs)

Methods

begin_create_or_update

Create 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.

begin_delete

Delete management group. If a management group contains child resources, the request will fail.

get

Get the details of the management group.

get_descendants

List all entities that descend from a management group.

list

List management groups for the authenticated user.

update

Update a management group.

begin_create_or_update

Create 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.

begin_create_or_update(group_id: str, create_management_group_request: _models.CreateManagementGroupRequest, *, cache_control: str = 'no-cache', content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.ManagementGroup]

Parameters

Name Description
group_id
Required
str

Management Group ID. Required.

create_management_group_request
Required

Management group creation parameters. Is one of the following types: CreateManagementGroupRequest, JSON, IO[bytes] Required.

Keyword-Only Parameters

Name Description
cache_control
str

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache".

Default value: no-cache

Returns

Type Description

An instance of LROPoller that returns ManagementGroup. The ManagementGroup is compatible with MutableMapping

Exceptions

Type Description

begin_delete

Delete management group. If a management group contains child resources, the request will fail.

begin_delete(group_id: str, *, cache_control: str = 'no-cache', **kwargs: Any) -> LROPoller[None]

Parameters

Name Description
group_id
Required
str

Management Group ID. Required.

Keyword-Only Parameters

Name Description
cache_control
str

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache".

Default value: no-cache

Returns

Type Description

An instance of LROPoller that returns None

Exceptions

Type Description

get

Get the details of the management group.

get(group_id: str, *, expand: str | ManagementGroupExpandType | None = None, recurse: bool | None = None, filter: str | None = None, cache_control: str = 'no-cache', **kwargs: Any) -> ManagementGroup

Parameters

Name Description
group_id
Required
str

Management Group ID. Required.

Keyword-Only Parameters

Name Description
expand

The $expand=children query string parameter allows clients to request inclusion of children in the response payload. $expand=path includes the path from the root group to the current group. $expand=ancestors includes the ancestor Ids of the current group. Known values are: "children", "path", and "ancestors". Default value is None.

Default value: None
recurse

The $recurse=true query string parameter allows clients to request inclusion of entire hierarchy in the response payload. Note that $expand=children must be passed up if $recurse is set to true. Default value is None.

Default value: None
filter
str

A filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType ne Subscription'). Default value is None.

Default value: None
cache_control
str

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache".

Default value: no-cache

Returns

Type Description

ManagementGroup. The ManagementGroup is compatible with MutableMapping

Exceptions

Type Description

get_descendants

List all entities that descend from a management group.

get_descendants(group_id: str, *, skiptoken: str | None = None, top: int | None = None, **kwargs: Any) -> ItemPaged[DescendantInfo]

Parameters

Name Description
group_id
Required
str

Management Group ID. Required.

Keyword-Only Parameters

Name Description
skiptoken
str

Page continuation token is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls. Default value is None.

Default value: None
top
int

Number of elements to return when retrieving results. Passing this in will override $skipToken. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of DescendantInfo

Exceptions

Type Description

list

List management groups for the authenticated user.

list(*, cache_control: str = 'no-cache', skiptoken: str | None = None, **kwargs: Any) -> ItemPaged[ManagementGroupInfo]

Keyword-Only Parameters

Name Description
cache_control
str

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache".

Default value: no-cache
skiptoken
str

Page continuation token is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a token parameter that specifies a starting point to use for subsequent calls. Default value is None.

Default value: None

Returns

Type Description

An iterator like instance of ManagementGroupInfo

Exceptions

Type Description

update

Update a management group.

update(group_id: str, patch_group_request: _models.PatchManagementGroupRequest, *, cache_control: str = 'no-cache', content_type: str = 'application/json', **kwargs: Any) -> _models.ManagementGroup

Parameters

Name Description
group_id
Required
str

Management Group ID. Required.

patch_group_request
Required
PatchManagementGroupRequest or <xref:JSON> or IO[bytes]

Management group patch parameters. Is one of the following types: PatchManagementGroupRequest, JSON, IO[bytes] Required.

Keyword-Only Parameters

Name Description
cache_control
str

Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches. Default value is "no-cache".

Default value: no-cache

Returns

Type Description

ManagementGroup. The ManagementGroup is compatible with MutableMapping

Exceptions

Type Description