Remove hosts from a deployment group

Updated at:

Editions

Centralized edition, region edition

Service endpoints and authorization

  • Get service endpoint: Replace {domain} in the API request syntax.
  • Get personal access token.
  • Get the organizationId: Required only for the centralized edition. Go to the organization management console > basic information page to get the organization ID.

Product

Resource

Permission

Application Delivery

resource

Read/Write

Request syntax

Centralized edition

PUT https://{domain}/oapi/v1/appstack/organizations/{organizationId}/pools/instances/{instanceName}/deployGroup/{groupName}/removeHostList

Region edition

PUT https://{domain}/oapi/v1/appstack/pools/instances/{instanceName}/deployGroup/{groupName}/removeHostList

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

Your personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example

instanceName

string

path

Yes

The name of the host cluster (not the display name).

HostCluster1

groupName

string

path

Yes

The name of the deployment group (not the display name).

DeploymentGroup1

organizationId

string

path

  • Yes: centralized edition

  • No: region edition

The organization ID.

ec766e63aee3437d9a51f334d6exe671

-

object

body

No

hostSns

array[string]

body

Yes

An array of ECS host instance IDs. Only ECS hosts are supported.

["i-ssssssa", "i-ssssssb", "i-ssssssc"]

Request example

Centralized edition

curl -X 'PUT' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/pools/instances/HostCluster1/deployGroup/DeploymentGroup1/removeHostList' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "hostSns": ["i-ssssssa", "i-ssssssb", "i-ssssssc"]
    }'

Region edition

curl -X 'PUT' \
  'https://{domain}/oapi/v1/appstack/pools/instances/HostCluster1/deployGroup/DeploymentGroup1/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

Indicates if the operation succeeded.

true

Response example

true

Error codes

For a list of API-related error codes, see the Error Code Center.