伸縮組配置的有效性很大程度決定了擴容過程的成功率。彈性伸縮透過彈性強度描述伸縮配置的有效性,讓配置的優良程度量化,幫助使用者針對性地最佳化伸縮配置。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
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。 |
NoSpot |
| SystemDiskCategories |
array |
否 |
多個系統磁碟類型。傳入時,覆蓋伸縮配置中的系統磁碟類型。取值範圍:
說明
當不指定伸縮組 ID 時,需要傳入此參數。 |
|
|
string |
否 |
系統磁碟的多磁碟類型。取值範圍:
|
cloud |
|
| ScalingGroupIds |
array |
否 |
批次查詢時的查詢伸縮組的 ID 列表。 |
|
|
string |
否 |
伸縮組的 ID。 |
asg-bp14wlu85wrpchm0**** |
|
| SpotStrategy |
string |
否 |
執行個體的搶佔策略。取值範圍:
預設值: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_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 |
| 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 |
| InventoryHealth |
object |
庫存健康度。 |
|
| HealthScore |
integer |
Inventory health score.
Calculation Formula: |
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 |
當前資源池的彈性強度,綜合考慮了當前資源池的庫存健康度和庫存現狀。可能值:
|
Medium |
| ElasticStrengthModels |
array<object> |
批次查詢伸縮組時的彈性強度。 |
|
|
array<object> |
|||
| ScalingGroupId |
string |
伸縮組 ID。 |
asg-wz98mnj7nblv9gc**** |
| ElasticStrength |
string |
當前伸縮組的彈性強度。可能值:
|
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 |
| InventoryHealth |
object |
Inventory health degree. |
|
| HealthScore |
integer |
Inventory health score.
Calculation Formula: |
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"
}
]
}
]
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。