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 category | Supported | Not supported |
|---|---|---|
| Aggregation commands | aggregate, distinct, count, mapReduce | group — not supported in MongoDB 3.4 and later |
| Geospatial commands | geoNear, geoSearch | None |
| Query and write operation commands | insert, update, delete, findAndModify, getLastError, getPrevError, resetError, parallelCollectionScan | eval — not supported in MongoDB 3.0; removed in MongoDB 4.2 |
| Query plan cache commands | planCacheListFilters, planCacheSetFilter, planCacheClearFilters, planCacheListQueryShapes, planCacheListPlans, planCacheClear | None |
| Authentication | logout, authenticate | authSchemaUpgrade, copydbgetnonce, getnonce — getnonce is not supported in MongoDB 4.0 and later |
| User management commands | createUser, updateUser, dropUser, dropAllUsersFromDatabase, grantRolesToUser, revokeRolesFromUser, usersInfo | None |
| Role management commands | createRole, updateRole, dropRole, dropAllRolesFromDatabase, grantPrivilegesToRole, revokePrivilegesFromRole, grantRolesToRole, revokeRolesFromRole, rolesInfo, invalidateUserCache | None |
| Diagnostic commands | explain, 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 commands | renameCollection, dropDatabase, listCollections, drop, create, cloneCollectionAsCapped, convertToCapped, filemd5, createIndexes, listIndexes, dropIndexes, fsync, connectionStatus, collMod, reIndex, touch, getParameter, compact | copydb, clone, clean, shutdown, logRotate, repairDatabase, repairCursor, setParameter, connPoolSync, cloneCollection |
| Replication commands | isMaster, applyOps | replSetInitiate, replSetFreeze, replSetMaintenance, replSetGetConfig, replSetRequestVotes, replSetReconfig, replSetStepDown, replSetSyncFrom, replSetElect, replSetUpdatePosition, resync, appendOplogNote |
| Sharding commands | None | addShard, 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}).