The variety of living organisms within an ecosystem, comprising genetic, species, and ecological diversity.