.. versionadded:: Fluorine

    Lists the DNS zones in all resource groups in a subscription.

    :param top: The maximum number of DNS zones to return. If not specified,
    returns up to 100 zones.

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_dns.zones_list

def zones_list(top=None, **kwargs):
    '''
    .. versionadded:: Fluorine

    Lists the DNS zones in all resource groups in a subscription.

    :param top: The maximum number of DNS zones to return. If not specified,
    returns up to 100 zones.

    CLI Example:

    .. code-block:: bash

        salt-call azurearm_dns.zones_list

    '''
    result = {}
    dnsconn = __utils__['azurearm.get_client']('dns', **kwargs)
    try:
        zones = __utils__['azurearm.paged_object_to_list'](dnsconn.zones.list(top=top))

        for zone in zones:
            result[zone['name']] = zone
    except CloudError as exc:
        __utils__['azurearm.log_cloud_error']('dns', str(exc), **kwargs)
        result = {'error': str(exc)}

    return result