查詢一個或多個彈性供應組。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:DescribeAutoProvisioningGroups |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
彈性供應組所在地區的 ID。 |
cn-hangzhou |
| PageNumber |
integer |
否 |
分頁查詢時設定的列表頁碼。 起始值:1。 預設值:1。 |
1 |
| PageSize |
integer |
否 |
分頁查詢時設定的每頁行數。 最大值:100。 預設值:10。 |
2 |
| AutoProvisioningGroupName |
string |
否 |
彈性供應組的名稱。 |
testAutoProvisioningGroupName |
| ResourceGroupId |
string |
否 |
彈性供應組所屬的資源群組 ID。 |
rg-bp67acfmxazb4p**** |
| AutoProvisioningGroupId |
array |
否 |
彈性供應組 ID 列表。可輸入最多 20 個彈性供應組 ID。 |
apg-sn54avj8htgvtyh8**** |
|
string |
否 |
彈性供應組 ID。 |
apg-sn54avj8htgvtyh8**** |
|
| AutoProvisioningGroupStatus |
array |
否 |
彈性供應組的狀態列表。 |
active |
|
string |
否 |
彈性供應組的狀態,取值範圍:
|
active |
|
| AutoProvisioningGroupTypes |
array |
否 |
||
|
string |
否 |
request |
||
| Tag |
array<object> |
否 |
彈性供應組綁定的標籤。 |
|
|
object |
否 |
彈性供應組綁定的標籤。 |
||
| Key |
string |
否 |
彈性供應組的標籤鍵。 N 的取值範圍:1~20。一旦傳入該值,則不允許為空白字串。最多支援 128 個字元,不能以 aliyun 和 acs:開頭,不能包含 http://或者 https://。 |
TestKey |
| Value |
string |
否 |
彈性供應組的標籤值。 N 的取值範圍:1~20。一旦傳入該值,允許為空白字串。最多支援 128 個字元,不能包含 http://或者 https://。 |
TestValue |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| PageSize |
integer |
每頁行數。 |
10 |
| RequestId |
string |
請求 ID。 |
745CEC9F-0DD7-4451-9FE7-8B752F39**** |
| PageNumber |
integer |
頁碼。 |
1 |
| TotalCount |
integer |
查詢到的彈性供應組的個數。 |
10 |
| AutoProvisioningGroups |
object |
||
| AutoProvisioningGroup |
array<object> |
彈性供應組的詳細資料。 |
|
|
array<object> |
彈性供應組的詳細資料。 |
||
| CreationTime |
string |
建立時間。 |
2019-04-01T15:10:20Z |
| AutoProvisioningGroupName |
string |
彈性供應組的名稱。 |
EcsDocTest |
| Status |
string |
彈性供應組的狀態。可能值:
|
submitted |
| TerminateInstances |
boolean |
刪除彈性供應組時,是否釋放組內執行個體。可能值:
|
false |
| MaxSpotPrice |
number |
搶佔式執行個體的最高價格。 說明
同時設定了 MaxSpotPrice 和 LaunchTemplateConfig.N.MaxPrice 時,以最低值為準。 LaunchTemplateConfig.N.MaxPrice 在建立彈性供應組時設定,且不可修改。 |
2 |
| State |
string |
彈性供應組整體調度的執行狀態。可能值:
|
fulfilled |
| LaunchTemplateId |
string |
關聯的執行個體啟動模板的 ID。 |
lt-bp1fgzds4bdogu03**** |
| ValidFrom |
string |
彈性供應組的啟動時間,和 |
2019-04-01T15:10:20Z |
| LaunchTemplateVersion |
string |
關聯的執行個體啟動模板的版本。 |
1 |
| TerminateInstancesWithExpiration |
boolean |
彈性供應組到期時,是否釋放組內執行個體。可能值:
|
true |
| RegionId |
string |
所在地區的 ID。 |
cn-hangzhou |
| ValidUntil |
string |
彈性供應組的到期時間,和 |
2019-06-01T15:10:20Z |
| AutoProvisioningGroupType |
string |
交付類型。可能值:
|
maintain |
| AutoProvisioningGroupId |
string |
彈性供應組 ID。 |
apg-sn54avj8htgvtyh8**** |
| ExcessCapacityTerminationPolicy |
string |
彈性供應組即時容量超過目標容量並觸發縮容時,是否釋放縮容的執行個體。可能值:
|
termination |
| ResourceGroupId |
string |
彈性供應組所屬的資源群組 ID。 |
rg-bp67acfmxazb4p**** |
| LaunchTemplateConfigs |
object |
||
| LaunchTemplateConfig |
array<object> |
擴充啟動模板的詳細資料。 |
|
|
object |
|||
| MaxPrice |
number |
擴充啟動模板對應執行個體規格的價格上限。 |
3 |
| Priority |
number |
擴充啟動模板對應的執行個體規格的優先順序,取值為 0 時最高。 |
1 |
| VSwitchId |
string |
擴充啟動模板對應的虛擬交換器的 ID。 |
vsw-sn5bsitu4lfzgc5o7**** |
| WeightedCapacity |
number |
擴充啟動模板對應的執行個體規格的權重。 |
2 |
| InstanceType |
string |
擴充啟動模板對應的執行個體規格。 |
ecs.g5.large |
| SpotOptions |
object |
搶佔式執行個體相關的策略。 |
|
| InstancePoolsToUseCount |
integer |
彈性供應組選擇價格最低的執行個體規格建立執行個體的數量。 說明
該參數在建立彈性供應組時被設定,且不可修改。 |
2 |
| AllocationStrategy |
string |
建立搶佔式執行個體的策略。可能值:
|
diversified |
| InstanceInterruptionBehavior |
string |
停止了超額的搶佔式執行個體後的下一步動作。可能值:
|
stop |
| PayAsYouGoOptions |
object |
隨用隨付執行個體相關的策略。 |
|
| AllocationStrategy |
string |
建立隨用隨付執行個體的策略。可能值:
說明
LaunchTemplateConfig.N.Priority 在建立彈性供應組時設定,且不可修改。 |
prioritized |
| TargetCapacitySpecification |
object |
彈性供應組的目標容量設定。 |
|
| SpotTargetCapacity |
number |
搶佔式執行個體的目標容量。 |
20 |
| PayAsYouGoTargetCapacity |
number |
隨用隨付執行個體的目標容量。 |
30 |
| DefaultTargetCapacityType |
string |
|
Spot |
| TotalTargetCapacity |
number |
彈性供應組的目標總容量,由以下三個部分組成:
|
60 |
| Tags |
object |
||
| Tag |
array<object> |
彈性供應組綁定的標籤。 |
|
|
object |
彈性供應組綁定的標籤。 |
||
| TagKey |
string |
彈性供應組的標籤鍵。 N 的取值範圍:1~20。一旦傳入該值,則不允許為空白字串。最多支援 128 個字元,不能以 aliyun 和 acs:開頭,不能包含 http://或者 https://。 |
TestKey |
| TagValue |
string |
彈性供應組的標籤值。 N 的取值範圍:1~20。一旦傳入該值,允許為空白字串。最多支援 128 個字元,不能包含 http://或者 https://。 |
TestValue |
| CandidateOptions |
object |
||
| TimeoutMinutes |
integer |
60 |
|
| CapacitySpecification |
object |
||
| PayAsYouGoCapacity |
number |
2 |
|
| PrePaidCapacity |
number |
0 |
|
| SpotCapacity |
number |
3 |
|
| TotalCapacity |
number |
5 |
|
| SuspendedProcesses |
object |
||
| SuspendedProcess |
array |
||
|
string |
ScaleOut |
樣本
正常返回樣本
JSON格式
{
"PageSize": 10,
"RequestId": "745CEC9F-0DD7-4451-9FE7-8B752F39****",
"PageNumber": 1,
"TotalCount": 10,
"AutoProvisioningGroups": {
"AutoProvisioningGroup": [
{
"CreationTime": "2019-04-01T15:10:20Z",
"AutoProvisioningGroupName": "EcsDocTest",
"Status": "submitted",
"TerminateInstances": false,
"MaxSpotPrice": 2,
"State": "fulfilled",
"LaunchTemplateId": "lt-bp1fgzds4bdogu03****",
"ValidFrom": "2019-04-01T15:10:20Z",
"LaunchTemplateVersion": "1",
"TerminateInstancesWithExpiration": true,
"RegionId": "cn-hangzhou",
"ValidUntil": "2019-06-01T15:10:20Z",
"AutoProvisioningGroupType": "maintain",
"AutoProvisioningGroupId": "apg-sn54avj8htgvtyh8****",
"ExcessCapacityTerminationPolicy": "termination",
"ResourceGroupId": "rg-bp67acfmxazb4p****",
"LaunchTemplateConfigs": {
"LaunchTemplateConfig": [
{
"MaxPrice": 3,
"Priority": 1,
"VSwitchId": "vsw-sn5bsitu4lfzgc5o7****",
"WeightedCapacity": 2,
"InstanceType": "ecs.g5.large"
}
]
},
"SpotOptions": {
"InstancePoolsToUseCount": 2,
"AllocationStrategy": "diversified",
"InstanceInterruptionBehavior": "stop"
},
"PayAsYouGoOptions": {
"AllocationStrategy": "prioritized"
},
"TargetCapacitySpecification": {
"SpotTargetCapacity": 20,
"PayAsYouGoTargetCapacity": 30,
"DefaultTargetCapacityType": "Spot",
"TotalTargetCapacity": 60
},
"Tags": {
"Tag": [
{
"TagKey": "TestKey",
"TagValue": "TestValue"
}
]
},
"CandidateOptions": {
"TimeoutMinutes": 60
},
"CapacitySpecification": {
"PayAsYouGoCapacity": 2,
"PrePaidCapacity": 0,
"SpotCapacity": 3,
"TotalCapacity": 5
},
"SuspendedProcesses": {
"SuspendedProcess": [
"ScaleOut"
]
}
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | MissingParamter.RegionId | The regionId should not be null. | 參數 RegionId 不得為空白。 |
| 400 | InvalidName.Malformed | The specified parameter "AutoProvisioningGroupName" is not valid. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。