Hi,
you need two/three fsm to make it very easy, one for rotating horyzontaly and one vertically ( when you'll get more expert, you can do it in one), one for constraint.
on key down, rotate incrementally every frame and listen to the key up meanwhile which will transit back to the state where you listen to the key down.
by doing so, you can't really manage two keys in one fsm ( as an Fsm can only have active state at a time).
if you feel adventurous and want to do in one fsm, one state, use GetAxisVector which give you a two axis definition, inject the result into the "Rotate" action.
For constraint, please check the Space shooter UnityLearn remake 100% in PlayMaker, it shows how to constraint the ship within an area, use the same technic for rotation:
-- get the rotation
-- clamp the rotation
-- set the rotation
the key is to use the Advanced version of theses actions ( found on the ecosystem), because you must do this on late update for no jitter to be visible else you'll have a race condition between your key willing to rotate passed the limit and the constraint bringing it back.
Let me know how it goes
Bye,
Jean