Docs Menu
Docs Home
/ /
MongoDB Command Line Interface
/ / /

mongocli atlas dbusers update

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples

Update a database user for your project.

mongocli atlas dbusers update <username> [options]
Name
Type
Required
Description
-h, --help
false
help for update
-o, --output
string
false
Output format. Valid values: json|json-path|go-template|go-template-file
-p, --password
string
false
User’s password.
--projectId
string
false
Project ID to use. Overrides configuration file or environment variable settings.
--role
strings
false
User's roles and the databases or collections on which the roles apply.
--scope
strings
false
Array of clusters and Atlas Data Lakes that this user has access to.
-u, --username
string
false
Username for authenticating to MongoDB.
Name
Type
Required
Description
-P, --profile
string
false
Profile to use from your configuration file.
Update roles for a user
$ mongocli atlas dbuser update <username> --role readWriteAnyDatabase --projectId <projectId>
Update scopes for a user
$ mongocli atlas dbuser update <username> --scope resourceName:resourceType --projectId <projectId>

Auto generated by cobra2snooty on 13-Jul-2021

Back

list