This is an extra rain cover for outdoor mains sockets and switches (which are usually already IP44 rated).
UV-resistant filament is preferrable
Just print it and screw it to the wall using a pair of screws. Use an outdoor UV-resistant silicone sealant between the wall and the cover.
In the case if your plastic is not UV-resistant, paint it with some UV-resistant paint before attaching to the wall.
In my case, when I printed the socket cover with ABS, and used it unpainted, it survived for only 1 year (it become brittle, and finally desintegrated). After printing the cover with the same plastic and covering with acrylic UV-resistant paint, it stays ok for more than 2 years.