All Products
Search
Document Center

Elastic Compute Service:ReActivateInstances

更新時間:Nov 14, 2024

Reactivates a pay-as-you-go Elastic Compute Service (ECS) instance that has expired or has been reclaimed due to overdue payments.

Operation description

  • You cannot call this operation to start ECS instances that are locked for security reasons. For more information, see API behavior when an instance is locked for security reasons.
  • The instance must be in the Stopped (Stopped) state.
  • You must pay the bills and reactivate the instance within 15 days after the instance is suspended due to overdue payments. Otherwise, the instance is released and the data cannot be restored. If you cannot restart an instance of the Virtual Private Cloud (VPC) type, try again later.
  • After the operation is called, the instance enters the Starting (Starting) state.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:ReActivateInstancesupdate
*Instance
acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

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

cn-hangzhou
InstanceIdstringYes

The ID of the instance that you want to reactivate.

i-bp67acfmxazb4p****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

51AB7717-6E1A-4D1D-A44D-54CB123ABC

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400ReopenInstance.InstanceNotEnoughBalanceReopen instance must have enough account balance.-
400ReopenInstance.ImageNotEnoughBalanceReopen instance must have enough cash balance.-
400ReopenInstance.InstanceStatusNotValidInstance status is not Expired, ImageExpired or EcsAndImageExpired.The instance cannot be restarted because the instance or its image has expired.
403IncorrectInstanceStatusThe current status of the resource does not support this operation.The resource is in a state that does not support the current operation.
403InstanceLockedForSecurityThe specified operation is denied as your instance is locked for security reasons.-
403InsufficientBalanceYour account does not have enough balance.Your account balance is insufficient. Add funds to your account and try again.
404InvalidInstanceId.NotFoundThe specified InstanceId does not exist.The specified instance does not exist.
404InvalidPayType.NotSupportThe specified pre pay instance not support.Subscription instances do not support the operation.
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
No change history