ReActivateInstances

更新时间:
复制 MD 格式

Restarts a pay-as-you-go ECS instance that has expired or been recycled due to an overdue payment.

Operation description

After you settle the overdue bill for a pay-as-you-go instance, you do not need to call this operation to activate the instance. The system automatically restarts the instance and restores it to the state before the overdue payment. Automatic restarts may occasionally fail. Check whether the automatic restart succeeds. If the automatic restart fails, call this operation to manually restart the instance.

  • After you settle the overdue bill, the total value of your Alibaba Cloud account balance (cash balance) and vouchers must be at least CNY 100.00. Otherwise, the instance cannot be restarted.

  • The instance must be in the expired (Stopped) or being recycled due to overdue payment (Stopped) state.

  • Instances that are locked for security reasons cannot be started by calling this operation. For more information, see Impact of resource security locks on API calls.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ecs:ReActivateInstances

update

*Instance

acs:ecs:{#regionId}:{#accountId}:instance/{#instanceId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

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

cn-hangzhou

InstanceId

string

Yes

The instance ID of the instance that you want to restart.

i-bp67acfmxazb4p****

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 ReopenInstance.InstanceNotEnoughBalance Reopen instance must have enough account balance.
400 ReopenInstance.ImageNotEnoughBalance Reopen instance must have enough cash balance.
400 ReopenInstance.InstanceStatusNotValid Instance status is not Expired, ImageExpired or EcsAndImageExpired. The instance cannot be restarted because the instance or its image has expired.
500 InternalError The request processing has failed due to some unknown error.
403 IncorrectInstanceStatus The current status of the resource does not support this operation.
403 InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons.
403 InsufficientBalance Your account does not have enough balance.
404 InvalidInstanceId.NotFound The specified InstanceId does not exist. The specified instanceId is invalid.
404 InvalidPayType.NotSupport The specified pre pay instance not support. Subscription instances do not support the operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.