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.objectManagementGroupsOperations
Constructor
ManagementGroupsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
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.
begin_create_or_update(group_id: str, create_management_group_request: _models.CreateManagementGroupRequest, cache_control: Optional[str] = 'no-cache', **kwargs: Any) -> LROPoller[Union[_models.ManagementGroup, _models.AzureAsyncOperationResults]]
Parameters
- create_management_group_request
- CreateManagementGroupRequest
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.
- 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 PollingMethod
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
An instance of LROPoller 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.
begin_delete(group_id: str, cache_control: Optional[str] = 'no-cache', **kwargs: Any) -> LROPoller[_models.AzureAsyncOperationResults]
Parameters
- cache_control
- str
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 PollingMethod
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
An instance of LROPoller that returns either AzureAsyncOperationResults or the result of cls(response)
Return type
Exceptions
get
Get the details of the management group.
get(group_id: str, expand: Optional[Union[str, _models.Enum0]] = None, recurse: Optional[bool] = None, filter: Optional[str] = None, cache_control: Optional[str] = 'no-cache', **kwargs: Any) -> _models.ManagementGroup
Parameters
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
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
A filter which allows the exclusion of subscriptions from results (i.e. '$filter=children.childType ne Subscription').
- cache_control
- str
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) -> Iterable[_models.DescendantListResult]
Parameters
- 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.
- top
- int
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) -> Iterable[_models.ManagementGroupListResult]
Parameters
- cache_control
- str
Indicates whether the request should utilize any caches. Populate the header with 'no-cache' value to bypass existing caches.
- 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.
- 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.
update(group_id: str, patch_group_request: _models.PatchManagementGroupRequest, cache_control: Optional[str] = 'no-cache', **kwargs: Any) -> _models.ManagementGroup
Parameters
- cache_control
- str
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'>
Feedback
Submit and view feedback for