How to Determine Azure App Service Plan SKUs Available in a Specific Subscription/Location Before Creation?

508 views Asked by At
  • In the Microsoft documentation, there is a well-documented API endpoint to list the available App Service Plan SKUs/Capabilities for an existing App Service Plan. here

  • However, when attempting to create a new Service Plan for a specific subscription/location, there seems to be no direct endpoint or method provided to retrieve a list of available SKUs beforehand.

  • Is there a way to programmatically determine the App Service Plan SKUs supported in a provided Azure subscription and location before creating the App Service Plan or the Microsoft.Web/serverfarms resource?

1

There are 1 answers

4
Jahnavi On BEST ANSWER

How to Determine Azure App Service Plan SKUs Available in a Specific Subscription/Location Before Creation?

Programmatically, it is not possible to retrieve it using ARM template however, you can achieve the requirement using PowerShell or Azure resource graph query explorer which are detailed below.

AZ PowerShell:

$appservice =  Get-AzAppServicePlan -Location "West US"
foreach($app in $appservice){
 $resourceGroup = $app.ResourceGroup
 $appName = $app.Name    
 $resources = Get-AzResource -ResourceGroupName $resourceGroup | Where-Object { $_.ResourceName -eq $appName }
 $sku = $resources.Sku
 $skus += $sku    
}

enter image description here

Or

(Get-AzAppServicePlan -Location "West US").SKU

enter image description here

Azure Resource Graph Query:

resources
| where type =~ "Microsoft.Web/serverfarms"  and location has  "WestUS"
| project sku

enter image description here

resources
| where type =~ "Microsoft.Web/serverfarms"  and subscriptionId has  "xxxxx"
| project sku.tier

enter image description here