StartInstance

Last Updated: Sep 28, 2017

Description

Start a specified instance. Pay attention to the following items:

  • After you invoke this interface successfully, the specified instance is in Starting status.
  • You can only invoke this interface when the instance is in Stopped status.
  • If OperationLocks of the instance indicates LockReason: security, you cannot start the instance.

Request parameters

Name Type Required Description
Action String Yes The name of the API. Value: StartInstance.
InstanceId String Yes ID of the instance.
InitLocalDisk Boolean No Recover to the previous normal status of your local disk when exceptions occurs. Applicable to instance types of D1, I1, and I2 instance family. Optional values:
  • true: Recover the local disk to the previous normal status. The accumulated data starting from the previous normal status will be overwritten.
  • false: Skip the recovery, and keep the status of the local disk unchanged.

Return parameters

All parameters are public return parameters. See Public parameters for details.

Error codes

Error code Description HTTP status code Meaning
MissingParameter The input parameter InstanceId that is mandatory for processing this request is not supplied. 400 InstanceId value is missing.
DiskError Incorrect Disk Status 403 Abnormal disk status.
IncorrectInstanceStatus The current state of the instance does not support this operation. 403 The current state of the instance does not support this operation.
InstanceLockedForSecurity The specified operation is denied as your instance is locked for security reasons. 403 Operation is denied because the resource is locked for security reasons.
InstanceNotReady The specified instance is not ready for use 403 The specified instance is being created.
InsufficientBalance Your account does not have enough balance. 403 The instance cannot be started because the account does not have enough balance.
InvalidInstanceId.NotFound The specified InstanceId does not exist. 404 The specified InstanceId does not exist.
InternalError The request processing has failed due to some unknown error. 500 Internal error.

Examples

Request example

  1. https://ecs.aliyuncs.com/?Action=StartInstance
  2. &InstanceId=i-instance1
  3. &<Public Request Parameters>

Return example

XML format

  1. <StartInstanceResponse>
  2. <RequestId>C0003E8B-B930-4F59-ADC0-0E209A9012A8</RequestId>
  3. </StartInstanceResponse>

JSON format

  1. {
  2. "RequestId": "C0003E8B-B930-4F59-ADC0-0E209A9012A8"
  3. }
Thank you! We've received your feedback.