List of usage examples for com.amazonaws.services.autoscaling.model CreateAutoScalingGroupRequest setMaxSize
public void setMaxSize(Integer maxSize)
The maximum 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 {//from w w w . j ava 2 s . c o m 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())); } }