你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

App Service Environments - List App Service Plans

获取应用服务环境中的所有App 服务计划的说明。

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms?api-version=2023-12-01

URI 参数

名称 必需 类型 说明
name
path True

string

应用服务环境的名称。

resourceGroupName
path True

string

资源所属的资源组的名称。

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

subscriptionId
path True

string

Azure 订阅 ID。 这是一个 GUID 格式的字符串, (例如 00000000-0000-0000-0000-0000000000000) 。

api-version
query True

string

API 版本

响应

名称 类型 说明
200 OK

AppServicePlanCollection

确定

Other Status Codes

DefaultErrorResponse

App 服务错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

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-12-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
}

定义

名称 说明
AppServicePlan

应用服务计划。

AppServicePlanCollection

App 服务计划的集合。

Capability

描述特定 SKU 允许的功能/功能。

DefaultErrorResponse

App 服务错误响应。

Details
Error

错误模型。

ExtendedLocation

扩展位置。

HostingEnvironmentProfile

要用于此资源的应用服务环境的规范。

KubeEnvironmentProfile

要用于此资源的 Kubernetes 环境的规范。

ProvisioningState

应用服务环境的预配状态。

SkuCapacity

App 服务计划缩放选项的说明。

SkuDescription

可缩放资源的 SKU 说明。

StatusOptions

App 服务计划状态。

AppServicePlan

应用服务计划。

名称 类型 默认值 说明
extendedLocation

ExtendedLocation

扩展位置。

id

string

资源 ID。

kind

string

资源类型。

location

string

资源位置。

name

string

资源名称。

properties.elasticScaleEnabled

boolean

ServerFarm 支持 ElasticScale。 此计划中的应用将缩放,就像 ServerFarm 是 ElasticPremium SKU 一样

properties.freeOfferExpirationTime

string

服务器场免费套餐过期的时间。

properties.geoRegion

string

App 服务计划的地理位置。

properties.hostingEnvironmentProfile

HostingEnvironmentProfile

用于App 服务计划的应用服务环境规范。

properties.hyperV

boolean

False

如果 Hyper-V 容器应用服务计划 truefalse 则为 ;否则为 。

properties.isSpot

boolean

如果true为 ,则此App 服务计划拥有现成实例。

properties.isXenon

boolean

False

已过时:如果 Hyper-V 容器应用服务计划 truefalse 则为 ;否则为 。

properties.kubeEnvironmentProfile

KubeEnvironmentProfile

用于App 服务计划的 Kubernetes 环境的规范。

properties.maximumElasticWorkerCount

integer

此 ElasticScaleEnabled App 服务 计划允许的最大辅助角色总数

properties.maximumNumberOfWorkers

integer

可分配给此App 服务计划的最大实例数。

properties.numberOfSites

integer

分配给此App 服务计划的应用数。

properties.numberOfWorkers

integer

分配给此App 服务计划的实例数。

properties.perSiteScaling

boolean

False

如果true为 ,则分配给此App 服务计划的应用可以独立缩放。 如果false为 ,则分配给此App 服务计划的应用将扩展到该计划的所有实例。

properties.provisioningState

ProvisioningState

App 服务计划的预配状态。

properties.reserved

boolean

False

如果 Linux 应用服务计划 truefalse 则为 ;否则为 。

properties.resourceGroup

string

App 服务计划的资源组。

properties.spotExpirationTime

string

服务器场过期的时间。 仅当它是现成服务器场时有效。

properties.status

StatusOptions

App 服务计划状态。

properties.subscription

string

App 服务计划订阅。

properties.targetWorkerCount

integer

缩放辅助角色计数。

properties.targetWorkerSizeId

integer

缩放辅助角色大小 ID。

properties.workerTierName

string

分配给App 服务计划的目标辅助角色层。

properties.zoneRedundant

boolean

False

如果true为 ,则此App 服务计划将执行可用性区域均衡。 如果false为 ,则此App 服务计划不会执行可用性区域均衡。

sku

SkuDescription

可缩放资源的 SKU 说明。

tags

object

资源标记。

type

string

资源类型。

AppServicePlanCollection

App 服务计划的集合。

名称 类型 说明
nextLink

string

链接到下一页资源。

value

AppServicePlan[]

资源集合。

Capability

描述特定 SKU 允许的功能/功能。

名称 类型 说明
name

string

SKU 功能的名称。

reason

string

SKU 功能的原因。

value

string

SKU 功能的值。

DefaultErrorResponse

App 服务错误响应。

名称 类型 说明
error

Error

错误模型。

Details

名称 类型 说明
code

string

标准化字符串,用于以编程方式标识错误。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

Error

错误模型。

名称 类型 说明
code

string

标准化字符串,用于以编程方式标识错误。

details

Details[]

详细错误。

innererror

string

调试错误的详细信息。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

ExtendedLocation

扩展位置。

名称 类型 说明
name

string

扩展位置的名称。

type

string

扩展位置的类型。

HostingEnvironmentProfile

要用于此资源的应用服务环境的规范。

名称 类型 说明
id

string

应用服务环境的资源 ID。

name

string

应用服务环境的名称。

type

string

应用服务环境的资源类型。

KubeEnvironmentProfile

要用于此资源的 Kubernetes 环境的规范。

名称 类型 说明
id

string

Kubernetes 环境的资源 ID。

name

string

Kubernetes 环境的名称。

type

string

Kubernetes 环境的资源类型。

ProvisioningState

应用服务环境的预配状态。

名称 类型 说明
Canceled

string

Deleting

string

Failed

string

InProgress

string

Succeeded

string

SkuCapacity

App 服务计划缩放选项的说明。

名称 类型 说明
default

integer

此App 服务计划 SKU 的默认辅助角色数。

elasticMaximum

integer

此App 服务计划 SKU 的最大弹性辅助角色数。

maximum

integer

此App 服务计划 SKU 的最大辅助角色数。

minimum

integer

此App 服务计划 SKU 的最小辅助角色数。

scaleType

string

App 服务计划的可用缩放配置。

SkuDescription

可缩放资源的 SKU 说明。

名称 类型 说明
capabilities

Capability[]

SKU 的功能,例如是否启用了流量管理器?

capacity

integer

分配给资源的当前实例数。

family

string

资源 SKU 的系列代码。

locations

string[]

SKU 的位置。

name

string

资源 SKU 的名称。

size

string

资源 SKU 的大小说明符。

skuCapacity

SkuCapacity

SKU 的最小、最大和默认缩放值。

tier

string

资源 SKU 的服务层。

StatusOptions

App 服务计划状态。

名称 类型 说明
Creating

string

Pending

string

Ready

string