mongocli atlas dbusers update
On this page
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoCLI.
Update a database user for your project.
Syntax
mongocli atlas dbusers update <username> [options]
Arguments
Name | Type | Required | Description |
---|---|---|---|
username | string | false | Username to update in the MongoDB database. |
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. |
Inherited Options
Name | Type | Required | Description |
---|---|---|---|
-P, --profile | string | false | Profile to use from your configuration file. |
Examples
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>