Registry / azure / azure-mgmt-appcontainers

azure-mgmt-appcontainers

JSON →
library5.0.0pypypi✓ verified 24d ago

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.

pip install azure-mgmt-appcontainers azure-identity
INSTALL
IMPORT
SIG · AZURE-MGMT-APPCONT
A
azure-mgmt-appcontainers
azurepythonv5.0.0
Install
4.0s avg
Import
702ms
Disk
47MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.746s · 47.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.0s · import 0.658s · 48MB
47MB installed
● package 47MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ContainerAppsAPIClient
from azure.mgmt.appcontainers import ContainerAppsAPIClient
DefaultAzureCredential
from azure.identity import DefaultAzureCredential

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.

import os from azure.identity import DefaultAzureCredential from azure.mgmt.appcontainers import ContainerAppsAPIClient # Set environment variables for authentication and subscription ID # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET for service principal # AZURE_SUBSCRIPTION_ID subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', '') if not subscription_id: raise ValueError("AZURE_SUBSCRIPTION_ID environment variable not set.") # Authenticate using DefaultAzureCredential # This credential type tries multiple authentication methods (environment variables, managed identity, etc.) credential = DefaultAzureCredential() # Create the Container Apps management client client = ContainerAppsAPIClient(credential=credential, subscription_id=subscription_id) # Example: List managed environments (replace with your desired operation) # For a real scenario, you would specify a resource group name print(f"Listing managed environments in subscription: {subscription_id}") for environment in client.managed_environments.list_by_subscription(): print(f"- {environment.name} (Location: {environment.location})")
Debug
Known issues
breakingVersion 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.
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`.
affects: >=4.0.0
gotchaIncorrect 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.
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.
affects: All
gotchaImproper 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.
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.
affects: All
gotchaNetworking and ingress misconfigurations in Azure Container Apps environments can lead to applications being inaccessible or returning unexpected HTTP errors (e.g., 403 Forbidden).
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).
affects: All
Upgrade
Version history
5.0.0latest on PyPI · released Jul 8, 2026
Audit
Dependencies
azure-identityrequiredRequired for Azure Active Directory token authentication.
Agent activity
51 hits · last 30 days
node
42
OpenAI (training)
1
Resources
azure-mgmt-appcontainers — pip install azure-mgmt-appcontainers · libregistry