exec.azurerm.managementgroup.operations

Azure Resource Manager (ARM) Management Group Operations Execution Module

New in version 2.0.0.

Changed in version 4.0.0.

maintainer:

<devops@eitr.tech>

configuration:

This module requires Azure Resource Manager credentials to be passed as keyword arguments to every function or via acct in order to work properly.

Required provider parameters:

if using username and password:
  • subscription_id
  • username
  • password
if using a service principal:
  • subscription_id
  • tenant
  • client_id
  • secret

Optional provider parameters:

cloud_environment: Used to point the cloud driver to different API endpoints, such as Azure GovCloud. Possible values:

  • AZURE_PUBLIC_CLOUD (default)
  • AZURE_CHINA_CLOUD
  • AZURE_US_GOV_CLOUD
  • AZURE_GERMAN_CLOUD
idem_azurerm.exec.azurerm.managementgroup.operations.create_or_update(hub, ctx, name, display_name=None, parent=None, **kwargs)

New in version 2.0.0.

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.

Parameters:
  • name – The ID of the management group. For example, “00000000-0000-0000-0000-000000000000”.
  • display_name – The friendly name of the management group. If no value is passed then this field will be set to the name of the management group.
  • parent – The fully qualified ID for the parent management group. For example, “/providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000”.

CLI Example:

azurerm.managementgroup.operations.create_or_update test_name test_display test_parent
idem_azurerm.exec.azurerm.managementgroup.operations.delete(hub, ctx, name, **kwargs)

New in version 2.0.0.

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

Parameters:name – The ID of the management group.

CLI Example:

azurerm.managementgroup.operations.delete test_name test
idem_azurerm.exec.azurerm.managementgroup.operations.get(hub, ctx, name, expand=None, recurse=None, **kwargs)

New in version 2.0.0.

Get the details of the specified management group.

Parameters:
  • name – The ID of the management group.
  • expand – The expand parameter allows clients to request inclusion of children in the response payload. Possible values include: ‘children’. Defaults to None.
  • recurse – The recurse boolean parameter allows clients to request inclusion of entire hierarchy in the response payload. Note that expand must be set to ‘children’ if recurse is set to True.

CLI Example:

azurerm.managementgroup.operations.get test_name test_expand test_recurse
idem_azurerm.exec.azurerm.managementgroup.operations.get_api_client(hub, ctx, **kwargs)

New in version 2.0.0.

Load the ManagementGroupsAPI client and returns the client object.

idem_azurerm.exec.azurerm.managementgroup.operations.list_(hub, ctx, skip_token=None, **kwargs)

New in version 2.0.0.

Changed in version 4.0.0.

List management groups for the authenticated user.

Parameters:skip_token – 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. Defaults to None.

CLI Example:

azurerm.managementgroup.operations.list test_token