| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.AutoScaling.SetInstanceProtection
Description
Updates the instance protection settings of the specified instances. This operation cannot be called on instances in a warm pool.
For more information about preventing instances that are part of an Auto Scaling group from terminating on scale in, see Using instance scale-in protection in the Amazon EC2 Auto Scaling User Guide.
If you exceed your maximum limit of instance IDs, which is 50 per Auto Scaling group, the call fails.
Synopsis
- data SetInstanceProtection = SetInstanceProtection' {}
- newSetInstanceProtection :: Text -> Bool -> SetInstanceProtection
- setInstanceProtection_instanceIds :: Lens' SetInstanceProtection [Text]
- setInstanceProtection_autoScalingGroupName :: Lens' SetInstanceProtection Text
- setInstanceProtection_protectedFromScaleIn :: Lens' SetInstanceProtection Bool
- data SetInstanceProtectionResponse = SetInstanceProtectionResponse' {
- httpStatus :: Int
- newSetInstanceProtectionResponse :: Int -> SetInstanceProtectionResponse
- setInstanceProtectionResponse_httpStatus :: Lens' SetInstanceProtectionResponse Int
Creating a Request
data SetInstanceProtection Source #
See: newSetInstanceProtection smart constructor.
Constructors
| SetInstanceProtection' | |
Fields
| |
Instances
newSetInstanceProtection Source #
Arguments
| :: Text | |
| -> Bool | |
| -> SetInstanceProtection |
Create a value of SetInstanceProtection 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:SetInstanceProtection', setInstanceProtection_instanceIds - One or more instance IDs. You can specify up to 50 instances.
SetInstanceProtection, setInstanceProtection_autoScalingGroupName - The name of the Auto Scaling group.
SetInstanceProtection, setInstanceProtection_protectedFromScaleIn - Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
Request Lenses
setInstanceProtection_instanceIds :: Lens' SetInstanceProtection [Text] Source #
One or more instance IDs. You can specify up to 50 instances.
setInstanceProtection_autoScalingGroupName :: Lens' SetInstanceProtection Text Source #
The name of the Auto Scaling group.
setInstanceProtection_protectedFromScaleIn :: Lens' SetInstanceProtection Bool Source #
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
Destructuring the Response
data SetInstanceProtectionResponse Source #
See: newSetInstanceProtectionResponse smart constructor.
Constructors
| SetInstanceProtectionResponse' | |
Fields
| |
Instances
newSetInstanceProtectionResponse Source #
Create a value of SetInstanceProtectionResponse 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:httpStatus:SetInstanceProtectionResponse', setInstanceProtectionResponse_httpStatus - The response's http status code.
Response Lenses
setInstanceProtectionResponse_httpStatus :: Lens' SetInstanceProtectionResponse Int Source #
The response's http status code.