Editing a Server Group
Function
This API is used to edit a server group.
Calling Method
For details, see Calling APIs.
URI
PUT /v5/{project_id}/host-management/groups
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
User project ID |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
enterprise_project_id |
No |
String |
Enterprise project ID. To query all enterprise projects, set this parameter to all_granted_eps. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-auth-token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
group_name |
No |
String |
Server group name |
group_id |
Yes |
String |
Server group ID |
host_id_list |
No |
Array of strings |
Server ID list |
Response Parameters
Status code: 200
success
None
Example Requests
Edit the server group named test. The server group ID is eca40dbe-27f7-4229-8f9d-a58213129fdc. The IDs of the servers in the server group are 15dac7fe-d81b-43bc-a4a7-4710fe673972 and 21303c5b-36ad-4510-a1b0-cb4ac4c2875c.
PUT https://{endpoint}/v5/{project_id}/host-management/groups { "group_id" : "eca40dbe-27f7-4229-8f9d-a58213129fdc", "group_name" : "test", "host_id_list" : [ "15dac7fe-d81b-43bc-a4a7-4710fe673972", "21303c5b-36ad-4510-a1b0-cb4ac4c2875c" ] }
Example Responses
None
Status Codes
Status Code |
Description |
---|---|
200 |
success |
400 |
Invalid parameter. |
401 |
Authentication failed. |
403 |
Insufficient permission. |
404 |
Resource not found. |
500 |
System error. |
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