Registry / azure / azure-mgmt-servicelinker

azure-mgmt-servicelinker

JSON →
library1.1.0pypypi✓ verified 23d ago

The `azure-mgmt-servicelinker` library is the Microsoft Azure Service Linker Management Client Library for Python. It provides the tools to manage Azure Service Linkers, which connect Azure compute services to other Azure data services. The current stable version is 1.1.0. Azure SDKs typically follow a frequent release cadence, with minor releases quarterly or less, and patch releases as bug fixes become available.

pip install azure-mgmt-servicelinker azure-identity
INSTALL
IMPORT
SIG · AZURE-MGMT-SERVICE
A
azure-mgmt-servicelinker
azurepythonv1.1.0
Install
4.2s avg
Import
Disk
45MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.1.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.000s · 45.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.2s · import 0.000s · 46MB
45MB installed
● package 45MB
Code
Verified usage

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

ServiceLinkerManagementClient
from azure.mgmt.servicelinker import ServiceLinkerManagementClient
DefaultAzureCredential
from azure.identity import DefaultAzureCredential

This quickstart demonstrates how to instantiate the `ServiceLinkerManagementClient` and list existing Service Linkers for a given resource. It uses `DefaultAzureCredential` for authentication, which attempts to authenticate through various methods suitable for both local development and deployment environments.

import os from azure.identity import DefaultAzureCredential from azure.mgmt.servicelinker import ServiceLinkerManagementClient # Set environment variables for authentication (replace with your actual values or use Azure CLI/VS Code login) # AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID # For local development, DefaultAzureCredential will try various methods, including environment variables, # managed identity, Azure CLI, or Visual Studio Code login. subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") # Replace with your subscription ID resource_uri = "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app" # Example URI, replace as needed # Authenticate using DefaultAzureCredential credential = DefaultAzureCredential() # Create a ServiceLinkerManagementClient client = ServiceLinkerManagementClient(credential=credential, subscription_id=subscription_id) # Example: List linkers for a given resource_uri try: print(f"Listing linkers for resource: {resource_uri}") linkers = client.linkers.list(resource_uri=resource_uri) for linker in linkers: print(f" - Linker Name: {linker.name}, Target Service: {linker.target_service.id if linker.target_service else 'N/A'}") except Exception as e: print(f"An error occurred: {e}") print("Please ensure the resource_uri and subscription_id are correct and you have the necessary permissions.") print("Also, verify your authentication environment variables (AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET) or local Azure login.")
az --version
Debug
Known issues
breakingVersion 1.0.0 introduced several breaking changes in model parameters. Specifically, `LinkerPatch` and `LinkerResource` no longer have the `target_id` parameter, `SecretAuthInfo` removed the `secret` parameter (replaced by `secret_info`), and `ValidateResult` saw changes in its `linker_status`, `name`, and `reason` parameters.
fix
Review the official migration guide or API reference for version 1.0.0+ and update your code to use the new parameter names and structures, such as `target_service` instead of `target_id`.
affects: >=1.0.0
deprecatedSupport for Python 2.7 in Azure SDK Python packages, including `azure-mgmt-servicelinker`, ended on January 1, 2022. Using Python 2.7 with this library is not supported and may lead to unpatched security vulnerabilities or unexpected behavior.
fix
Upgrade your Python environment to Python 3.6 or newer (Python 3.8+ is recommended for newer Azure SDKs) to ensure compatibility and receive ongoing support and updates.
affects: <=1.1.0 (all versions)
gotchaThe general `azure-mgmt` package is deprecated since version 5.0.0. Users should install service-specific packages like `azure-mgmt-servicelinker` for individual Azure management services. Installing the older `azure-mgmt` package will not provide the Service Linker client.
fix
Always install the specific service management package, e.g., `pip install azure-mgmt-servicelinker`, rather than the deprecated monolithic `azure-mgmt` package.
affects: All versions of `azure-mgmt-servicelinker`
gotchaFor `DefaultAzureCredential` to work correctly in many scenarios (especially service principal authentication), critical environment variables like `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, and `AZURE_SUBSCRIPTION_ID` must be configured. Incorrect or missing configuration is a common source of authentication errors.
fix
Ensure these environment variables are correctly set in your execution environment. For local development, consider using `az login` (Azure CLI) or `azd auth login` (Azure Developer CLI) which `DefaultAzureCredential` can leverage automatically.
affects: All versions
Upgrade
Version history
1.1.0latest on PyPI · released May 18, 2022
Audit
Dependencies
azure-identityrequiredRequired for Azure Active Directory token authentication with `DefaultAzureCredential`.
azure-corerequiredUnderlying core library for shared primitives and HTTP pipeline. Usually pulled in transitively.
Agent activity
45 hits · last 30 days
node
36
OpenAI (training)
2
Resources
azure-mgmt-servicelinker — pip install azure-mgmt-servicelinker · libregistry