Queries the renewal price of Elastic Compute Service (ECS) resources. Only subscription resources are supported.
Operation description
Only the price for renewing a subscription ECS instance for a specified duration or renewing it to a unified expiration date is supported.
- Note the following when you set the parameters:
If you set only the required parameters, the price for renewing the instance for one month is returned by default.
You cannot query the renewal duration price and the unified expiration date price at the same time. The renewal duration parameters (
PeriodandPeriodUnit) and the unified expiration date parameter (ExpectedRenewDay) cannot be set at the same time.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ecs:DescribeRenewalPrice |
get |
DedicatedHost
Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the instance. You can call DescribeRegions to query the most recent region list. |
cn-hangzhou |
| ResourceType |
string |
No |
The type of the resource whose renewal price you want to query. Valid values: instance. Default value: instance. |
instance |
| ResourceId |
string |
Yes |
The ID of the resource whose renewal price you want to query. When |
i-bp1f2o4ldh8l29zv**** |
| Period |
integer |
No |
The renewal duration. Valid values:
Default value: 1. Note
The renewal duration parameters ( |
1 |
| PriceUnit |
string |
No |
The unit of the renewal duration. Valid values:
Default value: Month. |
Month |
| ExpectedRenewDay |
integer |
No |
The unified expiration date. After you specify this parameter, the price for renewing the instance to the unified expiration date is returned. Valid values: 1 to 28. For more information about the unified expiration date feature, see Settings for instance expires. Note
The renewal duration parameters ( |
5 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| PriceInfo |
object |
The price information, including the price and discount rule details. |
|
| Rules |
object |
||
| Rule |
array<object> |
Activity rules. |
|
|
object |
|||
| Description |
string |
Description of the activity rule. |
买满1年,立享官网价格8.5折优惠。 |
| RuleId |
integer |
Activity ID. |
1234567890 |
| Price |
object |
The price. |
|
| OriginalPrice |
number |
Original price. |
4368 |
| DiscountPrice |
number |
Discounted price. |
655.2 |
| Currency |
string |
Currency unit. China site (aliyun.com): CNY. International site (alibabacloud.com): USD. |
CNY |
| TradePrice |
number |
Final price, calculated as the original price minus discounts. |
3712.8 |
| DetailInfos |
object |
||
| DetailInfo |
array<object> |
Resource pricing details. |
|
|
array<object> |
|||
| Resource |
string |
Name of the resource corresponding to the price. |
instance |
| OriginalPrice |
number |
Original price. |
4368 |
| DiscountPrice |
number |
Discounted price. |
655.2 |
| TradePrice |
number |
Transaction price. |
3712.8 |
| SubRules |
object |
||
| Rule |
array<object> |
Subset of pricing rules. |
|
|
object |
|||
| Description |
string |
Description of the pricing rule. |
买满1年,立享官网价格8.5折优惠。 |
| RuleId |
integer |
Pricing rule ID. |
1234567890 |
| RelatedPrice |
object |
||
| MarketplaceImagePrice |
object |
||
| Currency |
string |
CNY |
|
| OriginalPrice |
number |
200 |
|
| DiscountPrice |
number |
0 |
|
| TradePrice |
number |
200 |
Examples
Success response
JSON format
{
"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
}
}
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidResourceType.ValueNotSupported | The specified parameter ResourceType is not valid. | The specified resource type is not supported. |
| 400 | InvalidPeriod | The specified period is not valid. | The specified period is invalid. |
| 400 | InvalidPriceUnit.ValueNotSupported | The specified parameter PriceUnit is not valid. | The specified PriceUnit parameter is invalid. |
| 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. | An internal error has occurred. Try again later. |
| 400 | InvalidPeriod.ExceededMaximumExpirationDate | The specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt. | The specified renewal period exceeds the maximum allowed value. We recommend that you shorten the renewal period at your 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. | The expiration date of the instance is later than that of the dedicated host. |
| 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. | An internal error has occurred. Try again later. |
| 403 | ChargeTypeViolation | The operation is not permitted due to charge type of the instance. | |
| 403 | InvalidAction.Unauthorized | The specified action is not valid. | The specified operation is invalid. |
| 404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified instanceId is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.