The variety of living organisms in a given ecosystem, including genetic, species and functional diversity.