{"id":1941,"library":"azure-mgmt-synapse","title":"Azure Synapse Management","description":"The Microsoft Azure Synapse Management Client Library for Python (azure-mgmt-synapse) provides the necessary tools to manage Azure Synapse Analytics workspaces, SQL pools, Apache Spark pools, and integration runtimes. It enables programmatic control over Synapse resources within an Azure subscription. The library is currently at version 2.0.0 (released April 2021) and adheres to the standard Azure SDK guidelines, offering a stable interface for managing Synapse services.","status":"active","version":"2.0.0","language":"en","source_language":"en","source_url":"https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/synapse/azure-mgmt-synapse","tags":["azure","cloud","synapse","analytics","management","sdk"],"install":[{"cmd":"pip install azure-mgmt-synapse","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Required for authenticating with Azure services using modern credential flows.","package":"azure-identity","optional":false},{"reason":"Provides shared core functionality, including transport pipelines, exceptions, and helpers.","package":"azure-core","optional":false}],"imports":[{"symbol":"SynapseManagementClient","correct":"from azure.mgmt.synapse import SynapseManagementClient"},{"symbol":"DefaultAzureCredential","correct":"from azure.identity import DefaultAzureCredential"}],"quickstart":{"code":"import os\nfrom azure.identity import DefaultAzureCredential\nfrom azure.mgmt.synapse import SynapseManagementClient\n\n# Set the AZURE_SUBSCRIPTION_ID environment variable or replace with your actual subscription ID\nsubscription_id = os.environ.get(\"AZURE_SUBSCRIPTION_ID\", \"<your-subscription-id>\")\n\nif subscription_id == \"<your-subscription-id>\":\n    raise ValueError(\"Please set the AZURE_SUBSCRIPTION_ID environment variable or provide your subscription ID.\")\n\n# Authenticate using DefaultAzureCredential, which handles various Azure authentication methods.\n# For local development, ensure you are logged in via Azure CLI (`az login`)\n# or have appropriate environment variables set.\ncredential = DefaultAzureCredential()\n\n# Create a SynapseManagementClient\nclient = SynapseManagementClient(credential, subscription_id)\n\nprint(\"Listing Synapse Workspaces:\")\n# Iterate over the workspaces in your subscription\nfor workspace in client.workspaces.list():\n    print(f\"- {workspace.name} (Location: {workspace.location})\")\n","lang":"python","description":"This quickstart demonstrates how to authenticate with Azure using `DefaultAzureCredential` and then list all Azure Synapse workspaces within a specified subscription using `SynapseManagementClient`."},"warnings":[{"fix":"Migrate to `azure-identity` classes (e.g., `DefaultAzureCredential`) for authentication. Update client instantiation to pass a `credential` object and pass configuration as keyword arguments instead of a `config` attribute.","message":"Breaking changes were introduced in version 2.0.0, significantly revamping the authentication and client interaction model. The legacy `azure.common.credentials` or `msrestazure.azure_active_directory` instances are no longer supported. The `credentials` parameter was renamed to `credential`.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Adjust code to use the `begin_` prefix for LRO methods and expect `azure.core.polling.LROPoller` for polling results.","message":"Long-running operations (LROs) that previously returned `msrest.polling.LROPoller` now return `azure.core.polling.LROPoller` and are typically prefixed with `begin_`.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Update exception handling to catch `azure.core.exceptions.HttpResponseError` instead of `CloudError` or other specific legacy exceptions.","message":"The exception hierarchy has been simplified. Most exceptions now derive from `azure.core.exceptions.HttpResponseError`, and `CloudError` has been removed.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Review model usage when updating or creating Synapse workspaces; adjust parameters for `WorkspacePatchInfo` and `Workspace` accordingly, using `public_network_access` if needed.","message":"Model changes: `WorkspacePatchInfo` and `Workspace` models no longer have the `network_settings` parameter in version 2.0.0. Instead, `public_network_access` was added.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Always verify the status and documentation for the specific language SDK being used. For Python, `azure-mgmt-synapse` is the current management library.","message":"Confusion between Python and .NET SDK status: The .NET NuGet package `Microsoft.Azure.Management.Synapse` is deprecated and no longer maintained. However, this Python library (`azure-mgmt-synapse`) remains active and supported. Users should ensure they are referencing the correct SDK for their language.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-09T00:00:00.000Z","next_check":"2026-07-08T00:00:00.000Z"}