Add existing Elastic Compute Service (ECS) instances to a cluster.

The system disk is replaced in the process of adding ECS instances. Therefore, back up the data in advance.

Request information

Request line (RequestLine)

POST /clusters/{cluster_id}/attach HTTP/1.1

Request line parameter (URI Param)

Name Type Required Description
cluster_id string Yes The cluster ID.

Special request header (RequestHead)

None. See Public request headers.

Request body (RequestBody)

    "password": "password of the root account that is used to log on to the ECS instance",
    "instances": "the array of instances to be added"

Request body explanation

Name Type Required Description
password string Yes The password of the ECS instance, which is 8–30 characters long and must contain uppercase letters/lowercase letters, numbers, and special characters at the same time.
instances array Yes The array of existing ECS instances.

Response information

Response line (ResponseLine)

HTTP/1.1 202 OK

Special response header (ResponseHead)

None. See Public response headers.

Response body (ResponseBody)

    "list": [
            "code": "200",
            "instanceId": "i-2zee3oiwcyoz7kwdo8bt",
            "message": "successful"
            "code": "200",
            "instanceId": "i-2ze0lgm3y6iylcbtcypf",
            "message": "successful"
    "task_id": "T-5a544aff80282e39ea000039"


Request example

POST /clusters/Cccfd68c474454665ace07efce924f75f/attach HTTP/1.1
<Public request headers>

    "password": "Hello1234",
    "instances": [

Response example

HTTP/1.1 202 Accepted
<Public response headers>

    "list": [
            "code": "200",
            "instanceId": "i-xxxx",
            "message": "successful"
            "code": "200",
            "instanceId": "i-yyyy",
            "message": "successful"
    "task_id": "T-5a544aff80282e39ea000039"