Search in sources :

Example 1 with DeleteAutoScalingGroupRequest

use of com.amazonaws.services.autoscaling.model.DeleteAutoScalingGroupRequest in project incubator-gobblin by apache.

the class AWSSdkClient method deleteAutoScalingGroup.

/**
 * Delete an auto scaling group by its name
 *
 * @param autoScalingGroupName Name of auto scaling group to delete
 * @param shouldForceDelete If the AutoScalingGroup should be deleted without waiting for instances to terminate
 */
public void deleteAutoScalingGroup(String autoScalingGroupName, boolean shouldForceDelete) {
    final AmazonAutoScaling autoScaling = getAmazonAutoScalingClient();
    final DeleteAutoScalingGroupRequest deleteLaunchConfigurationRequest = new DeleteAutoScalingGroupRequest().withAutoScalingGroupName(autoScalingGroupName).withForceDelete(shouldForceDelete);
    autoScaling.deleteAutoScalingGroup(deleteLaunchConfigurationRequest);
    LOGGER.info("Deleted AutoScalingGroup: " + autoScalingGroupName);
}
Also used : DeleteAutoScalingGroupRequest(com.amazonaws.services.autoscaling.model.DeleteAutoScalingGroupRequest) AmazonAutoScaling(com.amazonaws.services.autoscaling.AmazonAutoScaling)

Aggregations

AmazonAutoScaling (com.amazonaws.services.autoscaling.AmazonAutoScaling)1 DeleteAutoScalingGroupRequest (com.amazonaws.services.autoscaling.model.DeleteAutoScalingGroupRequest)1