Langsung ke konten
Skillpedia
API & server (backend)48k Β· #3951

azure-mgmt-apimanagement-dotnet

Fungsinya

Kode ini membantu mengelola layanan API di Azure. Anda bisa membuat dan mengatur layanan API, serta mendefinisikan API, produk, langganan, dan kebijakan (policy).

Kapan dipakai

  • βœ“Saat Anda perlu menyiapkan layanan API Management baru di Azure.
  • βœ“Untuk mengatur API, produk, dan langganan untuk API Anda.
  • βœ“Saat menentukan aturan akses dan batasan untuk API Anda.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-mgmt-apimanagement-dotnet/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-mgmt-apimanagement-dotnet/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBuat layanan API Management bernama 'my-api-service' di region 'EastUS' dengan email 'admin@contoso.com'.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Kode ini menggunakan pustaka Azure SDK for .NET. Kode ini terhubung ke Azure dan memungkinkan Anda membuat serta mengubah resource API Management melalui perintah pemrograman.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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();

…
Pertanyaan umum

Apa itu Azure API Management?

Ini adalah layanan yang membantu perusahaan mengelola API yang mereka publikasikan untuk pengembang eksternal maupun internal.

Apa perbedaan 'Management Plane' dan 'Data Plane'?

'Management Plane' digunakan untuk mengatur layanan API (membuat API, produk, dll). 'Data Plane' digunakan untuk berinteraksi dengan API yang sudah diatur.

Bagaimana cara autentikasi dengan Azure?

Anda bisa menggunakan kredensial default Azure, seperti environment variable atau managed identity, untuk melakukan autentikasi.

Detail

Deskripsi asli dari pembuat

Azure Resource Manager SDK for API Management in .NET.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#3951
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa