全部產品
Search
文件中心

Elastic Compute Service:RenewElasticityAssurances

更新時間:Jul 08, 2026

對一個或多個已購買的彈性保障服務進行續費。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

ecs:RenewElasticityAssurances

create

*ElasticityAssurance

acs:ecs:{#regionId}:{#accountId}:elasticityassurance/{#ElasticityAssuranceId}

請求參數

名稱

類型

必填

描述

樣本值

RegionId

string

彈性保障服務所屬地域 ID。

您可以呼叫 DescribeRegions 查看最新的阿里雲地域清單。

cn-hangzhou

Period

integer

續費時長。時長單位由 PeriodUnit 參數決定。取值範圍:

  • PeriodUnit 參數值為 Weekly 時,該參數的取值:1、2、3。

  • PeriodUnit 參數值為 Month 時,該參數的取值:1、2、3、4、5、6、7、8、9。

  • PeriodUnit 參數值為 Year 時,該參數的取值:1、2、3、4、5。

預設值:1。

1

PeriodUnit

string

續費時長單位。取值範圍:

  • Weekly:週

  • Month:月

  • Year:年

預設值:Year。

Year

ClientToken

string

保證請求冪等性。從您的用戶端產生一個參數值,確保不同請求間該參數值唯一。

ClientToken 只支援 ASCII 字元,且不能超過 64 個字元。更多資訊,請參見如何保證冪等性

123e4567-e89b-12d3-a456-426655440000

AutoPay

boolean

是否自動支付。可能值:

  • true:是。

  • false:否。

預設值:true。

true

PrivatePoolOptions.Id

array

彈性保障服務 ID 清單。

限制:單次續費的彈性保障服務數量最多不超過 20 個。

您可以呼叫 DescribeElasticityAssurances 查看已購買的彈性保障服務。

string

彈性保障服務 ID。

eap-bp67acfmxazb4****

AutoRenew

boolean

是否自動續費。取值範圍:

  • true:自動續費。

  • false:不自動續費。

預設值:false。

true

AutoRenewPeriod

integer

自動續費的時長,單位:月。取值範圍:1、2、3、6、12、24、36。

  • PeriodUnit=Month 時,預設值為 1;

  • PeriodUnit=Year 時,預設值為 12。

說明

當參數 AutoRenew 取值為 true 時,該參數為必填。

1

返回參數

名稱

類型

描述

樣本值

object

RequestId

string

請求 ID。

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

OrderId

string

續費訂單 ID。

182372800****

PrivatePoolOptionsIdSet

object

PrivatePoolOptionsId

array

彈性保障服務 ID 清單。

string

彈性保障服務 ID。

eap-bp67acfmxazb4****

樣本

正常返回樣本

JSON格式

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "OrderId": "182372800****",
  "PrivatePoolOptionsIdSet": {
    "PrivatePoolOptionsId": [
      "eap-bp67acfmxazb4****"
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidPeriodUnit.ValueNotSupported The specified parameter PeriodUnit is not valid. 參數 PeriodUnit 無效。
400 InvalidChargeType.ValueNotSupported ChargeType is not valid.
400 MissingParameter.PrivatePoolOptions.Id The specified parameter PrivatePoolOptions.Id does not exist. 指定參數「PrivatePoolOptions.Id」不能為空。
400 InvalidParameter.PeriodUnit The specified PeriodUnit is invalid. 指定的PeriodUnit無效。
400 InvalidParameter.Period The specified parameter Period or PeriodUnit is invalid. 指定的Period或PeriodUnit參數不符合要求。
400 InvalidParameter.PrivatePoolOptionsId The specified parameter PrivatePoolOptions.Id is invalid. 指定參數 PrivatePoolOptions.Id 無效。
400 InvalidAutoRenewPeriod.ValueNotSupported The specified autoRenewPeriod is invalid. 指定的自動續費時長無效。
500 InternalError The request processing has failed due to some unknown error.
500 IncorrectPrivatePoolStatus The current status of the private pool does not support this operation.
500 InvalidPrivatePoolId.NotFound The specified private pool does not exist. 指定的私有池不存在。
403 InvalidParameter.ResourceOwnerAccount ResourceOwnerAccount is Invalid. 指定的 ResourceOwnerAccount 不合法。
403 Account.Arrearage Your account has been in arrears.
403 ChargeTypeViolation The operation is not permitted due to charge type of the instance.
403 InvalidOperation.PackageTypeUnsupported Not support to renew this type of resource package. 該類型資源包不支援續費。
403 OperationDenied.UtilizationTooLow The utilization of this ElasticityAssurance is below 20%, renewal is not allowed. Please improve the utilization and try again.

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

變更歷史

更多資訊,參考變更詳情