Editing a Host Cluster
Function
This API is used to edit a host cluster.
Calling Method
For details, see Calling APIs.
URI
PUT /v1/resources/host-groups/{group_id}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| group_id | Yes | String | Host cluster ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Message body type (format). |
| X-Auth-Token | Yes | String | User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Host cluster name |
| description | No | String | Host cluster description |
| slave_cluster_id | No | String | Slave cluster ID. If the value is null, the CloudOctopus slave cluster is used. If slave is user-defined, the slave cluster ID is used. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| status | String | Request success or failure status |
| id | String | Host cluster ID |
Example Requests
This API is used to edit a host cluster, including the host cluster description, host cluster name, and self-hosted resource pool ID.
https://{endpoint}/v1/resources/host-groups/f8421b5e91684258afc1d92ec46f67a2
{
"description" : "Update the description",
"name" : "Updating a Host Cluster Name",
"slave_cluster_id" : ""
} Example Responses
Status code: 200
OK: The request is successful.
{
"status" : "success",
"id" : "f8421b5e91684258afc1d92ec46f67a2"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | OK: The request is successful. |
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.