mongocli ops-manager dbuser delete
The dbuser delete
command deletes a MongoDB database user
from the specified Ops Manager
clusters in the given project. You can also
delete a MongoDB database user through the Ops Manager
UI.
mongocli
requests a confirmation from the user before sending the
delete
command to Ops Manager
.
Syntax
mongocli ops-manager dbuser delete <username> --authDB [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ]
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? |
--authDB | string | Name of the authentication database for this user. Defaults to
admin . | no |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private
keys for the project are saved. If omitted, uses the
default profile. To learn more about creating a
profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
<username> | string | Username for authenticating the user to MongoDB. | yes |
Output
A successful dbuser delete
command returns an in-progress status message
with a link to your Ops Manager
topology page.
Example
The example below uses the mongocli ops-manager dbuser delete
command to
delete a MongoDB database user with the username user1
.
The command uses the default profile to access Ops Manager
.
mongocli ops-manager dbuser delete user1