public static void deleteAutoScalingGroup() {

    DeleteAutoScalingGroupRequest request = new DeleteAutoScalingGroupRequest();
    request.setAutoScalingGroupName("ProjectTwoAutoScaleGroup");
    request.setForceDelete(true);
    scaleClient.deleteAutoScalingGroup(request);
  }
Ejemplo n.º 2
0
 /** {@inheritDoc} */
 @Override
 public void deleteAutoScalingGroup(String asgName) {
   Validate.notEmpty(asgName);
   LOGGER.info(String.format("Deleting auto-scaling group with name %s.", asgName));
   AmazonAutoScalingClient asgClient = asgClient();
   DeleteAutoScalingGroupRequest request =
       new DeleteAutoScalingGroupRequest().withAutoScalingGroupName(asgName);
   asgClient.deleteAutoScalingGroup(request);
 }