ManagementGroupsOperations Class

ManagementGroupsOperations async 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

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

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.

async begin_create_or_update(group_id: str, create_management_group_request: azure.mgmt.managementgroups.models._models_py3.CreateManagementGroupRequest, cache_control: Optional[str] = 'no-cache', **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[Union[azure.mgmt.managementgroups.models._models_py3.ManagementGroup, azure.mgmt.managementgroups.models._models_py3.AzureAsyncOperationResults]]

Parameters

group_id
str
Required

Management Group ID.

create_management_group_request
CreateManagementGroupRequest
Required

Management group creation parameters.

cache_control
str
default value: no-cache

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

cls
callable

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
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. 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

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

Return type

Exceptions

begin_delete

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

async begin_delete(group_id: str, cache_control: Optional[str] = 'no-cache', **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.managementgroups.models._models_py3.AzureAsyncOperationResults]

Parameters

group_id
str
Required

Management Group ID.

cache_control
str
default value: no-cache

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

cls
callable

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
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. 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

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

Return type

Exceptions

get

Get the details of the management group.

async get(group_id: str, expand: Optional[Union[str, azure.mgmt.managementgroups.models._management_groups_api_enums.Enum0]] = None, recurse: Optional[bool] = None, filter: Optional[str] = None, cache_control: Optional[str] = 'no-cache', **kwargs: Any) -> azure.mgmt.managementgroups.models._models_py3.ManagementGroup

Parameters

group_id
str
Required

Management Group ID.

expand
str or Enum0
default value: None

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.

recurse
bool
default value: None

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.

filter
str
default value: None

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

cache_control
str
default value: no-cache

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

cls
callable

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

Returns

ManagementGroup, or the result of cls(response)

Return type

Exceptions

get_descendants

List all entities that descend from a management group.

get_descendants(group_id: str, skiptoken: Optional[str] = None, top: Optional[int] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.managementgroups.models._models_py3.DescendantListResult]

Parameters

group_id
str
Required

Management Group ID.

skiptoken
str
default value: None

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.

top
int
default value: None

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

cls
callable

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

Returns

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

Return type

Exceptions

list

List management groups for the authenticated user.

list(cache_control: Optional[str] = 'no-cache', skiptoken: Optional[str] = None, **kwargs: Any) -> AsyncIterable[azure.mgmt.managementgroups.models._models_py3.ManagementGroupListResult]

Parameters

cache_control
str
default value: no-cache

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

skiptoken
str
default value: None

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.

cls
callable

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

Returns

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

Return type

Exceptions

update

Update a management group.

async update(group_id: str, patch_group_request: azure.mgmt.managementgroups.models._models_py3.PatchManagementGroupRequest, cache_control: Optional[str] = 'no-cache', **kwargs: Any) -> azure.mgmt.managementgroups.models._models_py3.ManagementGroup

Parameters

group_id
str
Required

Management Group ID.

patch_group_request
PatchManagementGroupRequest
Required

Management group patch parameters.

cache_control
str
default value: no-cache

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

cls
callable

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

Returns

ManagementGroup, or the result of cls(response)

Return type

Exceptions

Attributes

models

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