List of usage examples for com.amazonaws.services.autoscaling.model SetInstanceProtectionRequest setProtectedFromScaleIn
public void setProtectedFromScaleIn(Boolean protectedFromScaleIn)
Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when scaling in.
From source file:com.pinterest.arcee.autoscaling.AwsAutoScalingManager.java
License:Apache License
private void setInstanceProtection(Collection<String> instances, String groupName, boolean protect) throws Exception { SetInstanceProtectionRequest setInstanceProtectionRequest = new SetInstanceProtectionRequest(); setInstanceProtectionRequest.setAutoScalingGroupName(groupName); setInstanceProtectionRequest.setInstanceIds(instances); setInstanceProtectionRequest.setProtectedFromScaleIn(protect); aasClient.setInstanceProtection(setInstanceProtectionRequest); }