{"library":"azure-mgmt-containerservice","title":"Azure Container Service Management Client Library","description":"The `azure-mgmt-containerservice` library is the Microsoft Azure Container Service Management Client Library for Python, enabling programmatic interaction with Azure Kubernetes Service (AKS) and other container-related resources. It is currently at version 41.0.0 and frequently updated to support the latest Azure Container Service APIs, with a release cadence that includes multiple major and minor versions throughout the year. [2, 13]","status":"active","version":"41.0.0","language":"en","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/containerservice/azure-mgmt-containerservice","tags":["azure","management","containers","kubernetes","aks","cloud"],"install":[{"cmd":"pip install azure-mgmt-containerservice azure-identity","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Required for Azure Active Directory token-based authentication across the Azure SDK. [1, 2, 6]","package":"azure-identity"}],"imports":[{"symbol":"ContainerServiceClient","correct":"from azure.mgmt.containerservice import ContainerServiceClient"},{"note":"Older Azure SDK libraries used `azure.common.credentials` which is now deprecated. The `azure-identity` library provides modern token-based authentication. [1, 6, 18]","wrong":"from azure.common.credentials import ServicePrincipalCredentials","symbol":"DefaultAzureCredential","correct":"from azure.identity import DefaultAzureCredential"}],"quickstart":{"code":"import os\nfrom azure.identity import DefaultAzureCredential\nfrom azure.mgmt.containerservice import ContainerServiceClient\n\n# Set environment variables for authentication:\n# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET\n# And AZURE_SUBSCRIPTION_ID\n\nsubscription_id = os.environ.get(\"AZURE_SUBSCRIPTION_ID\", \"\")\n\n# Authenticate with Azure\ncredential = DefaultAzureCredential()\n\n# Create a Container Service client\nclient = ContainerServiceClient(credential=credential, subscription_id=subscription_id)\n\nprint(f\"Successfully created Azure Container Service client for subscription: {subscription_id}\")\n\n# Example: List managed clusters (actual operation not shown for brevity)\n# for cluster in client.managed_clusters.list():\n#     print(f\"Cluster Name: {cluster.name}, Location: {cluster.location}\")","lang":"python","description":"This quickstart demonstrates how to authenticate to Azure using `DefaultAzureCredential` and instantiate the `ContainerServiceClient`. Ensure that `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`, and `AZURE_SUBSCRIPTION_ID` environment variables are set for successful authentication. [2, 6, 13]"},"warnings":[{"fix":"If your application requires a specific older API version, pin `azure-mgmt-containerservice` to a version prior to 41.0.0 (e.g., `<41.0.0`). Otherwise, update your code to use the latest API models and operations. [2]","message":"Version 41.0.0 and newer packages now exclusively target the latest API-Version available on Azure, removing APIs from older versions. Applications relying on specific, non-latest API versions must pin the package to a previous release. [2, 3]","severity":"breaking","affected_versions":">=41.0.0"},{"fix":"Review the latest API documentation for `ContainerServiceClient` to identify the correct client operation group and method names for your specific use case. [2, 9]","message":"The client operation group `ContainerServiceClient.container_service` has been deleted or renamed in version 41.0.0. [2]","severity":"breaking","affected_versions":">=41.0.0"},{"fix":"Migrate your authentication code to use `azure-identity` and `DefaultAzureCredential` as shown in the quickstart. [1, 6]","message":"Older Azure SDK authentication methods, such as those using `azure.common.credentials`, are deprecated. The `azure-identity` library should be used for modern token-based authentication. [1, 6, 18]","severity":"deprecated","affected_versions":"<4.0.0 (and general older SDKs)"},{"fix":"Ensure your development and deployment environments use Python 3.9 or a newer supported version. [2, 13]","message":"Python 2.7 support for Azure SDK Python packages ended on January 1, 2022. This package requires Python 3.9+. [2, 13]","severity":"gotcha","affected_versions":"<3.9"}],"env_vars":null,"last_verified":"2026-04-05T00:00:00.000Z","next_check":"2026-07-04T00:00:00.000Z"}