All Products
Search
Document Center

Elastic Compute Service:RenewInstance

Last Updated:Mar 19, 2024

Renews a subscription Elastic Compute Service (ECS) instance.

Operation description

  • Before you call this operation, make sure that you are familiar with the billing methods and pricing of ECS. For more information, see the Elastic Compute Service product page.
  • You can call this operation to renew a subscription instance for a specific period of time or to a synchronized expiration date.
  • You cannot call this operation to renew a subscription instance for a specific period of time and to a synchronized expiration date at the same time. The parameter pair (Period and PeriodUnit) that is related to the renewal period and ExpectedRenewDay are mutually exclusive.
  • Your account must have sufficient credits.

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
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

0c593ea1-3bea-11e9-b96b-88e9fe637760
InstanceIdstringYes

The ID of the instance that you want to renew.

i-bp67acfmxazb4p****
PeriodintegerNo

The renewal period of the subscription instance. If DedicatedHostId is specified, the value of Period cannot exceed the subscription period of the specified dedicated host.

Valid values when PeriodUnit is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, and 12.

Note The renewal period-related parameter pair (Period and PeriodUnit) and ExpectedRenewDay are mutually exclusive.
1
PeriodUnitstringNo

The unit of the renewal period. Valid values:

Month

Default value: Month.

Month
ExpectedRenewDayintegerNo

The synchronized expiration date. Set the value to a synchronized expiration date that you specified. Otherwise, the call fails. If you configure this parameter, your instance will be renewed to the specified synchronized expiration date. Valid values: 1 to 28.

For information about how to synchronize the expiration dates of instances, see Synchronize the expiration dates of subscription instances.

Note The renewal period-related parameter pair (Period and PeriodUnit) and ExpectedRenewDay are mutually exclusive.
5

Response parameters

ParameterTypeDescriptionExample
object
OrderIdstring

The order ID.

1234567890
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Examples

Sample success responses

JSONformat

