查詢彈性保障服務的詳細資料。例如彈性保障服務的狀態、匹配模式、生效方式、失效時間、已使用的執行個體的數量等。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:DescribeElasticityAssurances |
get |
*ElasticityAssurance
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
彈性保障服務所屬地區 ID。您可以調用 DescribeRegions 查看最新的阿里雲地區列表。 |
cn-hangzhou |
| ResourceGroupId |
string |
否 |
資源群組 ID。使用該參數過濾資源時,資源數量不能超過 1000 個。 說明
不支援預設資源群組過濾。 |
rg-bp67acfmxazb4p**** |
| Tag |
array<object> |
否 |
彈性保障服務綁定的標籤索引值對列表。 |
|
|
object |
否 |
標籤對資訊。 |
||
| Key |
string |
否 |
標籤鍵。N 表示可以設定多個標籤鍵進行過濾,N 的取值範圍為 1~20。 使用一個標籤過濾資源,查詢到該標籤下的資源數量不能超過 1000 個;使用多個標籤過濾資源,查詢到同時綁定了多個標籤的資源數量不能超過 1000 個。如果資源數量超過 1000 個,請使用 ListTagResources 介面進行查詢。 |
TestKey |
| Value |
string |
否 |
標籤值。N 表示可以設定多個標籤鍵進行過濾,N 的取值範圍為 1~20。 |
TestValue |
| MaxResults |
integer |
否 |
分頁查詢時每頁行數。 最大值:100。 預設值:10。 |
10 |
| NextToken |
string |
否 |
彈性保障服務查詢起始標誌。由上一次的請求結果中擷取。 |
caeba0bbb2be03f84eb48b699f0a4883 |
| PrivatePoolOptions.Ids |
string |
否 |
彈性保障服務 ID 列表。取值可以由多個 ID 組成一個 JSON 數組,最多支援 100 個 ID,ID 之間用半形逗號(,)隔開。 |
["eap-bp67acfmxazb4****", "eap-bp67acfmxazb5****"] |
| Platform |
string |
否 |
說明
該參數已廢棄。 |
null |
| InstanceType |
string |
否 |
執行個體規格。通過執行個體規格只可以查詢還在生效中的彈性保障服務,已釋放的服務只能通過 |
ecs.c6.large |
| ZoneId |
string |
否 |
彈性保障服務所屬地區下的可用性區域 ID。 |
cn-hangzhou-h |
| InstanceChargeType |
string |
否 |
執行個體的計費方式。取值:PostPaid,目前僅支援隨用隨付。 預設值:PostPaid。 |
PostPaid |
| Status |
string |
否 |
彈性保障服務的狀態。取值範圍:
若不指定,則查詢除 Pending、Released 以外狀態的彈性保障。 |
Active |
| PackageType |
string |
否 |
彈性保障服務類型,取值範圍:
|
ElasticityAssurance |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| NextToken |
string |
彈性保障服務下一個查詢起始標誌。 |
caeba0bbb2be03f84eb48b699f0a4883 |
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TotalCount |
integer |
符合查詢條件的記錄條數。 |
1 |
| MaxResults |
integer |
彈性保障服務每頁顯示行數。 |
10 |
| ElasticityAssuranceSet |
object |
||
| ElasticityAssuranceItem |
array<object> |
彈性保障服務詳細資料組成的集合。 |
|
|
array<object> |
彈性保障服務詳細資料。 |
||
| Status |
string |
彈性保障服務的狀態。可能值:
|
Active |
| PrivatePoolOptionsMatchCriteria |
string |
彈性保障服務的匹配模式。可能值:
|
Target |
| PrivatePoolOptionsId |
string |
彈性保障服務 ID。 |
eap-bp1ir35kqtn8ywci**** |
| UsedAssuranceTimes |
integer |
說明
該參數暫未開放使用。 |
0 |
| LatestStartTime |
string |
說明
該參數暫未開放使用。 |
null |
| PrivatePoolOptionsName |
string |
彈性保障服務名稱。 |
eapTestName |
| RegionId |
string |
彈性保障服務所屬地區 ID。 |
cn-hangzhou |
| EndTime |
string |
彈性保障服務失效時間。 |
2021-12-03T16:00Z |
| StartTime |
string |
彈性保障服務生效時間。 |
2020-12-03T05:25Z |
| Description |
string |
彈性保障服務描述。 |
This is description. |
| ResourceGroupId |
string |
資源群組 ID。 |
rg-bp67acfmxazb4p**** |
| TotalAssuranceTimes |
string |
彈性保障服務的總次數。目前僅支援在服務生效期內的無限次模式。 |
Unlimited |
| AllocatedResources |
object |
||
| AllocatedResource |
array<object> |
資源分派詳情列表。 |
|
|
array<object> |
資源分派詳情。 |
||
| UsedAmount |
integer |
已使用的執行個體的數量。 |
2 |
| TotalAmount |
integer |
在一個執行個體規格內,需要預留的執行個體的總數量。 |
2 |
| AvailableAmount |
integer |
說明
該參數暫未開放使用。 |
5 |
| FailedAmount |
integer |
1 |
|
| LockedAmount |
integer |
1 |
|
| zoneId |
string |
彈性保障服務所屬地區下的可用性區域 ID。 |
cn-hangzhou-h |
| InstanceType |
string |
執行個體規格。 |
ecs.c6.large |
| ElasticityAssuranceUsages |
object |
||
| ElasticityAssuranceUsage |
array<object> |
說明
該參數暫未開放使用。 |
|
|
object |
說明
該參數暫未開放使用。 |
||
| AccountId |
string |
說明
該參數暫未開放使用。 |
1144775968548340 |
| ServiceName |
string |
說明
該參數暫未開放使用。 |
name |
| UsedAmount |
integer |
說明
該參數暫未開放使用。 |
1 |
| Tags |
object |
||
| Tag |
array<object> |
彈性保障服務綁定的標籤索引值對列表。 |
|
|
object |
彈性保障服務綁定的標籤索引值對資訊。 |
||
| TagValue |
string |
標籤值。 |
TestValue |
| TagKey |
string |
標籤鍵。 |
TestKey |
| InstanceChargeType |
string |
執行個體的計費方式。目前僅支援隨用隨付。 可能值:PostPaid。 |
PostPaid |
| StartTimeType |
string |
彈性保障生效方式。可能值:
|
Now |
| ElasticityAssuranceOwnerId |
string |
說明
該參數暫未開放使用。 |
e114477596854834 |
| RecurrenceRules |
object |
||
| RecurrenceRule |
array<object> |
彈性保障-分時保障重複規則列表。 |
|
|
object |
彈性保障-分時保障重複規則。 |
||
| RecurrenceType |
string |
重複規則的策略類型。可能值:
|
Daily |
| RecurrenceValue |
string |
重複規則執行數值。可能值
|
1 |
| StartHour |
integer |
分時保障生效時間。 |
4 |
| EndHour |
integer |
分時保障結束時間。 |
10 |
| PackageType |
string |
彈性保障服務類型,可能值:
|
ElasticityAssurance |
樣本
正常返回樣本
JSON格式
{
"NextToken": "caeba0bbb2be03f84eb48b699f0a4883",
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TotalCount": 1,
"MaxResults": 10,
"ElasticityAssuranceSet": {
"ElasticityAssuranceItem": [
{
"Status": "Active",
"PrivatePoolOptionsMatchCriteria": "Target",
"PrivatePoolOptionsId": "eap-bp1ir35kqtn8ywci****",
"UsedAssuranceTimes": 0,
"LatestStartTime": "null",
"PrivatePoolOptionsName": "eapTestName",
"RegionId": "cn-hangzhou",
"EndTime": "2021-12-03T16:00Z",
"StartTime": "2020-12-03T05:25Z",
"Description": "This is description.",
"ResourceGroupId": "rg-bp67acfmxazb4p****",
"TotalAssuranceTimes": "Unlimited",
"AllocatedResources": {
"AllocatedResource": [
{
"UsedAmount": 2,
"TotalAmount": 2,
"AvailableAmount": 5,
"FailedAmount": 1,
"LockedAmount": 1,
"zoneId": "cn-hangzhou-h",
"InstanceType": "ecs.c6.large",
"ElasticityAssuranceUsages": {
"ElasticityAssuranceUsage": [
{
"AccountId": "1144775968548340",
"ServiceName": "name",
"UsedAmount": 1
}
]
}
}
]
},
"Tags": {
"Tag": [
{
"TagValue": "TestValue",
"TagKey": "TestKey"
}
]
},
"InstanceChargeType": "PostPaid",
"StartTimeType": "Now",
"ElasticityAssuranceOwnerId": "e114477596854834",
"RecurrenceRules": {
"RecurrenceRule": [
{
"RecurrenceType": "Daily",
"RecurrenceValue": "1",
"StartHour": 4,
"EndHour": 10
}
]
},
"PackageType": "ElasticityAssurance"
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | MissingParameter.RegionId | The specified RegionId should not be null. | RegionId是必選參數。 |
| 400 | InvalidParameter.Name | The specified PrivatePoolOptions.Name is invalid. | |
| 400 | InvalidParameter.PrivatePoolOptions.Ids | The specified PrivatePoolOptions.Ids is invalid. | |
| 400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | 私人池不支援Dedicated Host。 |
| 400 | SpotNotSupported | Spot is not supported for PrivatePool. | 私人池不支援搶佔式執行個體。 |
| 400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | 私人池不支援傳統網路類型執行個體。 |
| 400 | Invalid.InstanceId | Instance does not exist. | 執行個體不存在。 |
| 400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | Target模式不支援本次操作。 |
| 400 | MissingParameter.PrivatePoolOptions.Id | The specified PrivatePoolOptions.Id should not be null. | PrivatePoolOptions.Id 參數不可為空。 |
| 400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | 私人池不存在。 |
| 400 | Invalid.InstanceType | The InstanceType does not match the PrivatePool. | 執行個體類型與私人池不匹配。 |
| 400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | 執行個體計費類型與私人池不匹配。 |
| 400 | Invalid.ZoneId | The ZoneId does not match the PrivatePool. | 可用性區域與私人池不匹配。 |
| 400 | Invalid.PrivatePoolOptions.status | The PrivatePool has been used up. | 該資源已用完。 |
| 400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | 指定的Platform參數與私人池不匹配。 |
| 400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | 私人池不屬於建立執行個體的使用者。 |
| 400 | MissingParameter.PackageType | The specified parameter "PackageType" can not be empty. | 指定的參數PackageType不可為空。 |
| 400 | MissingParameter.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" can not be empty. | 指定參數“PrivatePoolOptions.ids”不可為空。 |
| 400 | MissingParameter.InstanceCpuCoreCount | The specified parameter "InstanceCpuCoreCount" can not be empty. | 指定的參數 'InstanceCpuCocount'不可為空。 |
| 400 | MissingParameter.InstanceAmount | The specified parameter "InstanceAmount" can not be empty. | 指定的參數InstanceAmount不可為空。 |
| 400 | MissingParameter.InstanceCpuCoreCountOrInstanceAmount | The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. | 指定的參數InstanceCpuCoreCount和InstanceAmount不能同時為空白。 |
| 400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | PrivatePoolOptions.Ids參數超過上限。 |
| 400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | ZoneIds參數超過上限。 |
| 400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | InstanceTypes參數超過上限。 |
| 400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | 多個私人池未支付。 |
| 400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | InstanceCpuCoreCount和InstanceAmount兩個參數不需要同時提供。 |
| 400 | Invalid.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. | 指定的私人池ID不存在。 |
| 400 | Invalid.PackageType | The specified parameter "PackageType" is invalid. | 指定的參數“PackageType”無效。 |
| 400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | 私人池已經支付。 |
| 400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | AssuranceTimes參數值不支援。 |
| 400 | RepeatStartPrivatePool | PrivatePool has already been started. | 私人池已經啟動。 |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 內部錯誤,請重試。 |
| 404 | InvalidResourceGroup.NotFound | The specified resource group is not found. | 找不到對應的資源群組 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。