def get_config_version_tags(config, cluster, ambari_session, config_element):
    """
    Returns a list of tuples (tag, version) that Ambari knows about the config_element
    """
    ambari_url = config['ambari']['protocol'] + '://' +\
        config['ambari']['host'] + ':' + config['ambari']['port']
    r = ambari_session.get(ambari_url + '/api/v1/clusters/' + cluster +
                           '/configurations?type=' + config_element)
    tp = list()
    for e in r.json()['items']:
        tp.append((e['tag'],e['version']))
    return tp