Reactivates a pay-as-you-go instance for which you have overdue payments

Description

When you call this operation, take note of the following points:

  • The instance must be in the Stopped state.

  • Instances that are stopped due to overdue payments are released after 15 days, and data on the instance can no longer be recovered. To avoid this, complete any outstanding payments and reactivate the instance within 15 days. If you cannot reactivate a VPC-type instance, wait a few minutes and try again.

  • After the operation is called, the instance enters the Starting state.
  • You cannot call this operation on ECS instances that are locked for security reasons. An instance is locked for security reasons if OperationLocks in the response returned when you query information of the instance contains "LockReason": "security". For more information, see API behavior when an instance is locked for security reasons.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesReActivateInstances

The operation that you want to perform. Set the value to ReActivateInstances.

RegionIdStringNocn-hangzhou

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

InstanceIdStringYesi-bp67acfmxazb4p****

The ID of the instance that you want to reactivate.

Response parameters

ParameterTypeExampleDescription
RequestIdString51AB7717-6E1A-4D1D-A44D-54CB123ABC

The ID of the request.

Examples

Sample requests

http(s)://ecs.aliyuncs.com/?Action=ReActivateInstances
&RegionId=cn-hangzhou
&InstanceId=i-bp67acfmxazb4p****
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ReActivateInstancesResponse>
    <RequestId>51AB7717-6E1A-4D1D-A44D-54CB123ABC</RequestId>
</ReActivateInstancesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "51AB7717-6E1A-4D1D-A44D-54CB123ABC"
}

Error codes

HttpCodeError codeError messageDescription
400ReopenInstance.InstanceStatusNotValidInstance status is not Expired, ImageExpired or EcsAndImageExpired.The error message returned because the instance or the image has not expired and the instance fails to be reactivated.
500InternalErrorThe request processing has failed due to some unknown error.The error message returned because an internal error has occurred. Try again later.
403IncorrectInstanceStatusThe current status of the resource does not support this operation.The error message returned because the operation is not supported while the instance is in the current state.
403InstanceLockedForSecurityThe specified operation is denied as your instance is locked for security reasons.The error message returned because the operation is not supported while the instance is locked for security reasons.
403InsufficientBalanceYour account does not have enough balance.The error message returned because you do not have sufficient balance within your Alibaba Cloud account. Add funds to your Alibaba Cloud account and try again.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The error message returned because the specified InstanceId parameter is invalid.
404InvalidPayType.NotSupportThe specified pre pay instance not support.The error message returned because the operation is not supported by the subscription instance.

For a list of error codes, see Service error codes.