Give AlbumentationsX a star on GitHub — it powers this leaderboard

Star on GitHub

azure-mgmt-resource

Microsoft Azure Resource Management Client Library for Python

Downloads: 0 (30 days)

Description

Microsoft Azure SDK for Python

This is the Microsoft Azure Resource Management Client Library. This package has been tested with Python 3.9+. For a more complete view of Azure libraries, see the azure sdk python release.

Disclaimer

Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691

Getting started

Prerequisites

Install the package

pip install azure-mgmt-resource
pip install azure-identity

Authentication

By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.

  • AZURE_CLIENT_ID for Azure client ID.
  • AZURE_TENANT_ID for Azure tenant ID.
  • AZURE_CLIENT_SECRET for Azure client secret.

In addition, Azure subscription ID can be configured via environment variable AZURE_SUBSCRIPTION_ID.

With above configuration, client can be authenticated by following code:

from azure.identity import DefaultAzureCredential
from azure.mgmt.resource import ResourceManagementClient
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = ResourceManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)

Examples

Code samples for this package can be found at:

Troubleshooting

Next steps

Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the Issues section of the project.

Release History

25.0.0 (2026-02-04)

Breaking Changes

  • This package now only targets the latest Api-Version available on Azure and removes APIs of other Api-Version. After this change, the package can have much smaller size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ignore this change.
  • Operation Group Deployments and DeploymentOperations of ResourceManagementClient are moved to DeploymentsMgmtClient of independent package azure-mgmt-resource-deployments. If you called ResourceManagementClient(...).deployments.xx(...) before, just need to change to DeploymentsMgmtClient(...).deployments.xx(...). And same for DeploymentOperations.
  • The following modules have been separated from azure-mgmt-resource into independent packages: subscriptions, features, links, locks, policy, managedapplications, databoundaries, changes, and privatelinks. Each module is now available as azure-mgmt-resource-{module}.
  • For separated modules, if you previously imported them using statements like from azure.mgmt.resource import SubscriptionClient, you'll need to update your code to from azure.mgmt.resource.subscriptions import SubscriptionClient. If you were already using the fully qualified import path, no changes are required.

25.0.0b1 (2025-07-16)

Breaking Changes

  • This package now only targets the latest Api-Version available on Azure and removes APIs of other Api-Version. After this change, the package can have much smaller size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ignore this change.
  • Operation Group Deployments and DeploymentOperations of ResourceManagementClient are moved to DeploymentsMgmtClient of independent package azure-mgmt-resource-deployments. If you called ResourceManagementClient(...).deployments.xx(...) before, just need to change to DeploymentsMgmtClient(...).deployments.xx(...). And same for DeploymentOperations.

24.0.0 (2025-06-16)

Features Added

  • Model Deployment has a new parameter identity
  • Model DeploymentParameter has a new parameter expression
  • Model DeploymentProperties has a new parameter external_input_definitions
  • Model DeploymentProperties has a new parameter external_inputs
  • Model DeploymentWhatIfProperties has a new parameter external_input_definitions
  • Model DeploymentWhatIfProperties has a new parameter external_inputs
  • Model WhatIfChange has a new parameter extension

Breaking Changes

  • The deploymentstacks module has been separated from the azure-mgmt-resource package into independent package azure-mgmt-resource-deploymentstacks
  • The deploymentscripts module has been separated from the azure-mgmt-resource package into independent package azure-mgmt-resource-deploymentscripts
  • The templatespecs module has been separated from the azure-mgmt-resource package into independent package azure-mgmt-resource-templatespecs
  • If you previously imported these modules using statements like from azure.mgmt.resource import DeploymentStacksClient, you'll need to update your code to from azure.mgmt.resource.deploymentstacks import DeploymentStacksClient. If you were already using the fully qualified import path, no changes are required. This applies to all three modules: deploymentstacks, deploymentscripts, and templatespecs.

23.4.0 (2025-05-19)

