The "king's
dharma," or religious responsibility, that fell to him (or, considerably
more rarely, to her) as a result of his position as monarch.
This idea arose from the dharma literature's belief that
each person had a distinct function to perform in society, one that supported
societal stability while also bringing individual satisfaction.
The king's most fundamental responsibility was to keep the
kingdom in order, since this allowed everyone else to perform their own
religious obligations (svadharma).
The dharma literature views preserving order as primarily a
matter of imposing punishment (danda), with the goal of removing some bad
actors and scaring the remainder into good conduct.
If the monarch was successful in maintaining social order,
he was free to do what he wanted, with the caveat that taxes should not be too
high, since this would be costly to the people.
Aside from that, the Indian kingship notion was primarily
pragmatic.
You may also want to read more about Hinduism here.
Be sure to check out my writings on religion here.