Resolution of the primary plot threads, in a reasonable and plausible but mildly surprising manner.
Mind, I'm being a bit circular here: of course I'm going to find an ending "reasonable" and "plausible" if I like it. But I'm always a bit bemused at people complaining about implausibly saccharine endings, because I can't remember the last time I read a book that had one. Maybe I bail on those books early, maybe I'm lucky... but I'm far more familiar with reading books that suddenly dodge towards Ironic Tragedy at the last minute in an attempt to be "edgy" or "realistic," as if unhappy endings are somehow more plausible.
I think one of my favorite examples of a good way to end a book is Elizabeth Bear's Dust. The ending is triumphant, tragic, and almost cliffhanger like, as it finishes right as a dramatic and very dangerous huge new change is being implemented... but it's all perfectly logical and satisfying as a resolution of the primary plot threads and problems raised by the book so far. (And having it end on the start of a huge new challenge works because it's the first of a trilogy, too.)
Conversely, I have long loathed Hyperion for the way it ended, both with the final novel and with many of the individual stories within; some of the dramatic tragedy was plausible and reasonable, but some of it seemed absolutely arbitrary and used as a way to heighten the "Oh god life is TERRIBLE yes TERRIBLE and UNFAIR and WOEFUL are you horrified yet? because if not more ARBITRARY HORROR WOE WOE WOE" tone. And then it ended on a complete lack of resolution for the central question of the book. I would have been satisfied with a tragic ending; I would have been surprised and puzzled at a happy ending, unless something really clever was pulled off; stopping at a lack of ending felt like a cheap trick.
But then, I am seldom in favor of Lady Or The Tiger endings to stories. It can be very powerful if done well, but far too often comes across as cheap and lazy. As if the author couldn't figure out how to end things in a reasonable and satisfying manner, so just shrugged it off and tried to pass it off as clever to not have done the work.