赛尔校园公共服务平台 Logo
平台使用
阿里云
百度云
移动云
智算服务
教育生态
登录 →
赛尔校园公共服务平台 Logo
平台使用 阿里云 百度云 移动云 智算服务 教育生态
登录
  1. 首页
  2. 阿里云
  3. 云服务器 ECS
  4. 开发参考
  5. API参考(ECS)
  6. API目录
  7. 预留实例券
  8. RenewReservedInstances - 续费预留实例券

RenewReservedInstances - 续费预留实例券

  • 预留实例券
  • 发布于 2025-04-01
  • 0 次阅读
文档编辑
文档编辑

本接口用于对一张或多张预留实例券进行续费,支持您在续费时设置购买时长和自动续费属性。

接口说明

请确保在使用该接口前,已充分了解预留实例券的收费方式和价格。

  • 预留实例券支持手动续费和自动续费两种续费方式,详细信息请参见预留实例券续费说明。
  • 您可以调用 DescribeReservedInstances 查询已购买的预留实例券。
  • 该接口支持开启自动续费,但不支持取消自动续费,您可以通过 ModifyReservedInstanceAutoRenewAttribute 取消自动续费。

调试

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

调试

授权信息

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

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
ecs:RenewReservedInstancescreate
*ReservedInstance
acs:ecs:{#regionId}:{#accountId}:reservedinstance/{#ReservedInstanceId}
    无
无

请求参数

名称类型必填描述示例值
ReservedInstanceIdarray否

预留实例券 ID。

string否

预留实例券 ID。您可以调用 DescribeReservedInstances 查看已购买的预留实例券。

单次续费的预留实例券数量最多不超过 10 个。

ecsri-2ze53qonjqxg7r****
RegionIdstring否

预留实例券所属的地域 ID。

您可以调用 DescribeRegions 获取最新的阿里云地域列表。

cn-hangzhou
Periodinteger否

购买预留实例券的时长。

  • 当PeriodUnit为Year时,取值范围:1、3、5。

  • 当PeriodUnit为Month时,取值范围:1。

默认值:1。

1
PeriodUnitstring否

购买预留实例券的时长单位。

取值范围:Year、Month。

默认值:Month。

Year
ClientTokenstring否

保证请求幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。更多信息,请参见如何保证幂等性。

123e4567-e89b-12d3-a456-426655440000
AutoRenewboolean否

是否要自动续费。

  • true:自动续费。
  • false:不自动续费。

默认值:false。

true
AutoRenewPeriodinteger否

每次自动续费的时长,单位为月。当参数 AutoRenew 取值为 true 时,该参数才生效。

  • PeriodUnit=Month, 取值范围:1,12,36,60。默认值为 1。

  • PeriodUnit=Year,取值范围:12,36,60。默认值为 12。

1

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

8C314443-AF0D-4766-9562-C83B7F1****
ReservedInstanceIdSetsarray

预留实例券 ID 列表。

ReservedInstanceIdstring

预留实例券 ID。

ecsri-2ze53qonjqxg7r****
OrderIdstring

订单 ID。

2023912123****

示例

正常返回示例

JSON格式

{
  "RequestId": "8C314443-AF0D-4766-9562-C83B7F1****",
  "ReservedInstanceIdSets": {
    "ReservedInstanceId": [
      "ecsri-2ze53qonjqxg7r****"
    ]
  },
  "OrderId": "2023912123****"
}

错误码

HTTP status code错误码错误信息描述
400InvalidInstanceType.ValueUnauthorizedThe specified InstanceType is not authorized.指定的实例规格未授权使用。
400InvalidParameter.ConflictThe specified region and cluster do not match.指定的地域与指定的集群不匹配。
400InvalidTagKey.MalformedThe specified Tag.n.Key is not valid.指定的标签键参数有误。
400InvalidPeriodUnit.ValueNotSupportedThe specified parameter PeriodUnit is not valid.参数 PeriodUnit 无效。
400InvalidTagValue.MalformedThe specified Tag.n.Value is not valid.指定的标签值参数有误。
400InvalidChargeType.ValueNotSupportedChargeType is not valid.该计费方式不支持,请您重新选择计费方式。
400OperationDeniedThe specified InstanceType or Zone is not authorized for current user.-
400InvalidPeriodThe specified Period or PeriodUnit is not correct.-
400MissingParameter.ReservedInstanceIdsThe specified ReservedInstanceIds does not exist.-
400InvalidParameter.PeriodUnitThe specified PeriodUnit is invalid.指定的PeriodUnit无效
400InvalidParameter.PeriodThe specified Period is invalid.-
400InvalidParameter.ReservedInstanceIdsThe specified ReservedInstanceIds is invalid.-
400InvalidPeriod.ExceededMaximumExpirationThe specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt.-
403OperationDenied.NoStockThe requested resource is sold out in the specified zone; try other types of resources or other regions and zones.库存不足。
403OperationDeniedSales of this resource are temporarily suspended in the specified region; please try again later.指定的地域暂时关闭了此资源的售卖,请稍后重试。
403NodeControllerUnavailableThe Node Controller is temporarily unavailable.节点控制器暂不可用。
403OperationDeniedThe resource is out of usage.资源库存不足。
403InvalidParameter.ResourceOwnerAccountResourceOwnerAccount is Invalid.指定的 ResourceOwnerAccount 不合法。
403Zone.NotOpenThe specified zone is not granted to you to buy resources yet.用户未被授权购买指定的可用区的资源。
403Zone.NotOnSaleThe specified zone is not available for purchase.指定可用区已经售罄,请您更换实例规格或者更换地域创建。
403Account.ArrearageYour account has been in arrears.账户余额不足,请先充值再操作。
403InvalidReservedInstanceName.MalformedThe specified parameter ReservedInstanceName is invalid.-
403InvalidParameter.ScopeThe specified parameter 'Scope' is invalid.-
403InvalidReservedInstanceStatus.ValueNotSupportedReservedInstance status is not supported.-
403InvalidReservedInstanceOfferingType.ValueNotSupportedThe OfferingType is not supported.-
403InvalidReservedInstanceOfferingClass.ValueNotSupportedThe OfferingClass is not supported.-
403MissingParameter.ZoneIdThe specified zoneId should be not empty.-
403MissingParameter.InstanceTypeThe instanceType should be not empty.-
403MissingParameter.ReservedInstanceIdThe ids of reservedInstance can not be empty.-
403MissingParameter.ReservedInstanceConfigurationThe configurations of reservedInstance can not be empty.-
403InvalidParameter.SplitOrMergeThe Many-to-many of modification is not supported.-
403MissingParameter.InstanceTypeAndAmountBothEmptyThe instanceType and amount can not be both empty.-
403InvalidReservedInstancePlatform.ValueNotSupportedThe Platform is not supported.-
403InvalidParameter.ReservedInstanceNameThe reservedInstanceName is invalid.reservedInstanceName字段值不合法
403InvalidReservedInstanceZone.ValueNotSupportedThe zoneId is not exist.-
403InvalidParameter.ValueNotSupportedThe instanceTypeFamily of the instance to be changed must be consistent.-
403InvalidParameter.ValueNotSupportedThe expiration time of the instance to be changed must be consistent.-
403InvalidParameter.ValueNotSupportedThe factor of instanceType is not equal.-
403InvalidParameter.ValueNotSupportedThe offeringClass of instance is not same.-
403InvalidParameter.ValueNotSupportedThe offeringType of instance is not same.-
403IncorrectInstanceStatusThe status of specified reservedInstance must be active.预留实例券状态不正确导致续费失败
403IncorrectInstanceStatusThe current status of the resource does not support this operation.该资源目前的状态不支持此操作。
403InvalidPlatform.ValueNotSupportedThe platform of reservedInstance is invalid.-
403InvalidScope.ValueNotSupportedThe scope of reservedInstance is invalid, The valid value is Zone or Region.-
403InvalidConfiguration.ValueNotSupportedThe modification Configuration should not be empty.-
403InvalidZoneId.ValueNotSupportedThe specified zoneId should be same.-
403InvalidParameterThe parameter is invalid.Please check it.-
403InvalidInstanceAmount.ValueNotSupportedThe instanceAmount is invalid.-
403OperationDenied.OnlyModifyNameIt is not allowed to modify the ReservedInstanceName only.不允许只修改预留实例券的名称。
403InvalidReservedInstanceId.NotFoundThe specified parameter ReservedInstanceId is invalid.-
403ChargeTypeViolationThe operation is not permitted due to charge type of the instance.付费方式不支持该操作,请您检查实例的付费类型是否与该操作冲突。
404InvalidZoneId.NotFoundThe ZoneId provided does not exist in our records.指定的可用区 ID 不存在。
404InvalidZoneId.NotFoundThe specified ZoneId does not exist.指定的可用区 ID 不存在。
500InternalErrorThe request processing has failed due to some unknown error.内部错误,请重试。

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

变更历史

变更时间变更内容概要操作
2024-12-26OpenAPI 描述信息更新、OpenAPI 错误码发生变更查看变更详情
2022-11-02OpenAPI 错误码发生变更、OpenAPI 入参发生变更查看变更详情
2022-08-12新增 OpenAPI查看变更详情
相关文章

DescribeReservedInstanceAutoRenewAttribute - 查询预留实例券自动续费属性 2025-04-01 11:58

本接口用于查询一个或多个预留实例券自动续费属性,包括自动续费时长和自动续费状态。

DescribeReservedInstances - 查询预留实例券详细信息列表 2025-04-01 11:58

本接口主要用于查询指定地域下您已经购买的预留实例券信息列表,支持您根据标签、预留实例券属性等参数获取预留实例券详细信息列表。

ModifyReservedInstanceAttribute - 修改预留实例券属性 2025-04-01 11:58

本接口用于修改一张预留实例券的属性信息,包括名称和描述。

ModifyReservedInstanceAutoRenewAttribute - 修改预留实例券自动续费属性 2025-04-01 11:58

本接口主要用于修改一个或多个预留实例券的自动续费属性,支持您取消或者关闭自动续费。

ModifyReservedInstances - 修改预留实例券配置 2025-04-01 11:58

本接口的主要功能是通过修改实例规格、数量、可用区等预留实例券的配置来对预留实例券进行拆分、合并或范围变更操作。

PurchaseReservedInstancesOffering - 购买预留实例券 2025-04-01 11:58

本接口用于购买一张预留实例券,支持您购买一张地域级或者可用区级的预留实例券来抵扣对应规格的按量付费实例账单。

目录
Copyright © 2025 your company All Rights Reserved. Powered by 赛尔网络.
京ICP备14022346号-15
gongan beian 京公网安备11010802041014号