at the whim of (someone)
idiomDefinition of at the whim of (someone)
: when (someone) wishes, desires, or decides something often in a sudden way
The shop is only open at the whim of the owner.