Detaches one or more vServer groups from a scaling group.
Usage notes
When you call the DetachVServerGroups operation, you must use the following parameters to specify the vServer groups that you want to detach from your scaling group:
LoadBalancerId: the ID of the load balancer.
VServerGroupId: the ID of the vServer group.
Port: the port number of the vServer group.
When the vServer group specified by the request parameters matches that attached to your scaling group, this operation yields a favorable result. Otherwise, the request is ignored and no error is reported.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DetachVServerGroups | The operation that you want to perform. Set the value to DetachVServerGroups. |
RegionId | String | Yes | cn-hangzhou | The region ID of the scaling group. Examples: cn-hangzhou and cn-shanghai. For more information, see Regions and zones. |
ScalingGroupId | String | Yes | asg-bp1fo0dbtsbmqa9h**** | The ID of the scaling group. |
ClientToken | String | No | 123e4567-e89b-12d3-a456-42665544**** | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. |
ForceDetach | Boolean | No | false | Specifies whether to remove ECS instances of the scaling group from the vServer group that you want to detach from the scaling group.
Default value: false. |
VServerGroup.N.VServerGroupAttribute.N.VServerGroupId | String | No | rsp-bp1jp1rge**** | The ID of vServer group N.
|
VServerGroup.N.VServerGroupAttribute.N.Port | Integer | No | 22 | The port over which Auto Scaling adds ECS instances to the vServer group. Valid values: 1 to 65535.
|
VServerGroup.N.LoadBalancerId | String | No | lb-bp1p90y3ya9h8s62d**** | The ID of the load balancer to which the vServer group belongs. N specifies the serial number of the load balancer. Valid values of N: 1 to 5. |
Response parameters
Parameter | Type | Example | Description |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** | The request ID. |
Examples
Sample requests
http(s)://ess.aliyuncs.com/?Action=DetachVServerGroups
&RegionId=cn-hangzhou
&ScalingGroupId=asg-bp1fo0dbtsbmqa9h****
&ClientToken=123e4567-e89b-12d3-a456-42665544****
&ForceDetach=false
&VServerGroup=[{"VServerGroupAttribute":[{"VServerGroupId":"rsp-bp1jp1rge****","Port":22}],"LoadBalancerId":"lb-bp1p90y3ya9h8s62d****"}]
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DetachVServerGroupsResponse>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</DetachVServerGroupsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}
Error codes
For a list of error codes, see Service error codes.
HTTP status code | Error code | Error message | Description |
403 | Forbidden.Unauthorized | A required authorization for the specified action is not supplied. | Auto Scaling is not authorized to call the specified operation. |
404 | InvalidScalingGroupId.NotFound | The specified scaling group does not exist. | The specified scaling group does not exist within the Alibaba Cloud account. |
400 | InvalidParameter | The specified value of parameter "%s" is not valid. | The value of a parameter is invalid. |
400 | MissingParameter | The input parameter "%s" that is mandatory for processing this request is not supplied. | A required parameter is not specified. |