.. _mongocli-cloud-manager-dbusers-create:

=====================================
mongocli cloud-manager dbusers create
=====================================

.. default-domain:: mongodb

.. contents:: On this page
   :local:
   :backlinks: none
   :depth: 1
   :class: singlecol

Create a database user for your project.

Syntax
------

.. code-block::
   :caption: Command Syntax

   mongocli cloud-manager dbusers create [options]

.. Code end marker, please don't delete this comment

Options
-------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - --authDB
     - string
     - false
     - Authentication database name. This value defaults to "admin".
   * - -h, --help
     - 
     - false
     - help for create
   * - --mechanisms
     - strings
     - false
     - Authentication mechanism. Valid values are SCRAM-SHA-1 or SCRAM-SHA-256. This value defaults to [SCRAM-SHA-1].
   * - -p, --password
     - string
     - false
     - Password for the database user.
   * - --projectId
     - string
     - false
     - Hexadecimal string that identifies the project to use. This option 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.
   * - -u, --username
     - string
     - true
     - Username for authenticating to MongoDB.

Inherited Options
-----------------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - -P, --profile
     - string
     - false
     - Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.

Examples
--------

.. code-block::
   :copyable: false

   #
   
.. code-block::
   :copyable: false

   # Create a user with readWriteAnyDatabase and clusterMonitor access
   mongocli om dbuser create --username <username>  --role readWriteAnyDatabase,clusterMonitor --mechanisms SCRAM-SHA-256 --projectId <projectId>
