Example usage for com.amazonaws.services.autoscaling.model TerminateInstanceInAutoScalingGroupRequest getShouldDecrementDesiredCapacity

List of usage examples for com.amazonaws.services.autoscaling.model TerminateInstanceInAutoScalingGroupRequest getShouldDecrementDesiredCapacity

Introduction

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

Prototype


public Boolean getShouldDecrementDesiredCapacity() 

Source Link

Document

Indicates whether terminating the instance also decrements the size of the Auto Scaling group.

Usage

From source file:web.component.impl.aws.AWSAutoScalingImpl.java

@Override
public TerminateInstanceInAutoScalingGroupResult terminateInstanceInAutoScalingGroup(
        TerminateInstanceInAutoScalingGroupRequest request) {

    if (request.getInstanceId() == null || request.getInstanceId().isEmpty())
        throw new IllegalArgumentException("Instance ID not specified.");
    if (request.getShouldDecrementDesiredCapacity() == null)
        throw new IllegalArgumentException("Whether decrease desired capacity or not is not specified.");

    return awsHttpClient.terminateInstanceInAutoScalingGroup(request);
}