Remove hosts from a host group
Applicable versions | Center version and Region version |
Endpoint and authorization
- Get the endpoint: Replace
{domain}in the API request syntax. - Get a personal access token.
- Get the organization ID. This parameter is required only for the center version. You can find the ID in the Organization Management console on the Basic Information page.
Product | Resource | Required permissions |
Application Delivery | Resource | Read and write |
Request syntax
Center version
PUT https://{domain}/oapi/v1/appstack/organizations/{organizationId}/pools/instances/{instanceName}/removeHostList
Region version
PUT https://{domain}/oapi/v1/appstack/pools/instances/{instanceName}/removeHostList
Request headers
Parameter | Type | Required | Description | Example |
x-yunxiao-token | string | Yes | Personal access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example |
instanceName | string | path | Yes | The host group name (not the host group display name). | my-host-group |
organizationId | string | path |
| The organization ID. | ec766e63aee3437d9a51f334d6exe671 |
| - | object | body | No | ||
| hostSns | array[string] | body | Yes | An array of ECS host instance IDs. Only the ECS host type is supported. | ["i-ssssssa", "i-ssssssb", "i-ssssssc"] |
Request examples
Center version
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/pools/instances/my-host-group/removeHostList' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"hostSns": ["i-ssssssa", "i-ssssssb", "i-ssssssc"]
}'
Region version
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/pools/instances/my-host-group/removeHostList' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"hostSns": ["i-ssssssa", "i-ssssssb", "i-ssssssc"]
}'
Response parameters
Parameter | Type | Description | Example |
- | boolean | A value of | true |
Response example
true
Error codes
For a list of API-related error codes, see the Error Code Center.