You can call the AttachInstances operation to add existing Edge Node Service (ENS) instances to a specified Container Service for Kubernetes (ACK) edge cluster.
Background information
Request information
POST /clusters/{cluster_id}/attach HTTP/1.1
Parameter | Type | Required | Description |
---|---|---|---|
cluster_id | string | Yes | The ID of the cluster that you want to manage. |
Custom request headers
This operation does not use custom request headers. For more information, see Common parameters.
Request body
{
"instances":[
"i-wz9e8pvnjalxkggk****"
],
"format_disk":true,
"rds_instances":[
"rds-xxx"
],
"keep_instance_name":true,
"is_edge_worker":true
}
Parameter | Type | Required | Description |
---|---|---|---|
instances | Array | Yes | A list of existing instances. |
is_edge_worker | bool | Yes | Specifies whether to add the instances as edge nodes. If you want to add ENS nodes, set the value to true. |
rds_instances | Array | No | A list of ApsaraDB RDS instances. |
keep_instance_name | bool | No | Specifies whether to retain the names of the instances. |
format_disk | bool | No | Specifies whether to format data disks. |
Response information
Response line
HTTP/1.1 202 OK
Custom response headers
This operation does not return custom response headers. For more information, see Common parameters.
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 headers>
{
"is_edge_worker": true
"instances": [
"i-xxxx",
"i-yyyy"
],
"keep_instance_name":true
}
Sample responses
HTTP/1.1 202 Accepted
<Common response headers>
{
"list": [
{
"code": "200",
"instanceId": "i-xxxx",
"message": "successful"
},
{
"code": "200",
"instanceId": "i-yyyy",
"message": "successful"
}
],
"task_id": "T-5d6f733d9e408ec74f000002"
}