refactor AutoScalingGroupImpl class to use Stream API.