Starts Elastic Compute Service (ECS) instances that are in the Stopped state.
Operation description
When you call this operation, take note of the following items:
- The ECS instances that you want to start must be in the Stopped state.``
- If the response contains
{"OperationLocks": {"LockReason" : "security"}}
, the ECS instance is locked to ensure security. No operations are allowed on the ECS instance. - You can start multiple ECS instances at the same time and use the
BatchOptimization
parameter to specify the batch operation mode.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DryRun | boolean | No | Specifies whether to perform a dry run. Valid values:
Note
If you set BatchOptimization to SuccessFirst and DryRun to true, only DRYRUN.SUCCESS is returned regardless of whether the request passes the dry run.
Default value: false. | false |
RegionId | string | Yes | The region ID of the ECS instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
BatchOptimization | string | No | The batch operation mode. Valid values:
Default value: AllTogether. | AllTogether |
InstanceId | array | Yes | The IDs of the ECS instances. You can specify up to 100 ECS instance IDs. | |
string | Yes | The ID of instance N. Valid values of N: 1 to 100. | i-bp67acfmxazb4p**** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"InstanceResponses": {
"InstanceResponse": [
{
"Code": "200",
"Message": "success",
"InstanceId": "i-bp67acfmxazb4p****",
"CurrentStatus": "Starting",
"PreviousStatus": "Stopped"
}
]
}
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be added ECS tag | - |
400 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | The customer master key (CMK) is not enabled when KMSKeyId is specified for an encrypted disk. You can call the DescribeKey operation of KMS to query information about the specified CMK. |
400 | InvalidParameter.KMSKeyId.KMSUnauthorized | ECS service account have no right to access your KMS. | - |
400 | DRYRUN.SUCCESS | This request is a dryrun request with successful result. | The request is checked and determined as valid. |
400 | Invalid.PrivatePoolOptions.NoStock | The PrivatePool has been used up. | - |
403 | InvalidInstanceId.NotFound | InstanceId should not be null. | - |
403 | InvalidParameter.TooManyInstanceIds | Instance ids cannot be more than 100. | - |
403 | Abs.InvalidInstanceIds.MalFormed | The specified instanceIds is not valid. | - |
403 | InstanceExpired | %s | - |
403 | InstanceLockedForSecurity | %s | - |
403 | InstanceExpiredOrInArrears | %s | - |
403 | IncorrectInstanceStatus | %s | The instance is in a state that does not support the current operation. |
403 | InvalidInstance.NotFoundSystemDisk | %s | - |
403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | The requested resources are insufficient. |
403 | OperationDenied.SpotPriceLowerThanPublicPrice | The spot instance price is lower than public price. | Your user-defined maximum hourly price of a preemptible instance is lower than the current market price. |
403 | OperationDenied.SpotPriceLowerThanPublicPrice | %s | - |
403 | InsufficientBalance | Your account does not have enough balance. | Your account balance is insufficient. Add funds to your account and try again. |
403 | InstanceNotReady | The specified instance is not ready for use. | The resource is in a state that does not support the current operation. Try again later and check whether the instance state supports the operation. |
403 | OperationDenied.HostRepairing | %s | - |
404 | InvalidInstanceId.NotFound | %s | The specified instance does not exist. Check whether the InstanceId parameter is valid. |
404 | InvalidInstanceIds.NotFound | The specified InstanceIds does not exist. | The specified InstanceId parameter does not exist. You can call the DescribeInstances operation to query the state of the instance. |
404 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | The specified instance does not exist. |
409 | InvalidOperation.Conflict | Request was denied due to conflict with a previous request, please try again later. | - |
500 | InternalError | The 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 time | Summary of changes | Operation |
---|
No change history