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 the price for renewing an instance to a unified expiration date is supported.
- Precautions for parameter settings:
If only the required parameters are set, the price for renewing the instance for one month is queried by default.
You cannot query the renewal duration price and the renewal-to-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 for which to query the renewal price. Valid values: instance. Default value: instance. |
instance |
| ResourceId |
string |
Yes |
The ID of the resource for which to query the renewal price. 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. If you specify this parameter, the price for renewing the instance to the unified expiration date is queried. Valid values: 1 to 28. For more information about the unified expiration date feature, see Unified instance expiration date. 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> |
The promotion rule. |
|
|
object |
|||
| Description |
string |
The description of the promotion rule. |
Get a 15% discount off the list price for a one-year subscription |
| RuleId |
integer |
The ID of the promotion. |
1234567890 |
| Price |
object |
The price. |
|
| OriginalPrice |
number |
The original price. |
4368 |
| DiscountPrice |
number |
The discount. |
655.2 |
| Currency |
string |
The currency unit. China site: CNY. International site: USD. |
CNY |
| TradePrice |
number |
The transaction price, which is equal to the original price minus the discount. |
3712.8 |
| DetailInfos |
object |
||
| DetailInfo |
array<object> |
The pricing details of the resource. |
|
|
array<object> |
|||
| Resource |
string |
The name of the resource that corresponds to the price. |
instance |
| OriginalPrice |
number |
The original price. |
4368 |
| DiscountPrice |
number |
The discount price. |
655.2 |
| TradePrice |
number |
The transaction price. |
3712.8 |
| SubRules |
object |
||
| Rule |
array<object> |
The subset of pricing rules. |
|
|
object |
|||
| Description |
string |
The description of the pricing rule. |
Get a 15% discount off the list price for a one-year subscription |
| RuleId |
integer |
The ID of the pricing rule. |
1234567890 |
| RelatedPrice |
object |
The related price. |
|
| MarketplaceImagePrice |
object |
The Alibaba Cloud Marketplace image price. |
|
| Currency |
string |
The currency unit. China site: CNY. International site: USD. |
CNY |
| OriginalPrice |
number |
The original price. |
200 |
| DiscountPrice |
number |
The discount. |
0 |
| TradePrice |
number |
The transaction price, which is equal to the original price minus the discount. |
200 |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"PriceInfo": {
"Rules": {
"Rule": [
{
"Description": "Get a 15% discount off the list price for a one-year subscription",
"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": "Get a 15% discount off the list price for a one-year subscription",
"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. | The request is throttled. |
| 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 | |
| 400 | InvalidOperation.ClassicNetworkTypeNotSupported | The classic network instance does not support this operation. | Sorry, the instance you renewed based on the classic network architecture cannot be renewed. You need to migrate to a VPC for normal renewal. |
| 400 | LastOrderProcessing | The previous order is still processing, please try again later. | The order is being processed. Try again later. |
| 400 | InvalidParam.ExpectedRenewDay | The specified parameter ExpectedRenewDay is not valid. | The specified parameter ExpectedRenewDay is not valid. |
| 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. |
| 403 | InvalidStatus.DiskNotReady | This specified disk is not ready, status needs to be either In_use or Available. | The status of the specified disk must be In_use or Available. |
| 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.