All Products
Search
Document Center

Elastic Compute Service:ModifyReservedInstances

Last Updated:Mar 13, 2024

Splits, merges, or modifies reserved instances. You call this operation to modify the names and zones of reserved instances or change their instance types within the same instance family.

Operation description

The region ID of the reserved instance.

You can call the DescribeRegions operation to query the most recent list of regions.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The IDs of reserved instances. Valid values of N: 1 to 20.

cn-hangzhou
ReservedInstanceIdarrayYes

The IDs of reserved instances. Valid values of N: 1 to 20.

stringYes

The configurations of reserved instances.

ecsri-bp15xx2****
Configurationobject []No

The configurations of reserved instance N.

ReservedInstanceNamestringNo

The zone ID of reserved instance N. Valid values of N: 1 to 100.

This parameter is required when Scope is set to Zone.

You can call the DescribeZones operation to query the most recent zone list.

testReservedInstanceName
ZoneIdstringNo

The scope of reserved instance N. Valid values:

  • Region
  • Zone

Valid values of N: 1 to 100.

Default value: Region.

cn-hangzhou-i
ScopestringYes

The instance type that reserved instance N can match. Valid values of N: 1 to 100.

Note The supported instance types are regularly updated. For more information, see the "Attributes" section of Overview .
Zone
InstanceTypestringYes

The number of pay-as-you-go instances of the same instance type that the reserved instance can match. The value of this parameter must be greater than or equal to 1. Valid values of N: 1 to 100.

ecs.c5.4xlarge
InstanceAmountintegerYes

The ID of the request.

1

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

Details about the reserved instance.

ED9E4A5F-FF4D-4C96-BE80-6B4227060DD7
ReservedInstanceIdSetsarray

The ID of the reserved instance.

string
{"ReservedInstanceId":"ecsri-bp1cx3****","ecsri-bp15xx2****"]}

Examples

Sample success responses

JSONformat

{
  "RequestId": "ED9E4A5F-FF4D-4C96-BE80-6B4227060DD7",
  "ReservedInstanceIdSets": {
    "ReservedInstanceId": [
      "{\"ReservedInstanceId\":\"ecsri-bp1cx3****\",\"ecsri-bp15xx2****\"]}"
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidInstanceType.ValueUnauthorizedThe specified InstanceType is not authorized.You are not authorized to use the specified instance type.
400InvalidParameter.ConflictThe specified region and cluster do not match.The specified region and cluster do not correspond to each other.
400InvalidTagKey.MalformedThe specified Tag.n.Key is not valid.The specified Tag.N.Key parameter is invalid.
400RegionUnauthorized%s-
400Zone.NotOnSale%sThe requested resources are unavailable in the specified zone. %s is a variable. An error message is dynamically returned based on call conditions.
400InvalidPeriodUnit.ValueNotSupportedThe specified parameter PeriodUnit is not valid.The specified PeriodUnit parameter is invalid.
400InvalidTagValue.MalformedThe specified Tag.n.Value is not valid.The specified tag value is invalid.
400InvalidChargeType.ValueNotSupportedChargeType is not valid.This billing method is not supported. Select another billing method.
400OperationDeniedThe specified InstanceType or Zone is not authorized for current user.-
403OperationDenied.NoStockThe requested resource is sold out in the specified zone; try other types of resources or other regions and zones.The requested resources are insufficient.
403OperationDeniedSales of this resource are temporarily suspended in the specified region; please try again later.The requested resource is unavailable in the specified region. Try again later.
403NodeControllerUnavailableThe Node Controller is temporarily unavailable.The node controller is unavailable.
403OperationDeniedThe resource is out of usage.The instance is not in the Running state. Start the instance or check whether the specified operation is valid.
403InvalidParameter.ResourceOwnerAccountResourceOwnerAccount is Invalid.The specified ResourceOwnerAccount parameter is invalid.
403Zone.NotOpenThe specified zone is not granted to you to buy resources yet.You are not authorized to purchase resources in the specified zone.
403Zone.NotOnSaleThe specified zone is not available for purchase.The requested resources are unavailable in the specified zone. Try a different instance type or select a different region or zone.
403InvalidResourceType.NotSupported%s-
403InvalidParameter.NotMatch%sA specified parameter is invalid. Check whether parameter conflicts exist.
403Account.ArrearageYour account has been in arrears.Your account does not have enough balance. Please add funds to your account.
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 field value is illegal
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.The resource is in a state that does not support the current 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.The reserved instance name cannot be separately modified.
403InvalidReservedInstanceId.NotFoundThe specified parameter ReservedInstanceId is invalid.-
404InvalidZoneId.NotFoundThe ZoneId provided does not exist in our records.The specified zone ID does not exist.
404InvalidZoneId.NotFoundThe specified ZoneId does not exist.The specified zone ID does not exist.
500InternalErrorThe request processing has failed due to some unknown error.An internal error has occurred. Try again later.
500InternalError%sAn internal error has occurred.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-28API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 403
    delete Error Codes: 404
    delete Error Codes: 500
2023-05-09The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 400 change
    Error Codes 403 change
    delete Error Codes: 404
    delete Error Codes: 500