閱讀836 返回首頁    go windows


續費實例__實例相關接口_API 參考_雲服務器 ECS-阿裏雲

描述

  • 該API隻對包月ECS實例生效,否則則報錯。

  • 若實例付費類型為預付費的包年包月實例(PrePaid),則在執行付款時默認會使用該賬號下可用的優惠券(0折賬號除外)。

  • 該API要求用戶必須支持賬號的餘額支付或信用支付。

請求參數

名稱 類型 是否必須 描述
Action String 係統規定參數,取值:RenewInstance。
InstanceId String 指定的需要實例規格的實例ID。
Period Integer 預付費續費時長,單位是月。
取值範圍為:
  • 1 - 9
  • 12
  • 24
  • 36

返回參數

全是公共返回參數,詳見公共返回參數

錯誤碼

錯誤代碼 描述 Http狀態碼 語義
InvalidInstanceId.NotFound The InstanceId provided does not exist in our records. 404 指定的InstanceId不存在。
MissingParameter The input parameter “InstanceId” that is mandatory for processing this request is not supplied. 400 缺少InstanceId值。
OperationRestricted.Renewal The renewal of the instance is restricted. 400 實例所在的物理機因即將進行維護遷移,實例續費受到限製。
IncorrectInstanceStatus The current status of the resource does not support this operation. 403 該資源目前的狀態不支持此操作。
InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons. 403 該資源目前被安全鎖定被拒絕操作。
InternalError The request processing has failed due to some unknown error. 500 內部錯誤。
ChargeTypeViolation The operation is not permitted due to charge type of the instance. 403 付費方式不支持這個操作。
OperationDenied The resource is out of usage. 403 庫存不足
InvalidPeriod The specified period is not valid 400 指定的 period 參數格式不合法(不是數字或超出範圍)。
Instance.UnPaidOrder The specified instance has unpaid order 403 該實例下還有未付費的訂單。
LastTokenProcessing The last token request is processing 403 上一次請求還在處理中。
InvalidInstanceChargeType.NotFound The InstanceChargeType is not support for this user 404 該賬戶的支付方式不支持包年包月續費。

示例

請求示例

  1. https://ecs.aliyuncs.com/?Action=RenewInstance
  2. &InstanceId=i-instance1
  3. &Period=1
  4. &<公共請求參數>

返回示例

XML格式

  1. <ModifyInstanceSpecResponse>
  2. <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
  3. </ModifyInstanceSpecResponse>

JSON格式

  1. {
  2. "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
  3. }

最後更新:2016-12-19 11:15:28

  上一篇:go 修改實例管理終端口令__實例相關接口_API 參考_雲服務器 ECS-阿裏雲
  下一篇:go 設置實例自動釋放時間__實例相關接口_API 參考_雲服務器 ECS-阿裏雲