全部產品
Search
文件中心

Auto Scaling:DescribeElasticStrength

更新時間:Sep 10, 2026

伸縮組配置的有效性很大程度決定了擴容過程的成功率。彈性伸縮透過彈性強度描述伸縮配置的有效性,讓配置的優良程度量化,幫助使用者針對性地最佳化伸縮配置。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

ess:DescribeElasticStrength

get

*All Resource

*

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

伸縮組所屬地域的 ID。

cn-qingdao

ScalingGroupId

string

伸縮組的 ID。

asg-bp18p2yfxow2dloq****

InstanceTypes

array

ECS 執行個體的執行個體規格的集合。 傳入時,覆蓋伸縮配置中的執行個體規格。

string

ECS 執行個體的執行個體規格。

ecs.g6.large

PriorityStrategy

string

說明

此欄位已廢棄,請使用 SpotStrategy。

後付費執行個體的搶佔策略。傳入時覆蓋伸縮組配置的搶佔策略,取值範圍:

  • NoSpot:普通的按量付費執行個體。

  • SpotWithPriceLimit:設定上限價格的搶佔式執行個體。

  • SpotAsPriceGo:系統自動出價,跟隨當前市場實際價格。

預設值:NoSpot。

NoSpot

SystemDiskCategories

array

多個系統磁碟類型。傳入時,覆蓋伸縮配置中的系統磁碟類型。取值範圍:

  • cloud:普通雲端硬碟。

  • cloud_efficiency:高效雲端硬碟。

  • cloud_ssd:SSD 雲端硬碟。

  • cloud_essd:ESSD 雲端硬碟。

說明

當不指定伸縮組 ID 時,需要傳入此參數。

string

系統磁碟的多磁碟類型。取值範圍:

  • cloud:普通雲端硬碟。

  • cloud_efficiency:高效雲端硬碟。

  • cloud_ssd:SSD 雲端硬碟。

  • cloud_essd:ESSD 雲端硬碟。

cloud

ScalingGroupIds

array

批次查詢時的查詢伸縮組的 ID 列表。

string

伸縮組的 ID。

asg-bp14wlu85wrpchm0****

SpotStrategy

string

執行個體的搶佔策略。取值範圍:

  • NoSpot:正常按量付費執行個體。

  • SpotWithPriceLimit:設定上限價格的搶佔式執行個體。

  • SpotAsPriceGo:系統自動出價,跟隨當前市場實際價格的搶佔式執行個體。

預設值:NoSpot。

NoSpot

VSwitchIds

array

指定多個交換機 ID。

說明

當不指定伸縮組 ID 時,需要傳入此參數。

string

指定多個交換機 ID。

說明

當不指定伸縮組 ID 時,需要傳入此參數。

vsw-bp1whw2u46cn8zubm****

ImageId

string

映像檔案 ID,自動建立執行個體時使用的映像資源。

說明

當不指定伸縮組 ID 時,需要至少指定 ImageId、ImageName、ImageFamily 中的一個。

centos6u5_64_20G_aliaegis****.vhd

ImageName

string

映像檔案名稱,同一個地域內映像名稱唯一。如果設定了 ImageId,ImageName 將被忽略。

不支援透過 ImageName 設定映像市場映像。

說明

當不指定伸縮組 ID 時,需要至少指定 ImageId、ImageName、ImageFamily 中的一個。

ubuntu_18_04_x64_20G_alibase_20231225.vhd

ImageFamily

string

映像族系名稱,透過設定該參數來取得當前映像族系內最新的可用映像,用於建立執行個體。如果已經設定了參數 ImageId,則不能設定該參數。

說明

當不指定伸縮組 ID 時,需要至少指定 ImageId、ImageName、ImageFamily 中的一個。

CentOS7

DataDiskCategories

array

查詢指定了多種資料磁碟類型時的彈性強度,當存在資料磁碟類型不匹配時,查詢結果中會返回具體的不匹配磁碟類型。

說明

當不指定伸縮組 ID 時,可以傳入此參數。

string

資料磁碟類型。可能值:

  • cloud:普通雲端硬碟

  • cloud_efficiency:高效雲端硬碟

  • cloud_ssd:SSD 雲端硬碟

  • cloud_essd:ESSD 雲端硬碟

  • ephemeral_ssd:本機 SSD 碟。

cloud_essd

Ipv6AddressCount

integer

IPv6 位址數。當執行個體規格不滿足 IPv6 位址數量要求時,會導致彈性強度差。

說明

當不指定伸縮組 ID 時,可以傳入此參數。

1

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

請求 ID。

73469C7-AA6F-4DC5-B3DB-A3DC0DE3****

TotalStrength

number

伸縮組的彈性強度。每個執行個體規格+可用區的組合根據供應情況得分為 0 到 1 分,其中 0 分代表彈性強度低,1 分代表彈性強度高。所有執行個體規格+可用區的組合的得分總和為伸縮組的彈性強度。

警告 該欄位已廢棄。

1.5

ElasticStrength

string

當前伸縮組的彈性強度。可能值:

  • Strong:彈性強度高。

  • Medium:彈性強度中。

  • Weak:彈性強度弱。

Strong

ResourcePools

array<object>

查詢單個伸縮組時的彈性強度。

array<object>

Strength

number

資源池的彈性強度。

0.6

InstanceType

string

資源池的執行個體規格。

ecs.c7t.xlarge

ZoneId

string

資源池的可用區 ID。

cn-hangzhou-g

VSwitchIds

array

資源池的可用區中的交換機。

