Updated on 2024-11-14 GMT+08:00

Starting Cloud Servers in a Batch

Function

This API is used to start cloud servers in a batch based on the specified cloud server IDs. A maximum of 1,000 cloud servers can be started within 1 minute. The API is the ECS API for starting ECSs in a batch. This section lists the key information about using the API. For more information about the API, see Starting ECSs in a Batch.

This API is an asynchronous API. After the batch start request is successfully delivered, a job ID is returned. This does not mean the batch start is complete. You need to call the API by referring to Querying Task Execution Status to query the job status. The SUCCESS status indicates that the batch start is successful.

This API used by cloud servers in the FlexusL instances is the same as that used by ECSs. The response parameter description, API usage example, and return values of ECSs also apply to the FlexusL instances.

URI

POST /v1/{project_id}/cloudservers/action

Request Message

In the request message, id in the servers field is the cloud server ID. Obtain the cloud server ID by referring to Querying a Created FlexusL Instance.

Example Request

Start FlexusL instances whose cloud server IDs are 72a270de-665a-4f46-8d64-24ad6edccdd1 and 72a270de-665a-4f46-8d64-24ad6edccdd2 in a batch.

POST https://{endpoint}/v1/{project_id}/cloudservers/action
{
 "os-start": {
  "servers": [
   {
    "id": "72a270de-665a-4f46-8d64-24ad6edccdd1"
   },
   {
    "id": "72a270de-665a-4f46-8d64-24ad6edccdd2"
   }
  ]
 }
}

Example Response

{
 "job_id": "ff80808290c6b7b60191ef4d78411d8d"
}