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

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

Introduction

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

Prototype


public Boolean getShouldDecrementDesiredCapacity() 

Source Link

Document

Indicates whether the Auto Scaling group decrements the desired capacity value by the number of instances detached.

Usage

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

@Override
public void detachInstances(DetachInstancesRequest request) {

    if (request.getAutoScalingGroupName() == null || request.getAutoScalingGroupName().isEmpty())
        throw new IllegalArgumentException("Auto scaling group name not specified.");
    if (request.getShouldDecrementDesiredCapacity() == null)
        throw new IllegalArgumentException("Should decrement desired capacity  or not is not specified.");

    awsHttpClient.detachInstances(request);
}