class EC2RaiderImpl implements EC2Raider {

    @Deprecated
    public void terminateEc2InstancesByTags(String... tagName) {
        List<String> instanceIds = new ArrayList<String>();

        DescribeInstancesRequest request = new DescribeInstancesRequest();

        Filter filter1 = new Filter("tag:Name", Arrays.asList(tagName));

        DescribeInstancesResult result = ec2Delegator.getEc2().describeInstances(request.withFilters(filter1));
        List<Reservation> reservations = result.getReservations();

        for (Reservation reservation : reservations) {
            List<Instance> instances = reservation.getInstances();


            for (Instance instance : instances) {
                instanceIds.add(instance.getInstanceId());
            }
        }

        if (instanceIds.isEmpty()) {
            throw new ResourceNotFoundException("No Instances are avaialble");
        }

        TerminateInstancesRequest request1 = new TerminateInstancesRequest().withInstanceIds(instanceIds);
        TerminateInstancesResult response = ec2Delegator.getEc2().terminateInstances(request1);

    }

    public  EC2RaiderImpl();

}