Navigation

mongocli atlas dbusers create

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples

Create a database user for your project.

mongocli atlas dbusers create [options]
Name
Type
Required
Description
--awsIAMType
string
false
AWS IAM method by which the provided username is authenticated. Valid values: NONE|USER|ROLE. (default "NONE")
--deleteAfter
string
false
Timestamp in ISO 8601 date and time format in UTC after which Atlas deletes the user.
-h, --help
false
help for create
--ldapType
string
false
LDAP method by which the provided username is authenticated. Valid values: NONE|USER|GROUP. (default "NONE")
-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
true
Username for authenticating to MongoDB.
--x509Type
string
false
X.509 method by which the provided username is authenticated. Valid values: NONE|MANAGED|CUSTOMER. (default "NONE")
Name
Type
Required
Description
-P, --profile
string
false
Profile to use from your configuration file.
Create an Atlas admin user
$ mongocli atlas dbuser create atlasAdmin --username <username> --projectId <projectId>
Create user with read/write access to any database
$ mongocli atlas dbuser create readWriteAnyDatabase --username <username> --projectId <projectId>
Create user with multiple roles
$ mongocli atlas dbuser create --username <username> --role clusterMonitor,backup --projectId <projectId>
Create user with multiple scopes
$ mongocli atlas dbuser create --username <username> --role clusterMonitor --scope clusterName:CLUSTER,DataLakeName:DATA_LAKE --projectId <projectId>

Auto generated by cobra2snooty on 13-Jul-2021

Give Feedback

On this page

  • Syntax
  • Options
  • Inherited Options
  • Examples