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-dotnet.md
1# API Management — .NET SDK Quick Reference23> Condensed from **azure-mgmt-apimanagement-dotnet**. Full patterns (service4> creation, APIs, products, policies, users, gateways, backends)5> in the **azure-mgmt-apimanagement-dotnet** plugin skill if installed.67## Install8dotnet add package Azure.ResourceManager.ApiManagement9dotnet add package Azure.Identity1011## Quick Start12> **Auth:** `DefaultAzureCredential` is for local development. See [auth-best-practices.md](../auth-best-practices.md) for production patterns.1314```csharp15using Azure.ResourceManager;16using Azure.Identity;17var armClient = new ArmClient(new DefaultAzureCredential());18```1920## Best Practices21- Use `WaitUntil.Completed` for operations that must finish before proceeding22- Use `WaitUntil.Started` for long operations like service creation (30+ min)23- Use DefaultAzureCredential for **local development only**. In production, use ManagedIdentityCredential — see [auth-best-practices.md](../auth-best-practices.md)24- Handle `RequestFailedException` for ARM API errors25- Use `CreateOrUpdateAsync` for idempotent operations26- Navigate hierarchy via `Get*` methods (e.g., `service.GetApis()`)27- Policy format — use XML format for policies; JSON is also supported28- Service creation — Developer SKU is fastest for testing (~15-30 min)29