It's best if we refrain from what local jurisdictions may require and only post requirements from the National Electrical Code (NEC). Most jurisdictions which have adopted code will start with the NEC and may have a few amendments that are more stringent.
Regarding the 2017 NEC, Article 680 covers Swimming Pools, Fountains, and Similar Installations. Based on that article, there must be general-purpose, 125-volt, 15- or 20-ampere receptacle no less than 6 feet and no more than 20 feet from the inside wall of the pool. Receptacles for the pump or other loads for circulation and/or sanitation must be no less than 6 feet from the inside wall. Any outlet, including the two I just mention, within 20 feet of the inside wall must be GFCI protected.
The article also says the pool-associated motors may use cord-and-plug connections with a maximum cord length of 3 feet. It does not specify twist-lock.