Registry /
azure / azure-mgmt-servicefabricmanagedclusters
Install & Compatibility
Where this runs
tested against v3.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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.652s · 45.3MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.0s · import 0.572s · 46MB
44MB installed
● package 44MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ServiceFabricManagedClustersManagementClient
✓ from azure.mgmt.servicefabricmanagedclusters import ServiceFabricManagedClustersManagementClient
DefaultAzureCredential
✓ from azure.identity import DefaultAzureCredential
✗ from azure.common.credentials import ServicePrincipalCredentials
Old credential classes like `azure.common.credentials` or `msrestazure.azure_active_directory` are deprecated; use classes from `azure.identity` instead.
This quickstart demonstrates how to authenticate with Azure using `DefaultAzureCredential` and then list all Service Fabric Managed Clusters within your Azure subscription. Ensure that the required environment variables (`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`, and `AZURE_SUBSCRIPTION_ID`) are set for authentication.
import os
from azure.identity import DefaultAzureCredential
from azure.mgmt.servicefabricmanagedclusters import ServiceFabricManagedClustersManagementClient
# Set environment variables for authentication:
# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET
# And 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
credential = DefaultAzureCredential()
# Create a Service Fabric Managed Clusters Management Client
client = ServiceFabricManagedClustersManagementClient(credential, subscription_id)
# Example: List all managed clusters in the subscription
print("Listing Service Fabric Managed Clusters...")
for cluster in client.managed_clusters.list_by_subscription():
print(f"- {cluster.name} (Resource Group: {cluster.resource_group})")
Debug
Known issues
breakingThe `sku` parameter of the `ManagedCluster` model became required in version 2.0.0. If you are upgrading from a version older than 2.0.0, ensure this parameter is always provided when creating or updating managed clusters.fixEnsure the `sku` parameter is always provided for `ManagedCluster` operations.
affects: <2.0.0 to 2.0.0+
breakingOperations `ManagedClusterVersionOperations.get_by_environment` and `ManagedClusterVersionOperations.list_by_environment` gained a new required `environment` parameter in version 2.0.0. Calls to these methods without the `environment` parameter will break.fixAdd the `environment` parameter to calls of `get_by_environment` and `list_by_environment`.
affects: <2.0.0 to 2.0.0+
gotchaThere is no in-place migration path from existing (traditional) Azure Service Fabric clusters to Service Fabric Managed Clusters. You must create a new managed cluster resource.fixPlan for creating new managed cluster resources and migrating applications rather than direct upgrades of traditional clusters.
affects: All
gotchaManual changes to the underlying resources of a Service Fabric managed cluster (e.g., Virtual Machine Scale Sets, Load Balancers) are not supported. Managed clusters are fully encapsulated, and Azure manages these resources on your behalf.fixInteract with Service Fabric Managed Clusters through the managed cluster resource model and API only; avoid direct manipulation of underlying components.
affects: All
gotchaThis library requires Python 3.9 or newer. Using older Python versions will result in compatibility issues.fixUpgrade your Python environment to version 3.9 or higher.
affects: <3.9
Upgrade
Version history
3.0.0latest on PyPI · released Mar 12, 2026
Audit
Dependencies
azure-identityrequiredRequired for Azure Active Directory token authentication.