Disassociates one or more Application Load Balancer (ALB) server groups from a scaling group.

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
AlbServerGroup.N.AlbServerGroupId String Yes sgp-ddwb0y0g6y9bjm****

The ID of ALB server group N. N indicates the serial number of the ALB server group.

AlbServerGroup.N.Port Integer Yes 22

The port number used by the Elastic Compute Service (ECS) instances in ALB server group N. N indicates the serial number of the ALB server group.

RegionId String Yes cn-hangzhou

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

ScalingGroupId String Yes asg-bp18p2yfxow2dloq****

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 value, but you must make sure that it 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 existing ECS instances from the ALB server group to be dissociated.

  • true: removes existing ECS instances and returns the ScalingActivityId value. You can view the ID of the scaling activity to determine whether the existing instances are removed.
  • false: does not remove existing ECS instances.

Default value: false.

Response parameters

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

The ID of the request.

ScalingActivityId String asa-2ze6wxj8vsohn6j9****

The ID of the scaling activity in which the ALB server group is disassociated from the scaling group and the ECS instances in the ALB server group are removed. This parameter is valid only when ForceDetach is set to true.

Examples

Sample requests

http(s)://ess.aliyuncs.com/?Action=DetachAlbServerGroups
&AlbServerGroup.1.AlbServerGroupId=sgp-ddwb0y0g6y9bjm****
&AlbServerGroup.1.Port=22
&RegionId=cn-hangzhou
&ScalingGroupId=asg-bp18p2yfxow2dloq****
&<Common request parameters>

Sample success responses

XML format

<DetachAlbServerGroups>  
      <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
      <ScalingActivityId>asa-2ze6wxj8vsohn6j9****</ScalingActivityId>
</DetachAlbServerGroups>

JSON format

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "ScalingActivityId":"asa-2ze6wxj8vsohn6j9****"
}

Error codes

For a list of error codes, visit the API Error Center.

HTTP status cod

Error code

Error message

Description

400

AlbServerGroup.NotAttached

The ALB ServerGroups are not attached to specific ScalingGroup.

The error message returned because the ALB server group is not associated with the scaling group.