List of usage examples for com.amazonaws.services.autoscaling.model CreateAutoScalingGroupRequest setMinSize
public void setMinSize(Integer minSize)
The minimum size of the group.
From source file:com.pinterest.clusterservice.cm.AwsVmManager.java
License:Apache License
private void createAutoScalingGroup(String clusterName, AwsVmBean bean) throws Exception { try {// w ww . j a v a 2 s . com CreateAutoScalingGroupRequest asgRequest = new CreateAutoScalingGroupRequest(); asgRequest.setAutoScalingGroupName(clusterName); asgRequest.setLaunchConfigurationName(bean.getLaunchConfigId()); asgRequest.setVPCZoneIdentifier(bean.getSubnet()); asgRequest.setMinSize(bean.getMinSize()); asgRequest.setMaxSize(bean.getMaxSize()); aasClient.createAutoScalingGroup(asgRequest); } catch (AmazonClientException e) { LOG.error(String.format("Failed to create auto scaling group %s: %s", clusterName, e.getMessage())); throw new Exception( String.format("Failed to create auto scaling group %s: %s", clusterName, e.getMessage())); } }