DeregisterTargets
Deregisters the specified targets from the specified target group. After the targets are deregistered, they no longer receive traffic from the load balancer.
Note: If the specified target does not exist, the action returns successfully.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- TargetGroupArn
-
The Amazon Resource Name (ARN) of the target group.
Type: String
Required: Yes
- Targets.member.N
-
The targets. If you specified a port override when you registered a target, you must specify both the target ID and the port when you deregister it.
Type: Array of TargetDescription objects
Required: Yes
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidTarget
-
The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.
HTTP Status Code: 400
- TargetGroupNotFound
-
The specified target group does not exist.
HTTP Status Code: 400
Examples
Deregister an instance from a target group
This example deregisters the specified instance from the specified target group.
Sample Request
https://elasticloadbalancing.amazonaws.com/?Action=DeregisterTargets
&TargetGroupArn=arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067
&Targets.member.1.Id=i-0f76fade435676abd
&Version=2015-12-01
&AUTHPARAMS
Deregister an IP address from a target group
This example deregisters the specified IP address from the specified target group.
Sample Request
https://elasticloadbalancing.amazonaws.com/?Action=DeregisterTargets
&TargetGroupArn=arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067
&Targets.member.1.Id=10.0.1.238
&Version=2015-12-01
&AUTHPARAMS
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: