AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the DeregisterTargets operation. Deregisters the specified targets from the specified target group. After the targets are deregistered, they no longer receive traffic from the load balancer.
The load balancer stops sending requests to targets that are deregistering, but uses connection draining to ensure that in-flight traffic completes on the existing connections. This deregistration delay is configured by default but can be updated for each target group.
For more information, see the following:
Deregistration delay in the Application Load Balancers User Guide
Deregistration delay in the Network Load Balancers User Guide
Deregistration delay in the Gateway Load Balancers User Guide
Note: If the specified target does not exist, the action returns successfully.
Namespace: Amazon.ElasticLoadBalancingV2.Model
Assembly: AWSSDK.ElasticLoadBalancingV2.dll
Version: 3.x.y.z
public class DeregisterTargetsRequest : AmazonElasticLoadBalancingV2Request IAmazonWebServiceRequest
The DeregisterTargetsRequest type exposes the following members
Name | Description | |
---|---|---|
DeregisterTargetsRequest() |
Name | Type | Description | |
---|---|---|---|
TargetGroupArn | System.String |
Gets and sets the property TargetGroupArn. The Amazon Resource Name (ARN) of the target group. |
|
Targets | System.Collections.Generic.List<Amazon.ElasticLoadBalancingV2.Model.TargetDescription> |
Gets and sets the property Targets. 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. |
This example deregisters the specified instance from the specified target group.
var client = new AmazonElasticLoadBalancingV2Client(); var response = client.DeregisterTargets(new DeregisterTargetsRequest { TargetGroupArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067", Targets = new List<TargetDescription> { new TargetDescription { Id = "i-0f76fade" } } });
.NET Core App:
Supported in: 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5, 4.0, 3.5