All Products
Search
Document Center

ApsaraDB for MongoDB:What commands are supported and not supported by ApsaraDB for MongoDB?

Last Updated:Mar 28, 2026

For the full list of MongoDB commands, see MongoDB commands.

The following table lists the commands supported and not supported in ApsaraDB for MongoDB.

Command categorySupportedNot supported
Aggregation commandsaggregate, distinct, count, mapReducegroup — not supported in MongoDB 3.4 and later
Geospatial commandsgeoNear, geoSearchNone
Query and write operation commandsinsert, update, delete, findAndModify, getLastError, getPrevError, resetError, parallelCollectionScaneval — not supported in MongoDB 3.0; removed in MongoDB 4.2
Query plan cache commandsplanCacheListFilters, planCacheSetFilter, planCacheClearFilters, planCacheListQueryShapes, planCacheListPlans, planCacheClearNone
Authenticationlogout, authenticateauthSchemaUpgrade, copydbgetnonce, getnoncegetnonce is not supported in MongoDB 4.0 and later
User management commandscreateUser, updateUser, dropUser, dropAllUsersFromDatabase, grantRolesToUser, revokeRolesFromUser, usersInfoNone
Role management commandscreateRole, updateRole, dropRole, dropAllRolesFromDatabase, grantPrivilegesToRole, revokePrivilegesFromRole, grantRolesToRole, revokeRolesFromRole, rolesInfo, invalidateUserCacheNone
Diagnostic commandsexplain, listDatabases, dbHash, listCommands, availableQueryOptions, buildInfo, collStats, dbStats, cursorInfo, dataSize, ping, profile, top, whatsmyuri, serverStatus, features, isSelf, validate, netstat, hostInfo¹, currentConn²driverOIDTest, connPoolStats, shardConnPoolStats, getCmdLineOpts, diagLogging
Instance administration commandsrenameCollection, dropDatabase, listCollections, drop, create, cloneCollectionAsCapped, convertToCapped, filemd5, createIndexes, listIndexes, dropIndexes, fsync, connectionStatus, collMod, reIndex, touch, getParameter, compactcopydb, clone, clean, shutdown, logRotate, repairDatabase, repairCursor, setParameter, connPoolSync, cloneCollection
Replication commandsisMaster, applyOpsreplSetInitiate, replSetFreeze, replSetMaintenance, replSetGetConfig, replSetRequestVotes, replSetReconfig, replSetStepDown, replSetSyncFrom, replSetElect, replSetUpdatePosition, resync, appendOplogNote
Sharding commandsNoneaddShard, removeShard, getShardVersion, setShardVersion, unsetSharding, checkShardingIndex

Notes:

¹ hostInfo is supported in Mongodb_20190725_1.1.8 and later. It is not supported in Mongodb_20190409_1.1.7 and earlier.

² currentConn is a command developed specifically for ApsaraDB for MongoDB. Use it to view the current connection status of an instance. Example: db.adminCommand({currentConn:1}).