Deleting a Host Group
Function
Delete a host group.
URI
DELETE /v3/{project_id}/lts/host-group
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. For details about how to obtain a project ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID. Minimum: 1 Maximum: 64 |
Request Parameters
Parameter | Mandatory | Type | Description |
---|---|---|---|
X-Auth-Token | Yes | String | User token obtained from IAM. For details about how to obtain a user token, see Obtaining a User Token. Minimum: 1 Maximum: 10000 |
Content-Type | Yes | String | Set this parameter to application/json;charset=UTF-8. Minimum: 30 Maximum: 30 |
Parameter | Mandatory | Type | Description |
---|---|---|---|
host_group_id_list | Yes | Array of strings | List of host group IDs. Minimum: 36 Maximum: 36 |
Response Parameters
Status code: 200
Parameter | Type | Description |
---|---|---|
result | Array of GetHostGroupInfo objects | Host group details. |
total | Long | Number of deleted host groups. Minimum: 0 Maximum: 1000 |
Parameter | Type | Description |
---|---|---|
host_group_id | String | Host group ID. |
host_group_name | String | Host group name. |
host_group_type | String | Host group type. |
host_id_list | Array of strings | Host ID list. |
host_group_tag | Array of HostGroupTagResBody objects | Tag information. |
create_time | Long | Creation time. |
update_time | Long | Update time. |
labels | Array of strings | Host group ID. |
agent_access_type | String | Host access type. |
Parameter | Type | Description |
---|---|---|
key | String | Tag key. |
value | String | Tag value. |
tags_to_streams_enable | Boolean | Whether to apply the tag to the log stream. Only a tag of a log group can be directly applied to its log stream. |
Status code: 400
Parameter | Type | Description |
---|---|---|
error_code | String | Error code |
error_msg | String | Error description |
Status code: 500
Parameter | Type | Description |
---|---|---|
error_code | String | Error code |
error_msg | String | Error description |
Example Requests
Delete one or multiple host groups at a time.
DELETE https://{endpoint}/v3/{project_id}/lts/host-group/v3/{project_id}/lts/host-group{"host_group_id_list":["xxxx","xxxx"]}
Example Responses
Status code: 200
Host groups are deleted.
{"result" : [{"host_group_id" : "598c77aa-c69b-42f0-8cb8-xxxx5b38","host_group_name" : "devspoxxxou1","host_group_type" : "linux","host_id_list" : ["dc1dab7e-b04xxxx", "xxxxx"],"host_group_tag" : [{"key" : "xxx","value" : "xxx"}, {"key" : "xxx","value" : "xxx"}],"create_time" : 1635xx9410332,"update_time" : 163xx0332}],"total" : 1}
Status code: 400
Invalid request. Modify the request based on the description in error_msg before a retry.
{"error_code" : "LTS.1812","error_msg" : "Invalid host group id"}
Status code: 500
The server has received the request but encountered an internal error.
{"error_code" : "LTS.0010","error_msg" : "Internal Server Error"}
Status Codes
Status Code | Description |
---|---|
200 | Host groups are deleted. |
400 | Invalid request. Modify the request based on the description in error_msg before a retry. |
500 | The server has received the request but encountered an internal error. |
Error Codes
See Error Codes.
- URI