Azure Compute – API Management

Overview

The Azure Compute API Management service provides a unified gateway for managing, monitoring, and securing your compute workloads—Virtual Machines, Scale Sets, and Containers.

Features
Architecture
Pricing
  • Unified API surface for all compute resources.
  • Built‑in rate limiting, throttling, and quota management.
  • Policy‑driven request/response transformation.
  • Integrated Azure Active Directory authentication.
  • Monitoring via Azure Monitor and Log Analytics.

The service sits in front of Azure Compute endpoints and applies a set of policies defined in the API Management instance.

Architecture diagram

Pricing is based on the number of API calls and the tier of the API Management service (Developer, Basic, Standard, Premium).

Tier          | Monthly cost | Included calls
----------------------------------------------------
Developer      | Free         | 1 M calls
Basic          | $0.50 per 1 k| 1 M calls
Standard       | $2.50 per 1 k| 5 M calls
Premium        | $5.00 per 1 k| 10 M calls

Getting Started

Follow these steps to provision an API Management instance for your compute resources.

  1. Open the Azure portal and create a new API Management service.
  2. Navigate to APIs → + Add API → Azure Resource and select Compute.
  3. Configure policies (e.g., rate limit) in the Design tab.
  4. Publish the API and test it using the integrated Test console.
az apim create \
  --name MyComputeAPIM \
  --resource-group MyRG \
  --publisher-email admin@example.com \
  --publisher-name "Contoso Corp"

Reference

Below are the primary REST endpoints exposed by the API Management gateway.

Endpoint Method Description
/vms GET List all virtual machines.
/vms/{vmId} GET Retrieve details of a specific VM.
/vms/{vmId}/start POST Start a stopped VM.
/scalesets GET List scale sets.
/containers/{containerId} GET Get container status.

Best Practices

FAQs

Can I use custom domains?

Yes. You can map a custom domain to your API Management gateway in the Custom domains setting.

How do I secure the API with a client certificate?

Upload the client certificate to the API Management instance and enforce it using a validate-client-certificate policy.

Is there a way to mock responses for testing?

Use the mock-response policy in the design tab to return static payloads for development.