You can call AttachInstances to add an existing Edge Node Service (ENS) instance to a managed edge cluster.

Request information

POST /clusters/{cluster_id}/attach HTTP/1.1
Table 1. Request line parameters
Parameter Type Required Description
cluster_id string Yes The ID of the cluster.

Custom request headers

No custom request headers are used. For more information, see Public request headers.

Request body

{
    "instances": "A list of the instances that you want to add to the cluster.",
    "is_edge_worker": "Specifies whether the node to be added is an edge node.",
}
Table 2. Request body parameters
Parameter Type Required Description
instances Array Yes A list of the instances that you want to add to the cluster.
is_edge_worker bool Yes Specifies whether the node to be added is an edge node. To add ENS nodes, set this parameter to true.

Response information

Response line

HTTP/1.1 202 OK

Custom response headers

No custom response headers are used. For more information, see Public response headers.

Response body

{
  "list": [
    {
      "code": "200",
      "instanceId": "i-5j2zjis****",
      "message": "successful"
    },
    {
      "code": "200",
      "instanceId": "i-5j443uf****",
      "message": "successful"
    }
  ],
  "task_id": "T-5d6f733d9e408ec74f000002"
}

Examples

Sample requests

POST /clusters/Cccfd68c474454665ace07efce924****/attach HTTP/1.1
<Common request header>
{
    "is_edge_worker": true
    "instances": [
        "i-xxxx",
        "i-yyyy"
    ]
}

Sample success responses

HTTP/1.1 202 Accepted
<Common response header>
{
  "list": [
    {
      "code": "200",
      "instanceId": "i-xxxx",
      "message": "successful"
    },
    {
      "code": "200",
      "instanceId": "i-yyyy",
      "message": "successful"
    }
  ],
  "task_id": "T-5d6f733d9e408ec74f000002"
}