{"id":1938,"library":"azure-mgmt-servicefabricmanagedclusters","title":"Azure Service Fabric Managed Clusters Management Client Library for Python","description":"The `azure-mgmt-servicefabricmanagedclusters` library is the Microsoft Azure Service Fabric Managed Clusters Management Client Library for Python. It simplifies the deployment and management of Service Fabric managed clusters, which encapsulate underlying resources into a single Azure Resource Manager resource. This library is actively maintained and currently at version 3.0.0, supporting Python 3.9 and newer.","status":"active","version":"3.0.0","language":"en","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicefabricmanagedclusters/azure-mgmt-servicefabricmanagedclusters","tags":["azure","management","servicefabric","managedclusters"],"install":[{"cmd":"pip install azure-mgmt-servicefabricmanagedclusters azure-identity","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"Required for Azure Active Directory token authentication.","package":"azure-identity","optional":false}],"imports":[{"symbol":"ServiceFabricManagedClustersManagementClient","correct":"from azure.mgmt.servicefabricmanagedclusters import ServiceFabricManagedClustersManagementClient"},{"note":"Old credential classes like `azure.common.credentials` or `msrestazure.azure_active_directory` are deprecated; use classes from `azure.identity` instead.","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.servicefabricmanagedclusters import ServiceFabricManagedClustersManagementClient\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\", \"\")\nif not subscription_id:\n    raise ValueError(\"AZURE_SUBSCRIPTION_ID environment variable not set.\")\n\n# Authenticate using DefaultAzureCredential\ncredential = DefaultAzureCredential()\n\n# Create a Service Fabric Managed Clusters Management Client\nclient = ServiceFabricManagedClustersManagementClient(credential, subscription_id)\n\n# Example: List all managed clusters in the subscription\nprint(\"Listing Service Fabric Managed Clusters...\")\nfor cluster in client.managed_clusters.list_by_subscription():\n    print(f\"- {cluster.name} (Resource Group: {cluster.resource_group})\")","lang":"python","description":"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."},"warnings":[{"fix":"Ensure the `sku` parameter is always provided for `ManagedCluster` operations.","message":"The `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.","severity":"breaking","affected_versions":"<2.0.0 to 2.0.0+"},{"fix":"Add the `environment` parameter to calls of `get_by_environment` and `list_by_environment`.","message":"Operations `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.","severity":"breaking","affected_versions":"<2.0.0 to 2.0.0+"},{"fix":"Plan for creating new managed cluster resources and migrating applications rather than direct upgrades of traditional clusters.","message":"There 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.","severity":"gotcha","affected_versions":"All"},{"fix":"Interact with Service Fabric Managed Clusters through the managed cluster resource model and API only; avoid direct manipulation of underlying components.","message":"Manual 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.","severity":"gotcha","affected_versions":"All"},{"fix":"Upgrade your Python environment to version 3.9 or higher.","message":"This library requires Python 3.9 or newer. Using older Python versions will result in compatibility issues.","severity":"gotcha","affected_versions":"<3.9"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}