1
votes

I'm trying to programmatically retrieve the default max limit of Azure website Auto scale instances given the website's pricing tier. It appears that they differ per tier (e.g., Auto scale is not available on Basic tier (zero), Standard allows up to 10 instances, and Premium allows > 10 instances, etc.).

How can I programmatically retrieve the default max limit? I didn't find anything in the Service Management API but may be missing something.

1

1 Answers

5
votes

It is the property "maximumNumberOfWorkers" on the entity "ServerFarm". The server farm name is listed on the site. This can be retrieved by querying the API, i.e. using powershell:

Switch-AzureMode -Name AzureResourceManager

# GET serverfarms
Get-AzureResource -ResourceGroupName Microsoft.Web -ResourceType serverfarms -OutputObjectFormat New -ApiVersion 2015-08-01

Or via a direct REST API call:

https://management.azure.com/subscriptions/<sub-id>/providers/Microsoft.Web/serverfarms?api-version=2015-08-01

For more information, please see the Azure Resource Explorer: https://resources.azure.com.