Removing an ECS from an ECS Group
Function
This API is used to remove an ECS from an ECS group. The anti-affinity policy will not be applied to the ECS after it is removed from the group.
Constraints
Only the anti-affinity policy is supported. ECSs in the same ECS group are deployed on different hosts, improving service reliability.
URI
POST /v1/{project_id}/cloudservers/os-server-groups/{server_group_id}/action
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Definition Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
| server_group_id | Yes | Definition Specifies the ECS group ID. Constraints N/A Range N/A Default Value N/A |
Request
Table 2 describes the request parameters.
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| remove_member | Yes | Object | Definition Specifies the information of the ECS to be removed from an ECS group. Constraints N/A Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| instance_uuid | Yes | String | Definition Specifies the ECS UUID. Constraints N/A Range N/A Default Value N/A |
Response
None
Example Request
Delete the ECS whose UUID is 34dac9a0-c4a7-457b-bab2-e2c696e0e401 from the specified ECS group.
POST https://{endpoint}/v1/{project_id}/cloudservers/os-server-groups/{server_group_id}/action
{
"remove_member": {
"instance_uuid": "34dac9a0-c4a7-457b-bab2-e2c696e0e401"
}
} Example Response
Status code 200, indicating that the operation is successful
Returned Values
Error Codes
See Error Codes.