Microsoft Azure Deployment Manager Client Library for Python
raw JSON → 1.0.0 verified Fri May 01 auth: no python
Azure Deployment Manager is a service that enables coordinated, safe deployment of complex multi-region services. This client library provides Python APIs to manage deployment resources such as rollouts, service topologies, services, service units, steps, and artifact sources. It is part of the Azure SDK for Python. Current version: 1.0.0. Release cadence: stable, no recent releases.
pip install azure-mgmt-deploymentmanager Common errors
error AttributeError: 'DeploymentManagerClient' object has no attribute 'rollouts' ↓
cause The client object may be incorrect due to wrong subscription ID or authentication. Also, the 'rollouts' property is an operation group, ensure correct import.
fix
Verify subscription_id and credential. Use correct import: from azure.mgmt.deploymentmanager import DeploymentManagerClient
error azure.core.exceptions.HttpResponseError: (ResourceNotFound) The Resource 'Microsoft.DeploymentManager/rollouts/...' under resource group '...' was not found. ↓
cause The specified rollout name or resource group does not exist.
fix
Check that the rollout name and resource group are correct and that the rollout was created.
Warnings
deprecated Azure Deployment Manager service was deprecated by Microsoft in 2023. New deployments should use alternative solutions like Azure DevOps or Terraform. The library may still work but no new features are expected. ↓
fix Consider migrating to Azure DevOps deployment pipelines or Terraform for resource deployment.
gotcha Models like Rollout, ServiceUnit, Step have many required properties. Omitting required properties when creating resources causes AttributeError or validation errors. ↓
fix Always provide all required properties as shown in documentation. Use the API reference to check required fields.
Imports
- DeploymentManagerClient wrong
from azure.mgmt.deploymentmanager.models import DeploymentManagerClientcorrectfrom azure.mgmt.deploymentmanager import DeploymentManagerClient - Rollout wrong
from azure.mgmt.deploymentmanager import Rolloutcorrectfrom azure.mgmt.deploymentmanager.models import Rollout
Quickstart
import os
from azure.identity import DefaultAzureCredential
from azure.mgmt.deploymentmanager import DeploymentManagerClient
subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', '')
credential = DefaultAzureCredential()
client = DeploymentManagerClient(credential, subscription_id)
# list all rollouts in a resource group
rollouts = client.rollouts.list('myResourceGroup')
for rollout in rollouts:
print(rollout.name)