You did what you needed to do, under the circumstances. Toddlers must learn that they can't have everything they want when they want it, which is a challenging adjustment for just about all kids and parents.
And I also found my heart aching for your little guy, who was obviously suffering, so it occurs to me to gently set out this cautionary tale:
My mom was big on respect, obedience, control and discipline. To the point that her four daughters were never allowed to have our authentic feelings, or express a need that was contrary to her plans. She'd never show any empathy, and if we ever acted angry toward her or toward each other, she would employ everything from spankings, shaming, fury, and pathetic, weepy manipulation to keep us in line. All of us grew up with our feelings, needs and desires so badly mangled that we fell into relationships that were painfully like her (hence my first divorce after 15 years of misery, and a sister who has been emotionally disabled since her mid-40's). At 64, I'm still slowly and painfully learning how to be authentic, and have deep, deep resentments about my upbringing.
You don't sound like that kind of mom. But I hope you are willing, at least sometimes, to see that your son gets something that he wants that urgently. I wonder if you had said, "Let's go up and get your shoes on so we can go out," how he might have felt delighted instead of cross. Wanting to be out in fresh air and sunlight is a really healthy impulse, and I'd be inclined to support it if possible.
Suggestion: check out Dr. Karp's fine book, The Happiest Toddler on the Block. Actually, your story sounds quite a bit like his empathy technique, so perhaps you already have. And when he's just a little older, you can also use the wonderful processes taught in How to Talk So Kids Will Listen, and Listen So Kids Will Talk, by Faber and Mazlish. This is my favorite, most practical parenting book ever. Incredibly effective with my 6yo grandboy for the past 3.5 years!