pete Spinebot's answer is correct assuming functionality up to version 4.2, but please note that the situation has changed significantly with the major enhancements to transform constraints and the addition of the new Slider feature in 4.3-beta!
For an overview of the improvements to transform constraints functionality, please refer to our blog post:
https://esotericsoftware.com/blog/The-4.3-beta-is-now-available
One option I'd especially like you to pay attention to is Clamp
, which allows you to restrict constrained bone values so they don't exceed a specific range. By applying this to the IK target bone, you can limit the range within which the IK target bone can move.
Sliders offer a different approach, but they can also be used when you want to limit the range of a bone's transformation. While detailed documentation is not yet available, you can try 4.3-beta yourself anytime, so we'd be delighted if you could give it a try.