You can call this operation to remove one or more VServer groups.

Description

To remove a VServer group from a scaling group, you must specify the SLB instance ID (LoadBalancerId), VServer group ID (VServerGroupId), and port number of the VServer group (Port). The VServer group is removed if the VServer group specified by the request parameters matches the VServer group in the scaling group. Otherwise, the request is ignored and no error message will be returned by the operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou-b

The region ID of the scaling group, such as cn-hangzhou or cn-shanghai. For more information, see Regions and zones.

ScalingGroupId String Yes asg-****

The ID of the scaling group.

Action String Yes DetachVServerGroups

The operation that you want to perform. Set the value to DetachVServerGroups.

ForceDetach Boolean No false

Specifies whether the ECS instances that belong to the specified scaling group are to be removed from the VServer being detached.

  • true: removes the ECS instances.
  • false: does not remove the ECS instances.

Default value: false

VServerGroup.N.LoadBalancerId String No lb-****

The ID of SLB instance N with which the VServer group is associated.

N indicates the number of the SLB instance. Valid values of N: 1 to 5.

VServerGroup.N.VServerGroupAttribute.N.Port Integer No 22

The port number that is used by Auto Scaling to add the ECS instances to the VServer group M. Valid values: 1 to 65535.

N indicates the number of the SLB instance. Valid values of N: 1 to 5.

M indicates the number of the VServer group that is associated with the SLB instance. Valid values of M: 1 to 5.

VServerGroup.N.VServerGroupAttribute.N.VServerGroupId String No rsp-****

The ID of VServer group M.

N indicates the number of the SLB instance. Valid values of N: 1 to 5.

M indicates the number of the VServer group that is associated with the SLB instance. Valid values of M: 1 to 5.

Response parameters

Parameter Type Example Description
RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

Examples

Sample requests


http://ess.aliyuncs.com/?Action=DetachVServerGroups
&ScalingGroupId=asg-****
&RegionId=cn-hangzhou
&VServerGroup.1.LoadBalancerId=lb-****
&VServerGroup.1.VServerGroupAttribute.1.VServerGroupId=rsp-****
&VServerGroup.1.VServerGroupAttribute.1.Port=22
&VServerGroup.1.VServerGroupAttribute.2.VServerGroupId=rsp-****
&VServerGroup.1.VServerGroupAttribute.2.Port=80
&<Common request parameters>

Sample success responses

XML format

<DetachVServerGroupsResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</DetachVServerGroupsResponse>

JSON format

{
	"requestId":"473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

For more information about error codes, visit API Error Center.

HTTP status code

Error code

Error message

Description

403

Forbidden.Unauthorized

A required authorization for the specified action is not supplied.

The error message returned because Auto Scaling is not authorized to call the specified operation.

404

InvalidScalingGroupId.NotFound

The specified scaling group does not exist.

The error message returned because the specified scaling group does not exist in the current account.

400

InvalidParameter

The specified value of parameter "%s" is not valid.

The error message returned because the specified value of the parameter is invalid.

400

MissingParameter

The input parameter "%s" that is mandatory for processing this request is not supplied.

The error message returned because the required parameter is not specified.