{
  "OrderId": "1234567890",
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidInternetChargeType.ValueNotSupportedThe specified InternetChargeType is not valid.The specified InternetChargeType parameter is invalid.
400InvalidInstanceType.NotSupportedThe specified InstanceType is not Supported.The specified InstanceType parameter is invalid.
400InvalidParameterThe specified parameter "InternetMaxBandwidthOut" is not valid.-
400InvalidInstanceChargeType.NotFoundThe InstanceChargeType does not exist in our records.The specified instance billing method does not exist.
400InvalidRebootTime.MalformedThe specified RebootTime is not valid.The specified RebootTime parameter is invalid.
400InvalidRebootTime.ValueNotSupportedThe specified RebootTime is out of the permitted range.The specified restart time is invalid.
400IdempotenceParamNotMatchRequest uses a client token in a previous request but is not identical to that request.This request and the previous request contain the same client token but different other parameters.
400InvalidClientToken.ValueNotSupportedThe ClientToken provided is invalid.The specified ClientToken parameter is invalid.
400InvalidInstanceType.ValueNotSupportedThe specified InstanceType does not exist or beyond the permitted range.The specified instance type does not exist or you are not authorized to manage instances of this instance type.
400InvalidInstanceType.codeUnauthorizedThe specified InstanceType is not authorized.The specified InstanceType parameter is invalid.
400InvalidInternetChargeType.InstanceNotSupportedThe specified instance which is in vpc is not support the parameter InternetChargeType.The specified billing method for network usage is not supported by the specified instance of the VPC type.
400InvalidPeriodThe specified period is not valid.The specified period is invalid.
400MissingParamterThe specified parameter "Period" is not null.-
400Upgrade.NotSupportedUpgrade operation is not supported.The upgrade operation is invalid.
400OperationDeniedSpecified instance is in VPC.The instance resides in a VPC.
400InvalidInstanceType.ValueUnauthorizedThe specified InstanceType is not authorized.You are not authorized to use the specified instance type.
400InvalidParameterThe specified parameter " InternetMaxBandwidthOut " is not valid.-
400DependencyViolation.InstanceTypeCurrent instancetype cannot be changed to the specified one.The current instance type cannot be changed to the specified one.
400InvalidPeriodUnit.ValueNotSupportedThe specified parameter PeriodUnit is not valid.The specified PeriodUnit parameter is invalid.
400InvalidDedicatedHostId.NotFoundThe specified DedicatedHostId does not exist.-
400InvalidDedicatedHostStatus.NotSupportOperation denied due to dedicated host status.-
400IncorrectDedicatedHostStatusThe current status of the resource does not support this operation.The resource is in a state that does not support the current operation.
400InvalidPeriod.ExceededDedicatedHostInstance expired date can't exceed dedicated host expired date.-
400InvalidStatus.UpgradingThe instance is upgrading; please try again later.The instance is being upgraded. Try again later.
400InvalidPeriod.ExceededMaximumExpirationDateThe specified renewal period cannot exceed the maximum expiration date. We recommend you try shortening the renewal period at next attempt.The specified renewal period exceeds the maximum allowed value. We recommend that you shorten the renewal period at your next attempt.
400LastOrderProcessingThe previous order is still processing, please try again later.The order is being processed. Try again later.
400Idempotence.ProcessingThe previous request is still processing, please try again later.The request is being processed. Try again later.
400OperationDeniedThe current user does not support this operation.Your account does not support this operation.
400InvalidLoanOrderStatus.UncompletedAny unpaid order must be cancelled before you try this action again. The scheduled unpaid order is a loan order that cannot be auto cancelled. For more information, visit the loan management center.-
400OperationDenied.UnfinishedOrderThe current instance has unfinished refundOrder, this operation is denied.-
400InvalidPeriod.NotFoundThe specified period and expectedRenewDay cannot both be empty.-
400InvalidExpectedRenewDay.StarterPackageNotSupportedThe specified starterPackage cannot support renew with expectedRenewDay.-
400InvalidParam.ExpectedRenewDayThe specified param ExpectedRenewDay is not valid.-
400QuotaExceed.AlignInstanceThe maximum number of align operations is exceeded.-
400InvalidExpectedRenewDay.ConflictThe specified expectedRenewDay is in conflict with period.-
400InvalidExpectedRenewDay.ConflictThe specified expectedRenewDay is in conflict with periodUnit.-
400InvalidExpectedRenewDay.ValueNotSupportedThe specified parameter ExpectedRenewDay is not valid.-
400OperationDenied.AbnormalInstanceInfoThe current renewable operation is not supported due to abnormal information of the instance, please submit ticket to process.-
403ChargeTypeViolationThe operation is not permitted due to charge type of the instance.The operation is not supported while the instance is using the current billing method.
403Diskcategory.MismatchThe disk specified to convert to portable is not allowed due to the disk category does not support.The specified disk cannot be converted to a removable disk due to disk category constraints.
403IncorrectInstanceStatusThe current status of the resource does not support this operation.The resource is in a state that does not support the current operation.
403InstanceSpecModification.NotEffectiveThe specified instance has been reserved for making a spec modification and not taken effective in the current contract period.The specified instance is retained due to the instance type change. The instance type change cannot take effect during the current contract period.
403LastTokenProcessingThe last token request is processing.A token request is being processed. Try again later.
403Instance.UnPaidOrderThe specified instance has unpaid order.Your account has unpaid orders for the instance.
403InstanceLockedForSecurityThe specified operation is denied as your instance is locked for security reasons.-
403InvalidDisk.NotAllowedThe specified disk is not allowed to be converted to portable.The specified disk cannot be converted to a removable disk.
403InstanceTypeNotSupportedThe specified zone does not offer the specified instancetype.The specified instance type is not supported in the specified zone.
403InvalidChargeType.NotSupportedThe chargeType of the instance does not support this operation.The operation is not supported while the instance is using the current billing method.
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 sold out in the specified zone. Try another instance type or zone.
403OperationDenied.ImageNotValidThe specified image is not authorized.You are not authorized to use this image.
403OperationDenied.NoStockThe resource is out of usage.The instance is not in the Running state. Start the instance or check whether the specified operation is valid.
403InvalidPeriod.StarterPackageThis instance was created by using a Starter Package plan and can only be renewed monthly, not yearly.The instance was created in a Starter Package plan and can only be automatically renewed on a monthly basis.
403RenewDateNotSupported.StarterPackageThis instance was created by using a Starter Package plan and can only be renewed three days before it expires.-
404InvalidDiskId.NotFoundThe specified disk does not exist.The specified disk does not exist. Check whether the disk ID is correct.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.
500InternalErrorThe request processing has failed due to some unknown error.An internal error has occurred. Try again later.

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

Change history

Change timeSummary of changesOperation
2022-08-24The 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