All Products
Search
Document Center

Elastic Compute Service:DescribeRenewalPrice

Last Updated:Mar 19, 2024

Queries the renewal price of a subscription Elastic Compute Service (ECS) resource. Only the renewal prices of subscription resources can be queried.

Operation description

  • You can call this operation to query the price for renewing a subscription instance for a specific period of time or to a synchronized expiration date.

  • Take note of the following items:

    • If you specify only the required parameters, the price for renewing an instance for one month is queried by default.
    • The renewal period-related parameter pair (Period and PeriodUnit) and the synchronized expiration date-related parameter (ExpectedRenewDay) are mutually exclusive. You cannot set these parameters together to query the prices for renewing a specified instance for a period of time and to a synchronized expiration date at the same time.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The region ID of the instance. You can call the DescribeRegions operation to query the most recent list of regions.

cn-hangzhou
ResourceTypestringNo

The type of the resource. Set the value to instance.

Default value: instance.

instance
ResourceIdstringYes

The ID of the resource. If the ResourceType parameter is set to instance, the value of the ResourceId parameter is the ID of the specified instance.``

i-bp1f2o4ldh8l29zv****
PeriodintegerNo

The renewal period. Valid values:

  • Valid values when the PriceUnit parameter is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
  • Valid values when the PriceUnit parameter is set to Year: 1, 2, 3.

Default value: 1.

Note The renewal period-related parameter pair (Period and PeriodUnit) and the ExpectedRenewDay parameter are mutually exclusive.
1
PriceUnitstringNo

The unit of the renewal period. Valid values:

  • Month
  • Year

Default value: Month.

Month
ExpectedRenewDayintegerNo

The synchronized expiration date. If you specify this parameter, the price for renewing a specified instance to the specified synchronized expiration date is queried. Valid values: 1 to 28.

For information about how to synchronize the expiration dates of instances, see Synchronize the expiration dates of instances.

Note The renewal period-related parameter pair (Period and PeriodUnit) and the ExpectedRenewDay parameter are mutually exclusive.
5

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****
PriceInfoobject

Details about the prices and promotion rules.

Rulesobject []

Details about the promotion rules.

Descriptionstring

The description of the promotion rule.

Receive a 15% discount on a 1-year subscription
RuleIdlong

The ID of the promotion rule.

1234567890
Priceobject

The price.

OriginalPricefloat

The original price.

4368
DiscountPricefloat

The discount.

655.2
Currencystring

The currency unit.

Alibaba Cloud China site (aliyun.com): CNY.

Alibaba Cloud International site (alibabacloud.com): USD.

CNY
TradePricefloat

The transaction price, which is equal to the original price minus the discount.

3712.8
DetailInfosobject []

Details about the resource prices.

Resourcestring

The name of the resource that corresponds to the price.

instance
OriginalPricefloat

The original price.

4368
DiscountPricefloat

The discount.

655.2
TradePricefloat

The transaction price.

3712.8
SubRulesobject []

Details about the pricing rules.

Descriptionstring

The description of the pricing rule.

Receive a 15% discount on a 1-year subscription.
RuleIdlong

The ID of the pricing rule.

1234567890

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
  "PriceInfo": {
    "Rules": {
      "Rule": [
        {
          "Description": "Receive a 15% discount on a 1-year subscription\n",
          "RuleId": 1234567890
        }
      ]
    },
    "Price": {
      "OriginalPrice": 4368,
      "DiscountPrice": 655.2,
      "Currency": "CNY",
      "TradePrice": 3712.8,
      "DetailInfos": {
        "ResourcePriceModel": [
          {
            "Resource": "instance",
            "OriginalPrice": 4368,
            "DiscountPrice": 655.2,
            "TradePrice": 3712.8,
            "SubRules": {
              "Rule": [
                {
                  "Description": "Receive a 15% discount on a 1-year subscription.\n",
                  "RuleId": 1234567890
                }
              ]
            }
          }
        ]
      }
    }
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidResourceType.ValueNotSupportedThe specified parameter ResourceType is not valid.The specified resource type is not supported.
400InvalidPeriodThe specified period is not valid.The specified period is invalid.
400InvalidPriceUnit.ValueNotSupportedThe specified parameter PriceUnit is not valid.The specified PriceUnit is invalid.
400ThrottlingRequest was denied due to request throttling.-
400Throttling.UserRequest was denied due to user flow control.-
400InternalErrorThe request processing has failed due to some unknown error.An internal error has occurred. Try again later.
400InvalidExpectedRenewDay.ConflictThe specified expectedRenewDay is in conflict with period.-
400InvalidExpectedRenewDay.ConflictThe specified expectedRenewDay is in conflict with priceUnit.-
400InvalidExpectedRenewDay.ValueNotSupportedThe specified parameter ExpectedRenewDay is not valid.-
403ChargeTypeViolationThe operation is not permitted due to charge type of the instance.The operation is not supported while the instance is using the current billing method.
403InvalidAction.UnauthorizedThe specified action is not valid.The specified operation is invalid.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.
500InternalError%sAn internal error has occurred.
500InternalErrorThe request processing has failed due to some unknown error, exception or failure.An internal error has occurred. Try again later.

For a list of error codes, visit the Service error codes.