Code compliance for outdoor 20 amp receptacle?
For an outdoor 20 ampere circuit, you'll need a 


20 ampere breaker, obviously. 
Minimum 12 AWG conductors. 
GFCI protection either via a breaker, standalone device, or receptacle.
Weather-resistant type receptacle.
A weatherproof in-use receptacle cover (identified as "extra-duty").


If the box is not in the wall, you'll also need


A weatherproof enclosure.
Wet location rated protection of the wires via conduit, rated cable sheath, or other approved raceway.