I’m trying to execute admin commands from Atlas Serverless Functions, I’m unable to figure out how to execute admin commands such as
The docs explain the use of
admin() which returns an instance of
AdminDatabase but it’s unclear how to execute commands through this object.
The mongodb.admin() method returns an AdminDatabase object. The object contains helper methods that wrap a subset of MongoDB database commands. See admin.getDBNames()
But doesn’t expand on any additional functions/commands.
I would expect that I’d be able to execute commands like
Any additional guidance would be much appreciated.