# File lib/fog/aws/requests/dns/list_hosted_zones.rb, line 55
        def list_hosted_zones(options = {})

          if options[:max_items].nil?
            maxitems = 100
          else
            maxitems = options[:max_items]
          end

          if options[:marker].nil?
            start = 0
          else
            start = self.data[:zones].find_index {|z| z[:id] == options[:marker]}
          end

          zones     = self.data[:zones].values[start, maxitems]
          next_zone = self.data[:zones].values[start + maxitems]
          truncated = !next_zone.nil?

          response = Excon::Response.new
          response.status = 200
          response.body = {
            'HostedZones' => zones.map do |z|
              {
                'Id' => z[:id],
                'Name' => z[:name],
                'CallerReference' => z[:reference],
                'Comment' => z[:comment],
              }
            end,
            'Marker' => options[:marker].to_s,
            'MaxItems' => options[:max_items].to_s,
            'IsTruncated' => truncated.to_s
          }

          if truncated
            response.body['NextMarker'] = next_zone[:id]
          end

          response
        end