string

交換機 ID。

vsw-2ze0uc933kantv******

Code

string

彈性強度為 0 時的原因(錯誤碼)。

InstanceTypesOrDiskTypesNotSupported

Msg

string

彈性強度為 0 時的原因(錯誤描述)。

The instanceTypes or diskTypes are not supported.

Status

string

資源池是否可用。可能值:

  • Available: 可用。

  • Unavailable: 不可用。約束不通過、規格未部署、規格無庫存等會導致規格不可用。

Available

InventoryHealth

object

庫存健康度。

HealthScore

integer

Inventory health score.

  • Scores of 5–6 indicate very high supply certainty.

  • Scores of 1–4 indicate uncertain supply; on-demand reservation is recommended.

  • Scores of -3–0 indicate a warning for inventory health; changing the instance type is recommended.

Calculation Formula: HealthScore (Inventory Health Score) = AdequacyScore (Adequacy) + SupplyScore (Replenishment Capability) - HotScore (Popularity).

3

AdequacyScore

integer

Adequacy.

Possible values: 0–3.

3

SupplyScore

integer

Replenishment capability.

Possible values: 0–3.

3

HotScore

integer

Popularity.

Possible values: 0–3.

3

ElasticStrength

string

當前資源池的彈性強度,綜合考慮了當前資源池的庫存健康度和庫存現狀。可能值:

  • Strong:彈性強度高。

  • Medium:彈性強度中。

  • Weak:彈性強度弱。

Medium

ElasticStrengthModels

array<object>

批次查詢伸縮組時的彈性強度。

array<object>

ScalingGroupId

string

伸縮組 ID。

asg-wz98mnj7nblv9gc****

ElasticStrength

string

當前伸縮組的彈性強度。可能值:

  • Strong:彈性強度高。

  • Medium:彈性強度中。

  • Weak:彈性強度弱。

Strong

TotalStrength

number

當前伸縮組的彈性強度。每個執行個體規格+可用區的組合根據供應情況得分為 0 到 1 分,其中 0 分代表彈性強度低,1 分代表彈性強度高。所有執行個體規格+可用區的組合的得分總和為伸縮組的彈性強度。

警告 該欄位已廢棄。

5

ResourcePools

array<object>

每個資源池的彈性強度資訊。

array<object>

InstanceType

string

Instance type of the resource pool.

ecs.r7.large

Strength

number

The elasticity strength of the resource pool.

警告 This field is deprecated.

0.6

ZoneId

string

The zone ID of the resource pool.

cn-hangzhou-g

VSwitchIds

array

The vSwitches in the zone of the resource pool.

string

The vSwitch ID.

vsw-2ze6e8p4aid08lymlsguv

Code

string

Reason (error code) when elasticity strength is 0.

InstanceTypesOrDiskTypesNotSupported

Msg

string

The reason (fault description) when the elasticity strength is 0.

The instanceTypes or diskTypes are not supported.

Status

string

Whether the resource pool is active. Possible values:

  • Available: active.

  • Unavailable: not active. A constraint may have failed, the specification may not be deployed, or the specification may have no inventory.

Available

InventoryHealth

object

Inventory health degree.

HealthScore

integer

Inventory health score.

  • 5–6 points: Indicates very high supply certainty.

  • 1–4 points: Indicates uncertain supply; on-demand reservation is recommended.

  • -3–0 points: Indicates a warning in supply health; changing the instance type is recommended.

Calculation Formula: HealthScore (inventory health score) = AdequacyScore (adequacy degree) + SupplyScore (supply capability) – HotScore (hotness degree).

3

AdequacyScore

integer

Adequacy degree.

Possible values: 0–3.

3

SupplyScore

integer

Supply capability.

Possible values: 0–3.

2

HotScore

integer

Hotness degree.

Possible values: 0–3.

0

ElasticStrength

string

Strong

樣本

正常返回樣本

JSON格式

{
  "RequestId": "73469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "TotalStrength": 1.5,
  "ElasticStrength": "Strong",
  "ResourcePools": [
    {
      "Strength": 0.6,
      "InstanceType": "ecs.c7t.xlarge",
      "ZoneId": "cn-hangzhou-g",
      "VSwitchIds": [
        "vsw-2ze0uc933kantv******"
      ],
      "Code": "InstanceTypesOrDiskTypesNotSupported",
      "Msg": "The instanceTypes or diskTypes are not supported.",
      "Status": "Available",
      "InventoryHealth": {
        "HealthScore": 3,
        "AdequacyScore": 3,
        "SupplyScore": 3,
        "HotScore": 3
      },
      "ElasticStrength": "Medium"
    }
  ],
  "ElasticStrengthModels": [
    {
      "ScalingGroupId": "asg-wz98mnj7nblv9gc****",
      "ElasticStrength": "Strong",
      "TotalStrength": 5,
      "ResourcePools": [
        {
          "InstanceType": "ecs.r7.large",
          "Strength": 0.6,
          "ZoneId": "cn-hangzhou-g",
          "VSwitchIds": [
            "vsw-2ze6e8p4aid08lymlsguv"
          ],
          "Code": "InstanceTypesOrDiskTypesNotSupported",
          "Msg": "The instanceTypes or diskTypes are not supported.",
          "Status": "Available",
          "InventoryHealth": {
            "HealthScore": 3,
            "AdequacyScore": 3,
            "SupplyScore": 2,
            "HotScore": 0
          },
          "ElasticStrength": "Strong"
        }
      ]
    }
  ]
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情