App Service Environments - List App Service Plans
Description for Get all App Service plans in an App Service Environment.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms?api-version=2024-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
name
|
path | True |
string |
Name of the App Service Environment. |
resource
|
path | True |
string |
Name of the resource group to which the resource belongs. Regex pattern: |
subscription
|
path | True |
string |
Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). |
api-version
|
query | True |
string |
API Version |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK |
|
Other Status Codes |
App Service error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Get all App Service plans in an App Service Environment.
Sample request
Sample response
{
"value": [
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/serverfarms/test-asp",
"name": "test-asp",
"type": "Microsoft.Web/serverfarms",
"kind": "app",
"location": "Central US EUAP",
"tags": {},
"properties": {
"workerTierName": null,
"status": "Ready",
"subscription": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"hostingEnvironmentProfile": {
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase",
"name": "test-ase",
"type": "Microsoft.Web/hostingEnvironments"
},
"maximumNumberOfWorkers": 100,
"geoRegion": "Central US EUAP",
"perSiteScaling": false,
"elasticScaleEnabled": false,
"maximumElasticWorkerCount": 0,
"numberOfSites": 0,
"isSpot": false,
"spotExpirationTime": null,
"freeOfferExpirationTime": null,
"resourceGroup": "test-rg",
"reserved": false,
"isXenon": false,
"hyperV": false,
"targetWorkerCount": 1,
"targetWorkerSizeId": 0,
"provisioningState": null,
"kubeEnvironmentProfile": null,
"zoneRedundant": false
},
"sku": {
"name": "I1",
"tier": "Isolated",
"size": "I1",
"family": "I",
"capacity": 0
}
}
],
"nextLink": null
}
Definitions
Name | Description |
---|---|
App |
App Service plan. |
App |
Collection of App Service plans. |
Capability |
Describes the capabilities/features allowed for a specific SKU. |
Default |
App Service error response. |
Details | |
Error |
Error model. |
Extended |
Extended Location. |
Hosting |
Specification for an App Service Environment to use for this resource. |
Kube |
Specification for a Kubernetes Environment to use for this resource. |
Provisioning |
Provisioning state of the App Service Environment. |
Sku |
Description of the App Service plan scale options. |
Sku |
Description of a SKU for a scalable resource. |
Status |
App Service plan status. |
AppServicePlan
App Service plan.
Name | Type | Default value | Description |
---|---|---|---|
extendedLocation |
Extended Location. |
||
id |
string |
Resource Id. |
|
kind |
string |
Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind. |
|
location |
string |
Resource Location. |
|
name |
string |
Resource Name. |
|
properties.elasticScaleEnabled |
boolean |
ServerFarm supports ElasticScale. Apps in this plan will scale as if the ServerFarm was ElasticPremium sku |
|
properties.freeOfferExpirationTime |
string |
The time when the server farm free offer expires. |
|
properties.geoRegion |
string |
Geographical location for the App Service plan. |
|
properties.hostingEnvironmentProfile |
Specification for the App Service Environment to use for the App Service plan. |
||
properties.hyperV |
boolean |
False |
If Hyper-V container app service plan |
properties.isSpot |
boolean |
If |
|
properties.isXenon |
boolean |
False |
Obsolete: If Hyper-V container app service plan |
properties.kubeEnvironmentProfile |
Specification for the Kubernetes Environment to use for the App Service plan. |
||
properties.maximumElasticWorkerCount |
integer |
Maximum number of total workers allowed for this ElasticScaleEnabled App Service Plan |
|
properties.maximumNumberOfWorkers |
integer |
Maximum number of instances that can be assigned to this App Service plan. |
|
properties.numberOfSites |
integer |
Number of apps assigned to this App Service plan. |
|
properties.numberOfWorkers |
integer |
The number of instances that are assigned to this App Service plan. |
|
properties.perSiteScaling |
boolean |
False |
If |
properties.provisioningState |
Provisioning state of the App Service Plan. |
||
properties.reserved |
boolean |
False |
If Linux app service plan |
properties.resourceGroup |
string |
Resource group of the App Service plan. |
|
properties.spotExpirationTime |
string |
The time when the server farm expires. Valid only if it is a spot server farm. |
|
properties.status |
App Service plan status. |
||
properties.subscription |
string |
App Service plan subscription. |
|
properties.targetWorkerCount |
integer |
Scaling worker count. |
|
properties.targetWorkerSizeId |
integer |
Scaling worker size ID. |
|
properties.workerTierName |
string |
Target worker tier assigned to the App Service plan. |
|
properties.zoneRedundant |
boolean |
False |
If |
sku |
Description of a SKU for a scalable resource. |
||
tags |
object |
Resource tags. |
|
type |
string |
Resource type. |
AppServicePlanCollection
Collection of App Service plans.
Name | Type | Description |
---|---|---|
nextLink |
string |
Link to next page of resources. |
value |
Collection of resources. |
Capability
Describes the capabilities/features allowed for a specific SKU.
Name | Type | Description |
---|---|---|
name |
string |
Name of the SKU capability. |
reason |
string |
Reason of the SKU capability. |
value |
string |
Value of the SKU capability. |
DefaultErrorResponse
App Service error response.
Name | Type | Description |
---|---|---|
error |
Error model. |
Details
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
Error
Error model.
Name | Type | Description |
---|---|---|
code |
string |
Standardized string to programmatically identify the error. |
details |
Details[] |
Detailed errors. |
innererror |
string |
More information to debug error. |
message |
string |
Detailed error description and debugging information. |
target |
string |
Detailed error description and debugging information. |
ExtendedLocation
Extended Location.
Name | Type | Description |
---|---|---|
name |
string |
Name of extended location. |
type |
string |
Type of extended location. |
HostingEnvironmentProfile
Specification for an App Service Environment to use for this resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID of the App Service Environment. |
name |
string |
Name of the App Service Environment. |
type |
string |
Resource type of the App Service Environment. |
KubeEnvironmentProfile
Specification for a Kubernetes Environment to use for this resource.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID of the Kubernetes Environment. |
name |
string |
Name of the Kubernetes Environment. |
type |
string |
Resource type of the Kubernetes Environment. |
ProvisioningState
Provisioning state of the App Service Environment.
Name | Type | Description |
---|---|---|
Canceled |
string |
|
Deleting |
string |
|
Failed |
string |
|
InProgress |
string |
|
Succeeded |
string |
SkuCapacity
Description of the App Service plan scale options.
Name | Type | Description |
---|---|---|
default |
integer |
Default number of workers for this App Service plan SKU. |
elasticMaximum |
integer |
Maximum number of Elastic workers for this App Service plan SKU. |
maximum |
integer |
Maximum number of workers for this App Service plan SKU. |
minimum |
integer |
Minimum number of workers for this App Service plan SKU. |
scaleType |
string |
Available scale configurations for an App Service plan. |
SkuDescription
Description of a SKU for a scalable resource.
Name | Type | Description |
---|---|---|
capabilities |
Capabilities of the SKU, e.g., is traffic manager enabled? |
|
capacity |
integer |
Current number of instances assigned to the resource. |
family |
string |
Family code of the resource SKU. |
locations |
string[] |
Locations of the SKU. |
name |
string |
Name of the resource SKU. |
size |
string |
Size specifier of the resource SKU. |
skuCapacity |
Min, max, and default scale values of the SKU. |
|
tier |
string |
Service tier of the resource SKU. |
StatusOptions
App Service plan status.
Name | Type | Description |
---|---|---|
Creating |
string |
|
Pending |
string |
|
Ready |
string |