  We characterize the groupoids for which an operator is Fredholm if, and only
if, its principal symbol and all its boundary restrictions are invertible. A
groupoid with this property is called {\em Fredholm}. Using results on the
Effros-Hahn conjecture, we show that an almost amenable, Hausdorff, second
countable groupoid is Fredholm. Many groupoids, and hence many
pseudodifferential operators appearing in practice, fit into this framework. In
particular, one can use these results to characterize the Fredholm operators on
manifolds with cylindrical and poly-cylindrical ends, on manifolds that are
asymptotically Euclidean or asymptotically hyperbolic, on products of such
manifolds, and on many others. Moreover, we show that the desingularization of
Lie groupoids preserves the class of Fredholm groupoids.
