I don't know about code, but I would definatly use common sense. Make sure it is GFCI protected, in conduit, weatherproof cover, wired/installed correctly, etc.
I would install it where you CAN NOT touch the water and the outlet at the same time. Maybe about 8'-10' feet away from water. This may be overkill, but I rather be safe then sorry. If you are using a pump for the pond, they usually come with really long cords, so you should be good.