mongocli atlas dbusers update
On this page
mongocli atlas
commands are now deprecated because there's a new, dedicated CLI available for Atlas users. Migrate to the Atlas CLI to enjoy the same capabilities and the latest features. You can use mongocli atlas
commands until April 30, 2023.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 are json, json-path, go-template, or go-template-file. |
-p, --password | string | false | User's password. |
--projectId | string | false | Project ID to use. Overrides the settings in the configuration file or environment variable. |
--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>