Adding an ECS to an ECS Group
Function
This API is used to add an ECS to an ECS group. The system automatically deploys the newly added ECS to a host that is different from the ones accommodating other ECSs in the ECS group.
Constraints
- The ECS to be added has been stopped.
- Only KVM ECSs can be added.
- Only the anti-affinity policy is supported. ECSs in the same ECS group are deployed on different hosts, improving service reliability.
- This API supports checking fine-grained permissions for enterprise projects. For details, see ecs:cloudServers:addServerGroupMember.
URI
POST /v1/{project_id}/cloudservers/os-server-groups/{server_group_id}/action
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
server_group_id |
Yes |
Specifies the ECS group ID. |
Request
Table 2 describes the request parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
add_member |
Yes |
Object |
Specifies the information of the ECS to be added to an ECS group. For details, see Table 3. |
Response
None
Example Request
Adds a specified ECS to an ECS group.
POST https://{endpoint}/v1/{project_id}/cloudservers/os-server-groups/{server_group_id}/action { "add_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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot