azure-mgmt-apimanagement-dotnet
What it does
This code helps manage Azure API services. It allows you to create and configure API services, define APIs, products, subscriptions, and policies.
When to use it
- βWhen you need to set up a new API management service in Azure.
- βTo configure APIs, products, and subscriptions for your APIs.
- βWhen defining access rules and limits for your APIs.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-mgmt-apimanagement-dotnet/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCreate an API management service named 'my-api-service' in the 'EastUS' region with the email 'admin@contoso.com'.β
5 new skills a week. 1 minute to read.
How it works
This code uses the Azure SDK for .NET library. It connects to Azure and lets you create and modify API management resources through programmatic commands.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Bundled upstream support
Supporting files are included at skill-relative paths. See UPSTREAM-NOTICE.md for their pinned sources, licenses, hashes, and import changes.
Supporting material availability
These paths remain unavailable in this catalog copy:
<support-root>/references/policies.md
Do not invoke a step that requires one of these files. Obtain the original material and review its dependencies, license, and effects before use. Independent inline steps and the bundled helpers can proceed within the userβs authorized scope.
Azure.ResourceManager.ApiManagement (.NET)
Management plane SDK for provisioning and managing Azure API Management resources via Azure Resource Manager.
β οΈ Management vs Data Plane
- This SDK (Azure.ResourceManager.ApiManagement): Create services, APIs, products, subscriptions, policies, users, groups
- Data Plane: Direct API calls to your APIM gateway endpoints
Installation
dotnet add package Azure.ResourceManager.ApiManagement
dotnet add package Azure.Identity
Current Version: v1.3.0
Environment Variables
AZURE_SUBSCRIPTION_ID=<your-subscription-id>
# For service principal auth (optional)
AZURE_TENANT_ID=<tenant-id>
AZURE_CLIENT_ID=<client-id>
AZURE_CLIENT_SECRET=<client-secret>
Authentication
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.ApiManagement;
// Always use DefaultAzureCredential
var credential = new DefaultAzureCredential();
var armClient = new ArmClient(credential);
// Get subscription
var subscriptionId = Environment.GetEnvironmentVariable("AZURE_SUBSCRIPTION_ID");
var subscription = armClient.GetSubscriptionResource(
new ResourceIdentifier($"/subscriptions/{subscriptionId}"));
Resource Hierarchy
ArmClient
βββ SubscriptionResource
βββ ResourceGroupResource
βββ ApiManagementServiceResource
βββ ApiResource
β βββ ApiOperationResource
β β βββ ApiOperationPolicyResource
β βββ ApiPolicyResource
β βββ ApiSchemaResource
β βββ ApiDiagnosticResource
βββ ApiManagementProductResource
β βββ ProductApiResource
β βββ ProductGroupResource
β βββ ProductPolicyResource
βββ ApiManagementSubscriptionResource
βββ ApiManagementPolicyResource
βββ ApiManagementUserResource
βββ ApiManagementGroupResource
βββ ApiManagementBackendResource
βββ ApiManagementGatewayResource
βββ ApiManagementCertificateResource
βββ ApiManagementNamedValueResource
βββ ApiManagementLoggerResource
Core Workflow
1. Create API Management Service
using Azure.ResourceManager.ApiManagement;
using Azure.ResourceManager.ApiManagement.Models;
// Get resource group
var resourceGroup = await subscription
.GetResourceGroupAsync("my-resource-group");
// Define service
var serviceData = new ApiManagementServiceData(
location: AzureLocation.EastUS,
sku: new ApiManagementServiceSkuProperties(
ApiManagementServiceSkuType.Developer,
capacity: 1),
publisherEmail: "admin@contoso.com",
publisherName: "Contoso");
// Create service (long-running operation - can take 30+ minutes)
var serviceCollection = resourceGroup.Value.GetApiManagementServices();
var operation = await serviceCollection.CreateOrUpdateAsync(
WaitUntil.Completed,
"my-apim-service",
serviceData);
ApiManagementServiceResource service = operation.Value;
2. Create an API
var apiData = new ApiCreateOrUpdateContent
{
DisplayName = "My API",
Path = "myapi",
Protocols = { ApiOperationInvokableProtocol.Https },
ServiceUri = new Uri("https://backend.contoso.com/api")
};
var apiCollection = service.GetApis();
var apiOperation = await apiCollection.CreateOrUpdateAsync(
WaitUntil.Completed,
"my-api",
apiData);
ApiResource api = apiOperation.Value;
3. Create a Product
var productData = new ApiManagementProductData
{
DisplayName = "Starter",
Description = "Starter tier with limited access",
IsSubscriptionRequired = true,
IsApprovalRequired = false,
SubscriptionsLimit = 1,
State = ApiManagementProductState.Published
};
var productCollection = service.GetApiManagementProducts();
β¦
FAQ
What is Azure API Management?
It's a service that helps companies manage APIs they publish to external or internal developers.
What's the difference between 'Management Plane' and 'Data Plane'?
The 'Management Plane' is for configuring the API service (creating APIs, products, etc.). The 'Data Plane' is for interacting with the APIs that have already been configured.
How do I authenticate with Azure?
You can use default Azure credentials, like environment variables or managed identities, to authenticate.
Details
Original description by the author
Azure Resource Manager SDK for API Management in .NET.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3951
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
api-connector-builder
280kHas your agent build new API connections following the existing pattern. Use when you need to add one more integration without creating a new way of doing things.
api-design
280kHelps your agent design REST APIs following best practices. It's useful for defining how APIs communicate, how errors are shown, and how to organize data.
backend-patterns
280kHelps your agent with server-side architecture patterns and database optimization. It's useful for building or reviewing code that runs on the server.