Add hosts to a deployment group
Applicable versions | Central Edition, Region Edition |
Endpoint and authorization information
- Obtain an endpoint: Replace {domain} in the request syntax.
- Obtain a personal access token.
- Obtain an organizationId: Required only for Central Edition. Go to the Basic Information page in the Tennant Management console to obtain the organization ID.
Product | Resource | Required permissions |
Application Delivery | Resource | Read/Write |
Request syntax
Central Edition
PUT https://{domain}/oapi/v1/appstack/organizations/{organizationId}/pools/instances/{instanceName}/deployGroup/{groupName}/addHostList
Region Edition
PUT https://{domain}/oapi/v1/appstack/pools/instances/{instanceName}/deployGroup/{groupName}/addHostList
Request headers
Parameter | Type | Required | Description | Example |
x-yunxiao-token | string | Yes | The personal access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Position | Required | Description | Example |
instanceName | string | path | Yes | The name of the host cluster. This is not the display name of the host cluster. | HostCluster1 |
groupName | string | path | Yes | The name of the deployment group. This is not the display name of the deployment group. | DeploymentGroup1 |
organizationId | string | path |
| The organization ID. | ec766e63aee3437d9a51f334d6exe671 |
| - | object | body | No | ||
| hostSns | array[string] | body | Yes | A list of Elastic Compute Service (ECS) host instance IDs. Currently, only ECS hosts are supported. | ["i-ssssssa", "i-ssssssb", "i-ssssssc"] |
Request examples
Central Edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/pools/instances/HostCluster1/deployGroup/DeploymentGroup1/addHostList' \
-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/addHostList' \
-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 whether the request was successful. | true |
Response example
true
Error codes
For more information, see Error Code Center.