阅读836 返回首页    go 微信


续费实例__实例相关接口_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-阿里云