Read status of import json and parse
        :param task_json: status json to parse
        :return: (stillRunning, imageId)

def check_task_status_and_id(task_json):
        """
        Read status of import json and parse
        :param task_json: status json to parse
        :return: (stillRunning, imageId)
        """
        if task_json.get('ImportImageTasks') is not None:
            task = task_json['ImportImageTasks'][0]
        else:
            task = task_json

        current_status = task['Status']
        image_id = task['ImportTaskId']
        if current_status == 'completed':
            print "The import has completed succesfully as ID: {}".format(image_id)
            return False, image_id
        elif current_status == 'deleting':
            print "The import job has been cancelled for some reason"
            return False, None
        elif current_status == 'deleted':
            print "The import job was cancelled"
            return False, None
        else:
            print "The current import job for id {} status is: {}".format(image_id, current_status)
            print "sleeping for 30 seconds"
            time.sleep(30)
            return True, image_id