Example usage for com.amazonaws.services.autoscaling.model SetInstanceProtectionRequest setInstanceIds

List of usage examples for com.amazonaws.services.autoscaling.model SetInstanceProtectionRequest setInstanceIds

Introduction

In this page you can find the example usage for com.amazonaws.services.autoscaling.model SetInstanceProtectionRequest setInstanceIds.

Prototype


public void setInstanceIds(java.util.Collection<String> instanceIds) 

Source Link

Document

One or more instance IDs.

Usage

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);
}