DetachLoadBalancerFromSubnets
Removes the specified subnets from the set of configured subnets for the load balancer.
After a subnet is removed, all EC2 instances registered with the load balancer
in the removed subnet go into the OutOfService
state. Then,
the load balancer balances the traffic among the remaining routable subnets.
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
- LoadBalancerName
-
The name of the load balancer.
Type: String
Required: Yes
- Subnets.member.N
-
The IDs of the subnets.
Type: Array of strings
Required: Yes
Response Elements
The following element is returned by the service.
- Subnets.member.N
-
The IDs of the remaining subnets for the load balancer.
Type: Array of strings
Errors
For information about the errors that are common to all actions, see Common Errors.
- InvalidConfigurationRequest
-
The requested configuration change is not valid.
HTTP Status Code: 409
- LoadBalancerNotFound
-
The specified load balancer does not exist.
HTTP Status Code: 400
Examples
Detach a load balancer
This example detaches the specified subnet from the specified load balancer.
Sample Request
https://elasticloadbalancing.amazonaws.com/?Action=DetachLoadBalancerFromSubnets
&LoadBalancerName=my-vpc-loadbalancer
&Subnets.member.1=subnet-119f0078
&Version=2012-06-01
&AUTHPARAMS
Sample Response
<DetachLoadBalancerFromSubnetsResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/">
<DetachLoadBalancerFromSubnetsResult>
<Subnets>
<member>subnet-159f007c</member>
<member>subnet-3561b05e</member>
</Subnets>
</DetachLoadBalancerFromSubnetsResult>
<ResponseMetadata>
<RequestId>07b1ecbc-1100-11e3-acaf-dd7edEXAMPLE</RequestId>
</ResponseMetadata>
</DetachLoadBalancerFromSubnetsResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: