ManagementGroupsOperations Class

ManagementGroupsOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
ManagementGroupsOperations

Constructor

ManagementGroupsOperations(client, config, serializer, deserializer)

Parameters

Name Description
client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

Name Description
models

Alias to model classes used in this operation group.

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 | None = 'no-cache', **kwargs: Any) -> LROPoller['_models.ManagementGroup' | '_models.AzureAsyncOperationResults']

Parameters

Name Description
group_id
Required
str

Management Group ID.

create_management_group_request
Required

Management group creation parameters.

cache_control
str

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

Default value: no-cache

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either ManagementGroup or the result of cls(response)

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 | None = 'no-cache', **kwargs: Any) -> LROPoller['_models.AzureAsyncOperationResults']

Parameters

Name Description
group_id
Required
str

Management Group ID.

cache_control
str

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

Default value: no-cache

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either AzureAsyncOperationResults or the result of cls(response)

Exceptions

Type Description

get

Get the details of the management group.

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

Parameters

Name Description
group_id
Required
str

Management Group ID.

expand
str or Enum0

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.

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: None
filter
str

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

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: no-cache

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

ManagementGroup, or the result of cls(response)

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) -> Iterable['_models.DescendantListResult']

Parameters

Name Description
group_id
Required
str

Management Group ID.

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: None
top
int

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

Default value: None

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either DescendantListResult or the result of cls(response)

Exceptions

Type Description

list

List management groups for the authenticated user.

list(cache_control: str | None = 'no-cache', skiptoken: str | None = None, **kwargs: Any) -> Iterable['_models.ManagementGroupListResult']

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: 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: None

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either ManagementGroupListResult or the result of cls(response)

Exceptions

Type Description

update

Update a management group.

update(group_id: str, patch_group_request: '_models.PatchManagementGroupRequest', cache_control: str | None = 'no-cache', **kwargs: Any) -> _models.ManagementGroup

Parameters

Name Description
group_id
Required
str

Management Group ID.

patch_group_request
Required

Management group patch parameters.

cache_control
str

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

Default value: no-cache

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

ManagementGroup, or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.managementgroups.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\managementgroups\\models\\__init__.py'>