at Her/His Majesty's pleasure
US /æt hər/hɪz ˈmædʒɪstiz ˈplɛʒər/
UK /æt hər/hɪz ˈmædʒɪstiz ˈplɛʒər/

1.
(of a period of detention or employment) for an indefinite period, dependent on the will of the monarch or government
:
•
The prisoner was sentenced to be detained at Her Majesty's pleasure.
•
He holds his position at His Majesty's pleasure, meaning he can be dismissed at any time.