全部产品
Search
文档中心

云服务器 ECS:DescribeRenewalPrice - 查询资源续费价格

更新时间:Jun 18, 2026

查询云服务器ECS资源的续费价格。仅支持查询包年包月资源的续费价格。

接口说明

  • 仅支持查询包年包月 ECS 实例续费时长的价格或者续费至统一到期日的价格。

  • 参数设置的注意事项如下:
    • 只设置必选参数时,默认查询实例续费时长 1 个月的价格信息。

    • 不支持同时查询续费时长价格和续费至统一到期日的价格,即续费时长参数(PeriodPeriodUnit)与续费至统一到期日参数(ExpectedRenewDay)不能同时设置。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

ecs:DescribeRenewalPrice

get

DedicatedHost

acs:ecs:{#regionId}:{#accountId}:ddh/{#ddhId}

Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

请求参数

名称

类型

必填

描述

示例值

RegionId

string

实例所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。

cn-hangzhou

ResourceType

string

查询续费价格的资源类型。取值:instance。

默认值:instance。

instance

ResourceId

string

查询续费价格的资源 ID。参数ResourceType取值为instance时,ResourceId可以理解为InstanceId

i-bp1f2o4ldh8l29zv****

Period

integer

指定续费时长。取值范围:

  • 当参数PriceUnit取值为Month时:1~9。

  • 当参数PriceUnit取值为Year时:1~3。

默认值:1。

说明

续费时长参数(PeriodPeriodUnit)与统一到期日参数(ExpectedRenewDay)不能同时设置。

1

PriceUnit

string

指定续费周期。取值范围:

  • Month:续费周期为一个月。

  • Year:续费周期为一年。

默认值:Month。

Month

ExpectedRenewDay

integer

统一到期日。指定该参数后,将查询实例续费至统一到期日的价格信息。取值范围:1~28。

关于统一到期日功能的更多信息,请参见统一实例到期日

说明

续费时长参数(PeriodPeriodUnit)与统一到期日参数(ExpectedRenewDay)不能同时设置。

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. 指定的PriceUnit参数无效。
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. 指定的实例ID无效。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情