全部產品
Search
文件中心

Elastic Compute Service: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.
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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情