Features Added

  • Model DeploymentProperties has a new parameter extension_configs
  • Model DeploymentPropertiesExtended has a new parameter extensions
  • Model DeploymentWhatIfProperties has a new parameter extension_configs
  • Model ResourceReference has a new parameter api_version
  • Model ResourceReference has a new parameter extension
  • Model ResourceReference has a new parameter identifiers
  • Model ResourceReference has a new parameter resource_type
  • Model TargetResource has a new parameter api_version
  • Model TargetResource has a new parameter extension
  • Model TargetResource has a new parameter identifiers
  • Model TargetResource has a new parameter symbolic_name

23.3.0 (2025-02-24)

Features Added

  • Model DeploymentProperties has a new parameter validation_level
  • Model DeploymentPropertiesExtended has a new parameter diagnostics
  • Model DeploymentPropertiesExtended has a new parameter validation_level
  • Model DeploymentValidateResult has a new parameter id
  • Model DeploymentValidateResult has a new parameter name
  • Model DeploymentValidateResult has a new parameter type
  • Model DeploymentWhatIfProperties has a new parameter validation_level
  • Model ExportTemplateRequest has a new parameter output_format
  • Model PolicyAssignment has a new parameter effective_definition_version
  • Model PolicyAssignment has a new parameter latest_definition_version
  • Model PolicyDefinitionReference has a new parameter effective_definition_version
  • Model PolicyDefinitionReference has a new parameter latest_definition_version
  • Model ResourceGroupExportResult has a new parameter output
  • Model WhatIfChange has a new parameter deployment_id
  • Model WhatIfChange has a new parameter identifiers
  • Model WhatIfChange has a new parameter symbolic_name
  • Model WhatIfOperationResult has a new parameter diagnostics
  • Model WhatIfOperationResult has a new parameter potential_changes
  • Operation PolicyAssignmentsOperations.get has a new optional parameter expand
  • Operation PolicyAssignmentsOperations.get_by_id has a new optional parameter expand
  • Operation PolicyAssignmentsOperations.list has a new optional parameter expand
  • Operation PolicyAssignmentsOperations.list_for_management_group has a new optional parameter expand
  • Operation PolicyAssignmentsOperations.list_for_resource has a new optional parameter expand
  • Operation PolicyAssignmentsOperations.list_for_resource_group has a new optional parameter expand
  • Operation PolicySetDefinitionVersionsOperations.get has a new optional parameter expand
  • Operation PolicySetDefinitionVersionsOperations.get_at_management_group has a new optional parameter expand
  • Operation PolicySetDefinitionVersionsOperations.get_built_in has a new optional parameter expand
  • Operation PolicySetDefinitionVersionsOperations.list has a new optional parameter expand
  • Operation PolicySetDefinitionVersionsOperations.list_built_in has a new optional parameter expand
  • Operation PolicySetDefinitionVersionsOperations.list_by_management_group has a new optional parameter expand
  • Operation PolicySetDefinitionsOperations.get has a new optional parameter expand
  • Operation PolicySetDefinitionsOperations.get_at_management_group has a new optional parameter expand
  • Operation PolicySetDefinitionsOperations.get_built_in has a new optional parameter expand
  • Operation PolicySetDefinitionsOperations.list has a new optional parameter expand
  • Operation PolicySetDefinitionsOperations.list_built_in has a new optional parameter expand
  • Operation PolicySetDefinitionsOperations.list_by_management_group has a new optional parameter expand

23.2.0 (2024-10-24)

Features Added

  • Added operation group DataBoundariesOperations
  • Added operation group PolicyDefinitionVersionsOperations
  • Added operation group PolicySetDefinitionVersionsOperations
  • Model ParameterDefinitionsValue has a new parameter schema
  • Model PolicyAssignment has a new parameter definition_version
  • Model PolicyDefinition has a new parameter version
  • Model PolicyDefinition has a new parameter versions
  • Model PolicyDefinitionReference has a new parameter definition_version
  • Model PolicySetDefinition has a new