def __fetch_route53_zones(self):
        """Return a list of all DNS zones hosted in Route53

        Returns:
            :obj:`list` of `dict`
        """
        done = False
        marker = None
        zones = {}
        route53 = self.session.client('route53')

        try:
            while not done:
                if marker:
                    response = route53.list_hosted_zones(Marker=marker)
                else:
                    response = route53.list_hosted_zones()

                if response['IsTruncated']:
                    marker = response['NextMarker']
                else:
                    done = True

                for zone_data in response['HostedZones']:
                    zones[get_resource_id('r53z', zone_data['Id'])] = {
                        'name': zone_data['Name'].rstrip('.'),
                        'source': 'AWS/{}'.format(self.account),
                        'comment': zone_data['Config']['Comment'] if 'Comment' in zone_data['Config'] else None,
                        'zone_id': zone_data['Id'],
                        'private_zone': zone_data['Config']['PrivateZone'],
                        'tags': self.__fetch_route53_zone_tags(zone_data['Id'])
                    }

            return zones
        finally:
            del route53
def __fetch_route53_zones ( self ) : done = False marker = None zones = { } route53 = self . session . client ( 'route53' ) try : while not done : if marker : response = route53 . list_hosted_zones ( Marker = marker ) else : response = route53 . list_hosted_zones ( ) if response [ 'IsTruncated' ] : marker = response [ 'NextMarker' ] else : done = True for zone_data in response [ 'HostedZones' ] : zones [ get_resource_id ( 'r53z' , zone_data [ 'Id' ] ) ] = { 'name' : zone_data [ 'Name' ] . rstrip ( '.' ) , 'source' : 'AWS/{}' . format ( self . account ) , 'comment' : zone_data [ 'Config' ] [ 'Comment' ] if 'Comment' in zone_data [ 'Config' ] else None , 'zone_id' : zone_data [ 'Id' ] , 'private_zone' : zone_data [ 'Config' ] [ 'PrivateZone' ] , 'tags' : self . __fetch_route53_zone_tags ( zone_data [ 'Id' ] ) } return zones finally : del route53
Return a list of all DNS zones hosted in Route53

        Returns:
            :obj:`list` of `dict`