{"id":1806,"library":"azure-mgmt-appcontainers","title":"Azure App Containers Management Client Library for Python","description":"The `azure-mgmt-appcontainers` library is the Microsoft Azure Appcontainers Management Client Library for Python, enabling developers to programmatically manage Azure Container Apps resources. It provides a rich set of functionalities for interacting with Container Apps, Managed Environments, and related components. The current stable version is 4.0.0, and it is actively maintained as part of the Azure SDK for Python, with regular updates and releases.","status":"active","version":"4.0.0","language":"en","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python","tags":["azure","app containers","container apps","management","sdk","cloud"],"install":[{"cmd":"pip install azure-mgmt-appcontainers azure-identity","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Required for Azure Active Directory token authentication.","package":"azure-identity","optional":false}],"imports":[{"symbol":"ContainerAppsAPIClient","correct":"from azure.mgmt.appcontainers import ContainerAppsAPIClient"},{"symbol":"DefaultAzureCredential","correct":"from azure.identity import DefaultAzureCredential"}],"quickstart":{"code":"import os\nfrom azure.identity import DefaultAzureCredential\nfrom azure.mgmt.appcontainers import ContainerAppsAPIClient\n\n# Set environment variables for authentication and subscription ID\n# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET for service principal\n# AZURE_SUBSCRIPTION_ID\n\nsubscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', '')\nif not subscription_id:\n    raise ValueError(\"AZURE_SUBSCRIPTION_ID environment variable not set.\")\n\n# Authenticate using DefaultAzureCredential\n# This credential type tries multiple authentication methods (environment variables, managed identity, etc.)\ncredential = DefaultAzureCredential()\n\n# Create the Container Apps management client\nclient = ContainerAppsAPIClient(credential=credential, subscription_id=subscription_id)\n\n# Example: List managed environments (replace with your desired operation)\n# For a real scenario, you would specify a resource group name\nprint(f\"Listing managed environments in subscription: {subscription_id}\")\nfor environment in client.managed_environments.list_by_subscription():\n    print(f\"- {environment.name} (Location: {environment.location})\")","lang":"python","description":"This quickstart demonstrates how to authenticate with Azure using `DefaultAzureCredential` and initialize the `ContainerAppsAPIClient`. It then shows a basic operation: listing all managed environments within the specified Azure subscription. Ensure `AZURE_SUBSCRIPTION_ID` and appropriate Azure AD environment variables (if using a service principal) are set."},"warnings":[{"fix":"Review the official changelog for `azure-mgmt-appcontainers` 4.0.0 and update your code to reflect the removed parameters and modified operations. Pay close attention to the new required `name` parameter for `WorkloadProfile` and adjustments for `ConnectedEnvironments*Operations`.","message":"Version 4.0.0 introduced significant breaking changes. Several model parameters were removed (e.g., `AvailableWorkloadProfileProperties.billing_meter_category`, `ContainerApp.workload_profile_type`, `ManagedEnvironment.sku`, `VnetConfiguration.outbound_settings`, `VnetConfiguration.runtime_subnet_id`). Additionally, `WorkloadProfile` now requires a `name` parameter. Several methods in `ConnectedEnvironmentsCertificatesOperations`, `ConnectedEnvironmentsDaprComponentsOperations`, and `ConnectedEnvironmentsStoragesOperations` were deleted or renamed.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Ensure all necessary Azure authentication environment variables are correctly configured for your chosen authentication method. For Container Apps, also verify that all application-specific environment variables are properly set in the container app configuration to prevent startup issues.","message":"Incorrect or missing Azure environment variables for authentication (e.g., `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SUBSCRIPTION_ID`) or for the Container App's runtime can lead to client initialization failures or application crashes. `DefaultAzureCredential` relies on these for environment-based authentication.","severity":"gotcha","affected_versions":"All"},{"fix":"Double-check container image names and tags. If using a private registry, ensure Azure Container Apps has the necessary access (e.g., Managed Identity for ACR). Verify the container's `ENTRYPOINT` and `CMD` in the Dockerfile, or the custom command specified in the Container App configuration, correctly starts your application.","message":"Improper image references, issues with private container registry access (e.g., incorrect credentials or managed identity setup), or misconfigured container startup commands/entrypoints are common causes for Container App deployment failures and runtime errors.","severity":"gotcha","affected_versions":"All"},{"fix":"Review the ingress settings of your Container App and the VNet configuration for the Managed Environment. Ensure network security groups (NSGs) and DNS settings (especially custom DNS) allow traffic as expected, including forwarding unresolved DNS queries to Azure's resolver (168.63.129.16).","message":"Networking and ingress misconfigurations in Azure Container Apps environments can lead to applications being inaccessible or returning unexpected HTTP errors (e.g., 403 Forbidden).","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}