That's somewhat tough to answer without knowing the town, state or even country where you live.
Generally, you'd need at least an electrical permit, but if it's a permanent structure (brick would likely qualify), that might also require a construction permit for the structure with setback, location requirements. While many of the EVSEs out there are rated for exposure outside, that doesn't mean they cannot be stolen. But, attaching them and then using tamperproof screws may be enough, but it won't prevent them from cutting off the cable. Europe tends to have EVSEs with separate cables, although some are also available with them tethered to the EVSE. I have not seen one sold for the USA that uses a separate cable, but I suppose it could be modified for one, but it may then no longer have the UL rating, which could be a problem.
Assuming you're going to trench the power, you'd want to call digsafe (free) to ensure you don't run into any problems. If you don't, and you damage something, you're liable.