-
Notifications
You must be signed in to change notification settings - Fork 97
Web Hosting Plan APIs
Suwat Ch edited this page Jan 21, 2021
·
13 revisions
ARMClient.exe get /subscriptions/{subscription}/providers/Microsoft.Web/serverFarms?api-version=2014-11-01
ARMClient.exe get /subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms?api-version=2014-11-01
ARMClient.exe get /subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms/{planName}?api-version=2014-11-01
ARMClient.exe put /subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms/{planName}?api-version=2014-11-01 @payload.json
Example payload.json to create Web Hosting Plan.
{
"location": "{location}",
"properties": {
"sku": "(Free|Shared|Basic|Standard)", (Optional)
"numberOfWorkers": "(int32)", (Optional)
"workerSize": "(Small|Medium|Large)", (Optional)
"hostingEnvironment": "(string)", (Optional)
"adminSiteName": "(string)" (Optional)
}
}
Note: {hostingEnvironment}
if omitted, will create serverFarm on the cloud env. Otherwise, it will create serverFarm in that hosting environment stamp.
ARMClient.exe put /subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms/{planName}?api-version=2014-11-01 @payload.json
Example payload.json file to set adminSiteName.
{
"location": "{location}",
"properties": {
"adminSiteName": "{siteName}"
}
}
ARMClient.exe get "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms/{planName}/sites?api-version=2014-11-01"
Only running sites
ARMClient.exe get "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms/{planName}/sites?api-version=2014-11-01&$filter=state eq 'running'"
Only non-running sites
ARMClient.exe get "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms/{planName}/sites?api-version=2014-11-01&$filter=state ne 'running'"
ARMClient.exe post "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms/{planName}/restartSites?api-version=2014-11-01&softRestart=True"
ARMClient.exe post "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/serverFarms/{planName}/workers/{ipAddress_OR_computerName}/reboot?api-version=2014-11-01"
ARMClient.exe get "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{siteName}/instances?api-version=2014-11-01"
ARMClient.exe delete /subscriptions/{subscription}/providers/Microsoft.Web/serverFarms/{planName}?api-version=2014-11-01