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);
}
Aggregations