Example usage for com.amazonaws.services.autoscaling.model SetDesiredCapacityRequest getDesiredCapacity

List of usage examples for com.amazonaws.services.autoscaling.model SetDesiredCapacityRequest getDesiredCapacity

Introduction

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

Prototype


public Integer getDesiredCapacity() 

Source Link

Document

The number of EC2 instances that should be running in the Auto Scaling group.

Usage

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

@Override
public void setDesiredCapacity(SetDesiredCapacityRequest request) {

    if (request.getAutoScalingGroupName() == null || request.getAutoScalingGroupName().isEmpty())
        throw new IllegalArgumentException("Auto scaling group name not specified.");
    if (request.getDesiredCapacity() == null)
        throw new IllegalArgumentException("Desired capacity not specified.");

    awsHttpClient.setDesiredCapacity(request);
}