Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Configure Azure API Management as an AI Gateway with caching, token limits, and content safety
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-mgmt-apimanagement-py.md
1# API Management — Python SDK Quick Reference23> Condensed from **azure-mgmt-apimanagement-py**. Full patterns (APIs,4> products, subscriptions, policies, backends, named values)5> in the **azure-mgmt-apimanagement-py** plugin skill if installed.67## Install8pip install azure-mgmt-apimanagement azure-identity910## Quick Start11> **Auth:** `DefaultAzureCredential` is for local development. See [auth-best-practices.md](../auth-best-practices.md) for production patterns.1213```python14import os15from azure.mgmt.apimanagement import ApiManagementClient16from azure.identity import DefaultAzureCredential17client = ApiManagementClient(DefaultAzureCredential(), os.environ["AZURE_SUBSCRIPTION_ID"])18```1920## Best Practices21- Use named values for secrets and configuration22- Apply policies at appropriate scopes (global, product, API, operation)23- Use products to bundle APIs and manage access24- Enable Application Insights for monitoring25- Use backends to abstract backend services26- Version your APIs using APIM's versioning features27