The ability of ecosystems to withstand disturbance or change, while maintaining their structure and function.