Api Management


The presented resiliency recommendations in this guidance include Api Management and associated resources and settings.

Summary of Recommendations

Recommendations Details

APIM-1 - Migrate API Management services to Premium SKU to support Availability Zones

Category: Availability

Impact: High

Guidance

Upgrade the API Management instance to the Premium SKU to add support for Availability Zones.

Resources

Resource Graph Query

// Azure Resource Graph Query
// Find all API Management instances that aren't Premium
resources
| where type =~ 'Microsoft.ApiManagement/service'
| extend skuName = sku.name
| where tolower(skuName) != tolower('premium')
| project recommendationId = "apim-1", name, id, tags, param1=strcat("SKU: ", skuName)



APIM-2 - Enable Availability Zones on Premium API Management instances

Category: Availability

Impact: High

Guidance

Enable zone redundancy for APIM instances. With zone redundancy, the gateway and the control plane of your API Management instance (Management API, developer portal, Git configuration) are replicated across datacenters in physically separated zones, making it resilient to a zone failure.

Resources

Resource Graph Query

// Azure Resource Graph Query
// Find all Premium API Management instances that aren't zone redundant
resources
| where type =~ 'Microsoft.ApiManagement/service'
| extend skuName = sku.name
| where tolower(skuName) == tolower('premium')
| where isnull(zones) or array_length(zones) < 2
| extend zoneValue = iff((isnull(zones)), "null", zones)
| project recommendationId = "apim-2", name, id, tags, param1="Zones: No Zone or Zonal", param2=strcat("Zones value: ", zoneValue )



APIM-3 - Upgrade to platform version stv2

Category: Availability

Impact: High

Guidance

Upgrade to platform version stv2. The infrastructure associated with the API Management stv1 compute platform version will be retired effective 31 August 2024. A more current compute platform version (stv2) is already available and provides enhanced service capabilities.

Resources

Resource Graph Query/Scripts

// Azure Resource Graph Query
// Find all API Management instances that aren't upgraded to platform version stv2
resources
| where type =~ 'Microsoft.ApiManagement/service'
| extend plat_version = properties.platformVersion
| extend skuName = sku.name
| where tolower(plat_version) != tolower('stv2')
| project recommendationId = "apim-3", name, id, tags, param1=strcat("Platform Version: ", plat_version) , param2=strcat("SKU: ", skuName)