Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Removes one or more instances from the specified Auto Scaling group.
After the instances are detached, you can manage them independent of the Auto Scaling group.
If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are detached.
If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are deregistered from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are deregistered from the target groups.
For more information, see Detach EC2 instances from your Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.
Synopsis
- data DetachInstances = DetachInstances' {}
- newDetachInstances :: Text -> Bool -> DetachInstances
- detachInstances_instanceIds :: Lens' DetachInstances (Maybe [Text])
- detachInstances_autoScalingGroupName :: Lens' DetachInstances Text
- detachInstances_shouldDecrementDesiredCapacity :: Lens' DetachInstances Bool
- data DetachInstancesResponse = DetachInstancesResponse' {
- activities :: Maybe [Activity]
- httpStatus :: Int
- newDetachInstancesResponse :: Int -> DetachInstancesResponse
- detachInstancesResponse_activities :: Lens' DetachInstancesResponse (Maybe [Activity])
- detachInstancesResponse_httpStatus :: Lens' DetachInstancesResponse Int
Creating a Request
data DetachInstances Source #
See: newDetachInstances
smart constructor.
DetachInstances' | |
|
Instances
:: Text | |
-> Bool | |
-> DetachInstances |
Create a value of DetachInstances
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:instanceIds:DetachInstances'
, detachInstances_instanceIds
- The IDs of the instances. You can specify up to 20 instances.
$sel:autoScalingGroupName:DetachInstances'
, detachInstances_autoScalingGroupName
- The name of the Auto Scaling group.
$sel:shouldDecrementDesiredCapacity:DetachInstances'
, detachInstances_shouldDecrementDesiredCapacity
- Indicates whether the Auto Scaling group decrements the desired capacity
value by the number of instances detached.
Request Lenses
detachInstances_instanceIds :: Lens' DetachInstances (Maybe [Text]) Source #
The IDs of the instances. You can specify up to 20 instances.
detachInstances_autoScalingGroupName :: Lens' DetachInstances Text Source #
The name of the Auto Scaling group.
detachInstances_shouldDecrementDesiredCapacity :: Lens' DetachInstances Bool Source #
Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.
Destructuring the Response
data DetachInstancesResponse Source #
See: newDetachInstancesResponse
smart constructor.
DetachInstancesResponse' | |
|
Instances
newDetachInstancesResponse Source #
Create a value of DetachInstancesResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:activities:DetachInstancesResponse'
, detachInstancesResponse_activities
- The activities related to detaching the instances from the Auto Scaling
group.
$sel:httpStatus:DetachInstancesResponse'
, detachInstancesResponse_httpStatus
- The response's http status code.
Response Lenses
detachInstancesResponse_activities :: Lens' DetachInstancesResponse (Maybe [Activity]) Source #
The activities related to detaching the instances from the Auto Scaling group.
detachInstancesResponse_httpStatus :: Lens' DetachInstancesResponse Int Source #
The response's http status code.