I am currently trying to run the following commend on my one atlas cluster
use admin
db.runCommand( {
setClusterParameter:
{ changeStreamOptions: { preAndPostImages: { expireAfterSeconds: 100 } } }
} )
I want use db.watch() to save change logs to the db. I am however getting the following error when trying to run the above command
MongoServerError: not authorized on admin to execute command { setClusterParameter: { changeStreamOptions: { preAndPostImages: { expireAfterSeconds: 100 } } }, lsid: { id: UUID("a33462c1-2419-4a35-947f-3ae2c7d9e127") }, $clusterTime: { clusterTime: Timestamp(1669886477, 1), signature: { hash: BinData(0, C321D3B73BFD8D05FAD472201BEB5D2EFB037F23), keyId: 7139683256089182213 } }, $db: "admin" }
The cluster is on the Atlas M10 tier, in the AWS / Cape Town (af-south-1) region.
Any help will be greatly appreciated.