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=2023-01-01

URI Parameters

Name In Required Type Description
name
path True

string

Name of the App Service Environment.

resourceGroupName
path True

string

Name of the resource group to which the resource belongs.

Regex pattern: ^[-\w\._\(\)]+[^\.]$

subscriptionId
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

AppServicePlanCollection

OK

Other Status Codes

DefaultErrorResponse

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

GET https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-rg/providers/Microsoft.Web/hostingEnvironments/test-ase/serverfarms?api-version=2023-01-01

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
AppServicePlan

App Service plan.

AppServicePlanCollection

Collection of App Service plans.

Capability

Describes the capabilities/features allowed for a specific SKU.

DefaultErrorResponse

App Service error response.

Details
Error

Error model.

ExtendedLocation

Extended Location.

HostingEnvironmentProfile

Specification for an App Service Environment to use for this resource.

KubeEnvironmentProfile

Specification for a Kubernetes Environment to use for this resource.

ProvisioningState

Provisioning state of the App Service Environment.

SkuCapacity

Description of the App Service plan scale options.

SkuDescription

Description of a SKU for a scalable resource.

StatusOptions

App Service plan status.

AppServicePlan

App Service plan.

Name Type Default Value Description
extendedLocation

ExtendedLocation

Extended Location.

id

string

Resource Id.

kind

string

Kind of resource.

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

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 true, false otherwise.

properties.isSpot

boolean

If true, this App Service Plan owns spot instances.

properties.isXenon

boolean

False

Obsolete: If Hyper-V container app service plan true, false otherwise.

properties.kubeEnvironmentProfile

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 true, apps assigned to this App Service plan can be scaled independently. If false, apps assigned to this App Service plan will scale to all instances of the plan.

properties.provisioningState

ProvisioningState

Provisioning state of the App Service Plan.

properties.reserved

boolean

False

If Linux app service plan true, false otherwise.

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

StatusOptions

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 true, this App Service Plan will perform availability zone balancing. If false, this App Service Plan will not perform availability zone balancing.

sku

SkuDescription

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

AppServicePlan[]

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

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

Capability[]

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

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