查詢雲伺服器ECS資源的續費價格。僅支援查詢包年包月資源的續費價格。
介面說明
僅支援查詢包年包月 ECS 執行個體續費時長的價格或者續費至統一到期日的價格。
- 參數設定的注意事項如下:
只設定必選參數時,預設查詢執行個體續費時長 1 個月的價格資訊。
不支援同時查詢續費時長價格和續費至統一到期日的價格,即續費時長參數(
Period、PeriodUnit)與續費至統一到期日參數(ExpectedRenewDay)不能同時設定。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ecs:DescribeRenewalPrice |
get |
DedicatedHost
Instance
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
執行個體所屬的地域 ID。您可以呼叫 DescribeRegions 查看最新的阿里雲地域清單。 |
cn-hangzhou |
| ResourceType |
string |
否 |
查詢續費價格的資源類型。取值:instance。 預設值:instance。 |
instance |
| ResourceId |
string |
是 |
查詢續費價格的資源 ID。參數 |
i-bp1f2o4ldh8l29zv**** |
| Period |
integer |
否 |
指定續費時長。取值範圍:
預設值:1。 說明
續費時長參數( |
1 |
| PriceUnit |
string |
否 |
指定續費週期。取值範圍:
預設值:Month。 |
Month |
| ExpectedRenewDay |
integer |
否 |
統一到期日。指定該參數後,將查詢執行個體續費至統一到期日的價格資訊。取值範圍:1~28。 關於統一到期日功能的更多資訊,請參見統一執行個體到期日。 說明
續費時長參數( |
5 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| PriceInfo |
object |
價格資訊類型(PriceInfo)組成的資料類型,包括價格和優惠規則資訊。 |
|
| Rules |
object |
||
| Rule |
array<object> |
活動規則。 |
|
|
object |
|||
| Description |
string |
活動規則描述。 |
买满1年,立享官网价格8.5折优惠。 |
| RuleId |
integer |
活動 ID。 |
1234567890 |
| Price |
object |
價格。 |
|
| OriginalPrice |
number |
原價。 |
4368 |
| DiscountPrice |
number |
折扣。 |
655.2 |
| Currency |
string |
貨幣單位。 中國站:CNY。 國際站:USD。 |
CNY |
| TradePrice |
number |
最終價,為原價減去折扣。 |
3712.8 |
| DetailInfos |
object |
||
| DetailInfo |
array<object> |
資源定價詳情。 |
|
|
array<object> |
|||
| Resource |
string |
價格對應的資源名稱。 |
instance |
| OriginalPrice |
number |
原價。 |
4368 |
| DiscountPrice |
number |
折扣價。 |
655.2 |
| TradePrice |
number |
成交價。 |
3712.8 |
| SubRules |
object |
||
| Rule |
array<object> |
定價規則子集。 |
|
|
object |
|||
| Description |
string |
定價規則描述。 |
买满1年,立享官网价格8.5折优惠。 |
| RuleId |
integer |
定價規則 ID。 |
1234567890 |
| RelatedPrice |
object |
||
| MarketplaceImagePrice |
object |
||
| Currency |
string |
CNY |
|
| OriginalPrice |
number |
200 |
|
| DiscountPrice |
number |
0 |
|
| TradePrice |
number |
200 |
樣本
正常返回樣本
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"PriceInfo": {
"Rules": {
"Rule": [
{
"Description": "买满1年,立享官网价格8.5折优惠。",
"RuleId": 1234567890
}
]
},
"Price": {
"OriginalPrice": 4368,
"DiscountPrice": 655.2,
"Currency": "CNY",
"TradePrice": 3712.8,
"DetailInfos": {
"DetailInfo": [
{
"Resource": "instance",
"OriginalPrice": 4368,
"DiscountPrice": 655.2,
"TradePrice": 3712.8,
"SubRules": {
"Rule": [
{
"Description": "买满1年,立享官网价格8.5折优惠。",
"RuleId": 1234567890
}
]
}
}
]
}
},
"RelatedPrice": {
"MarketplaceImagePrice": {
"Currency": "CNY",
"OriginalPrice": 200,
"DiscountPrice": 0,
"TradePrice": 200
}
}
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidResourceType.ValueNotSupported | The specified parameter ResourceType is not valid. | |
| 400 | InvalidPeriod | The specified period is not valid. | |
| 400 | InvalidPriceUnit.ValueNotSupported | The specified parameter PriceUnit is not valid. | |
| 400 | Throttling | Request was denied due to request throttling. | |
| 400 | Throttling.User | Request was denied due to user flow control. | |
| 400 | InternalError | The request processing has failed due to some unknown error. | |
| 400 | InvalidPeriod.ExceededMaximumExpirationDate | The specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt. | |
| 400 | InvalidExpectedRenewDay.Conflict | The specified expectedRenewDay is in conflict with period. | |
| 400 | InvalidExpectedRenewDay.ValueNotSupported | The specified parameter ExpectedRenewDay is not valid. | |
| 400 | InvalidPeriod.ExceededDedicatedHost | Instance expired date can not exceed dedicated host expired date. | |
| 400 | OperationRestricted.Renewal | The renewal operation has been restricted because the zone is closed. %s | |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | |
| 403 | ChargeTypeViolation | The operation is not permitted due to charge type of the instance. | |
| 403 | InvalidAction.Unauthorized | The specified action is not valid. | |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。