List of usage examples for com.amazonaws.services.autoscaling.model SetInstanceProtectionRequest SetInstanceProtectionRequest
SetInstanceProtectionRequest
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); }