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 |
Terminates the specified instance and optionally adjusts the desired group size. This operation cannot be called on instances in a warm pool.
This call simply makes a termination request. The instance is not
terminated immediately. When an instance is terminated, the instance
status changes to terminated
. You can't connect to or start an
instance after you've terminated it.
If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches instances to replace the ones that are terminated.
By default, Amazon EC2 Auto Scaling balances instances across all Availability Zones. If you decrement the desired capacity, your Auto Scaling group can become unbalanced between Availability Zones. Amazon EC2 Auto Scaling tries to rebalance the group, and rebalancing might terminate instances in other zones. For more information, see Rebalancing activities in the Amazon EC2 Auto Scaling User Guide.
Synopsis
- data TerminateInstanceInAutoScalingGroup = TerminateInstanceInAutoScalingGroup' {}
- newTerminateInstanceInAutoScalingGroup :: Text -> Bool -> TerminateInstanceInAutoScalingGroup
- terminateInstanceInAutoScalingGroup_instanceId :: Lens' TerminateInstanceInAutoScalingGroup Text
- terminateInstanceInAutoScalingGroup_shouldDecrementDesiredCapacity :: Lens' TerminateInstanceInAutoScalingGroup Bool
- data TerminateInstanceInAutoScalingGroupResponse = TerminateInstanceInAutoScalingGroupResponse' {
- activity :: Maybe Activity
- httpStatus :: Int
- newTerminateInstanceInAutoScalingGroupResponse :: Int -> TerminateInstanceInAutoScalingGroupResponse
- terminateInstanceInAutoScalingGroupResponse_activity :: Lens' TerminateInstanceInAutoScalingGroupResponse (Maybe Activity)
- terminateInstanceInAutoScalingGroupResponse_httpStatus :: Lens' TerminateInstanceInAutoScalingGroupResponse Int
Creating a Request
data TerminateInstanceInAutoScalingGroup Source #
See: newTerminateInstanceInAutoScalingGroup
smart constructor.
TerminateInstanceInAutoScalingGroup' | |
|
Instances
newTerminateInstanceInAutoScalingGroup Source #
:: Text | |
-> Bool |
|
-> TerminateInstanceInAutoScalingGroup |
Create a value of TerminateInstanceInAutoScalingGroup
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:instanceId:TerminateInstanceInAutoScalingGroup'
, terminateInstanceInAutoScalingGroup_instanceId
- The ID of the instance.
$sel:shouldDecrementDesiredCapacity:TerminateInstanceInAutoScalingGroup'
, terminateInstanceInAutoScalingGroup_shouldDecrementDesiredCapacity
- Indicates whether terminating the instance also decrements the size of
the Auto Scaling group.
Request Lenses
terminateInstanceInAutoScalingGroup_instanceId :: Lens' TerminateInstanceInAutoScalingGroup Text Source #
The ID of the instance.
terminateInstanceInAutoScalingGroup_shouldDecrementDesiredCapacity :: Lens' TerminateInstanceInAutoScalingGroup Bool Source #
Indicates whether terminating the instance also decrements the size of the Auto Scaling group.
Destructuring the Response
data TerminateInstanceInAutoScalingGroupResponse Source #
See: newTerminateInstanceInAutoScalingGroupResponse
smart constructor.
TerminateInstanceInAutoScalingGroupResponse' | |
|
Instances
Eq TerminateInstanceInAutoScalingGroupResponse Source # | |
Read TerminateInstanceInAutoScalingGroupResponse Source # | |
Show TerminateInstanceInAutoScalingGroupResponse Source # | |
Generic TerminateInstanceInAutoScalingGroupResponse Source # | |
NFData TerminateInstanceInAutoScalingGroupResponse Source # | |
type Rep TerminateInstanceInAutoScalingGroupResponse Source # | |
Defined in Amazonka.AutoScaling.TerminateInstanceInAutoScalingGroup type Rep TerminateInstanceInAutoScalingGroupResponse = D1 ('MetaData "TerminateInstanceInAutoScalingGroupResponse" "Amazonka.AutoScaling.TerminateInstanceInAutoScalingGroup" "libZSservicesZSamazonka-autoscalingZSamazonka-autoscaling" 'False) (C1 ('MetaCons "TerminateInstanceInAutoScalingGroupResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "activity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Activity)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) |
newTerminateInstanceInAutoScalingGroupResponse Source #
:: Int |
|
-> TerminateInstanceInAutoScalingGroupResponse |
Create a value of TerminateInstanceInAutoScalingGroupResponse
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:activity:TerminateInstanceInAutoScalingGroupResponse'
, terminateInstanceInAutoScalingGroupResponse_activity
- A scaling activity.
$sel:httpStatus:TerminateInstanceInAutoScalingGroupResponse'
, terminateInstanceInAutoScalingGroupResponse_httpStatus
- The response's http status code.
Response Lenses
terminateInstanceInAutoScalingGroupResponse_activity :: Lens' TerminateInstanceInAutoScalingGroupResponse (Maybe Activity) Source #
A scaling activity.
terminateInstanceInAutoScalingGroupResponse_httpStatus :: Lens' TerminateInstanceInAutoScalingGroupResponse Int Source #
The response's http status code.