Skip to content

Commit 6c80898

Browse files
DOCSP-12043 doc for iam projects users delete command (#250)
* DOCSP-12043 doc for iam projects users delete command DOCSP-12043 self-review * DOCSP-12043 updates for copy review feedback
1 parent 24f4045 commit 6c80898

File tree

2 files changed

+151
-0
lines changed

2 files changed

+151
-0
lines changed
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
.. _iam-project-user-delete:
2+
3+
==================================
4+
mongocli iam projects users delete
5+
==================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
The ``mongocli iam projects users delete`` command deletes a user
16+
in the MongoDB service project. You can also delete users in your
17+
MongoDB service project using the:
18+
19+
- |service| :atlas:`UI
20+
</access/manage-project-access/#remove-users-or-teams-from-a-project>` and
21+
:atlas:`API </reference/api/project-remove-user/>`
22+
- |cloud-short| :cloudmgr:`UI
23+
</tutorial/manage-users/#remove-users-or-teams-from-a-project>` and :cloudmgr:`API </reference/api/groups/remove-one-user-from-one-group/>`
24+
- |onprem| :opsmgr:`UI
25+
</tutorial/manage-users/#remove-users-or-teams-from-a-project>` and
26+
:opsmgr:`API </reference/api/groups/remove-one-user-from-one-group/>`
27+
28+
.. _iam-project-user-delete-cmd-permissions:
29+
30+
Permissions Required
31+
--------------------
32+
33+
The following table shows the role you must have to delete a user from
34+
the MongoDB service project.
35+
36+
.. list-table::
37+
:header-rows: 1
38+
:widths: 40 60
39+
40+
* - MongoDB Service
41+
- Role
42+
43+
* - |service|
44+
- :atlas:`Project Owner </reference/user-roles/#Project-Owner>`
45+
46+
* - |cloud-short|
47+
- :cloudmgr:`Project Owner </reference/user-roles/#Project-Owner>`
48+
49+
* - |onprem|
50+
- :opsmgr:`Project Owner </reference/user-roles/#Project-Owner>`
51+
52+
.. _mcli-iam-project-user-delete-syntax:
53+
54+
Syntax
55+
------
56+
57+
.. code-block:: text
58+
59+
mongocli iam projects users delete <user-id>
60+
[ --force ]
61+
[ --profile|-P <profile-name> ]
62+
[ --projectId <project-ID> ]
63+
64+
.. include:: /includes/fact-command-line-help.rst
65+
66+
.. _mcli-iam-project-user-delete-args:
67+
68+
Arguments
69+
---------
70+
71+
.. list-table::
72+
:header-rows: 1
73+
:widths: 20 10 60 10
74+
75+
* - Argument
76+
- Type
77+
- Description
78+
- Required?
79+
80+
* - ``<user-id>``
81+
- string
82+
- Unique identifier of the user you want to delete from the project.
83+
You can run the :ref:`iam-project-user-list` command to retrieve
84+
the user's ID.
85+
- yes
86+
87+
.. _mcli-iam-project-user-delete-options:
88+
89+
Options
90+
-------
91+
92+
.. list-table::
93+
:header-rows: 1
94+
:widths: 20 10 60 10
95+
96+
* - Option
97+
- Type
98+
- Description
99+
- Required?
100+
101+
* - ``--force``
102+
-
103+
- Flag that indicates that the project-user can be deleted without
104+
requiring confirmation.
105+
- no
106+
107+
* - ``--profile``, ``-P``
108+
- string
109+
- Name of the profile that contains the access information. If
110+
omitted, uses the {+default-profile+}.
111+
- no
112+
113+
* - ``--projectId``
114+
- string
115+
- Unique identifier of the project. If omitted, uses the specified
116+
profile for accessing the MongoDB service.
117+
- no
118+
119+
.. _mcli-iam-project-user-delete-output:
120+
121+
Output
122+
------
123+
124+
The command prints the following output to the terminal if the command succeeds.
125+
If the command returns errors, see :ref:`Troubleshooting <troubleshooting>`
126+
for recommended solutions.
127+
128+
.. code-block:: none
129+
130+
User '<user-id>' deleted from the project
131+
132+
.. _mcli-iam-project-user-delete-examples:
133+
134+
Example
135+
-------
136+
137+
The following command deletes a user with ID ``5e44445ef10fab20b49c0f31``
138+
in an |service| project. It uses the {+default-profile+} for accessing
139+
|service|.
140+
141+
.. code-block:: text
142+
143+
mongocli iam projects users delete 5e44445ef10fab20b49c0f31 --force
144+
145+
The previous command prints the following to the terminal.
146+
147+
.. code-block:: none
148+
:copyable: false
149+
150+
User '5e44445ef10fab20b49c0f31' deleted from the project

source/reference/iam/user-commands.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ User Commands
2020
List Project Users <iam-project-user-list>
2121
Describe a User <iam-user-describe>
2222
Delete One Ops Manager User <iam-user-delete>
23+
Delete Project Users <iam-project-user-delete>

0 commit comments

Comments
 (0)