Beside the translation in Z you can do everything with regular boundary conditions.
The translation in -Z should be free and +Z is not allowed, right?
Well, that kind of difference within one degree of freedom cannot be defined directly. Actually that is a contact condition. So define a rigid plane, place it the correct location, constrain it and define a contact with your part.
The only other possibility is a connector element with a connector stop condition as behavior.