I find the privileges and roles section of the document to be less explicit than I would hope it to be.
Specific example:
I have a sharded cluster (with replica sets). In the sharded cluster I have a database named XDB that has a collection named YCOLL. The collection is a GridFS collection, so we see collections YCOLL.chunks and YCOLL.files.
I would llike to create a roled named ZROLE, and a user named WUSER. I know how to create the user and grant the role to the user. I would like the user to be able to perform this action: db.YCOLL.chunks.getShardDistribution ()
With db.grantPrivilegesToRole() https://docs.mongodb.com/manual/reference/method/db.grantPrivilegesToRole
I can grant an action to the role ZROLE. How do I know which action to grant to the role, to allow the user to do a getShardDistribution ?