Skip to content

Commit 475caff

Browse files
(DOCSP-10670)(DOCSP-10671): List and delete organizations (#119)
* (DOCSP-10670): list organizations * (DOCSP-10671): Delete organizations * Add to TOC * Cleanup * Copy & tech review * Tech review 2
1 parent 2048c58 commit 475caff

File tree

6 files changed

+193
-152
lines changed

6 files changed

+193
-152
lines changed

source/reference/access.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
``iam``
1616
-------
1717

18-
The mongocli ``iam`` command allows you to create organizations and
19-
list, create, and delete projects in a specified organization.
18+
You can use the mongocli ``iam`` command to manage projects in your
19+
|service| instance, or manage organizations and projects in your |com|
20+
instance.
2021

2122
- :ref:`Create an organization <mcli-iam-organization-create>`
22-
- :ref:`List projects <mcli-iam-project-list>`
23+
- :ref:`List an organization <mcli-iam-organization-list>`
24+
- :ref:`Delete an organization <mcli-iam-organization-delete>`
2325
- :ref:`Create a project <mcli-iam-project-create>`
26+
- :ref:`List projects <mcli-iam-project-list>`
2427
- :ref:`Delete a project <mcli-iam-project-delete>`
2528

2629
.. class:: hidden
@@ -29,6 +32,8 @@ list, create, and delete projects in a specified organization.
2932
:titlesonly:
3033

3134
Create an Organization </reference/iam-organization-create>
32-
List Projects </reference/iam-project-list>
35+
List an Organization </reference/iam-organization-list>
36+
Delete an Organization </reference/iam-organization-delete>
3337
Create a Project </reference/iam-project-create>
38+
List Projects </reference/iam-project-list>
3439
Delete a Project </reference/iam-project-delete>

source/reference/iam-organization-create.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Syntax
2424

2525
.. code-block:: text
2626

27-
mongocli iam organizations|organization create <organization-name>
27+
mongocli iam organization|organizations|org|orgs create <organization-name>
2828
[ --profile|-P <profile-name> ]
2929

3030
.. important::
@@ -54,7 +54,10 @@ Options
5454

5555
You must have credentials with the ``Global Owner`` role to
5656
create an organization. You can use either a
57-
*Global API key pair* or a *Personal API key*:
57+
:opsmgr:`Global API key pair
58+
</reference/api/global-api-keys/index.html#global-programmatic-api-keys>` or
59+
a :opsmgr:`Personal API key
60+
</tutorial/configure-public-api-access/#personal-api-keys-deprecated>`:
5861

5962
.. list-table::
6063
:header-rows: 1
@@ -77,7 +80,7 @@ Options
7780
- ``"ops-manager"`` for an |onprem| organization, or
7881
- ``"cloud-manager"`` for a |cloud-short| organization.
7982

80-
If omitted, uses the ``default`` profile. To learn more about
83+
If omitted, uses the {+default-profile+}. To learn more about
8184
creating a profile, see :ref:`mcli-configure`.
8285

8386
- no
@@ -116,7 +119,7 @@ Examples
116119
--------
117120

118121
The following command creates an |onprem| organization called
119-
``myOrg`` using the default profile, which contains the
122+
``myOrg`` using the {+default-profile+}, which contains the
120123
``Global Owner`` credentials and specifies the |onprem| service:
121124

122125
.. code-block:: text
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
.. _mcli-iam-organization-delete:
2+
3+
================================
4+
mongocli iam organization 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 organization delete`` command deletes an organization
16+
in your |onprem| instance.
17+
18+
To run this command you must have the following permissions based on your |api| Key type:
19+
20+
.. list-table::
21+
:widths: 50 50
22+
:header-rows: 1
23+
24+
* - API Key Type
25+
- Role
26+
27+
* - Global API Keys
28+
- ``Global Owner``
29+
30+
* - Personal API Keys
31+
- ``Organization Owner``
32+
33+
.. _mcli-iam-organization-delete-syntax:
34+
35+
Syntax
36+
------
37+
38+
.. code-block:: text
39+
40+
mongocli iam organization|organizations|org|orgs delete|rm <organization-id>
41+
[ --force ]
42+
[ --profile|-P <profile-name> ]
43+
44+
.. include:: /includes/fact-command-line-help.rst
45+
46+
.. _mcli-iam-organization-delete-options:
47+
48+
Options
49+
-------
50+
51+
.. list-table::
52+
:header-rows: 1
53+
:widths: 20 10 60 10
54+
55+
* - Option
56+
- Type
57+
- Description
58+
- Required?
59+
60+
* - ``--force``
61+
-
62+
- Flag that indicates that the organization can be deleted without
63+
requiring confirmation.
64+
- no
65+
66+
* - ``<organization-ID>``
67+
- string
68+
- Unique identifier of the organization you want to delete.
69+
- yes
70+
71+
* - ``--profile``, ``-P``
72+
- string
73+
- Name of the profile where your credentials are saved.
74+
75+
Your credentials can either be a :opsmgr:`Global API key pair
76+
</reference/api/global-api-keys/index.html#global-programmatic-api-keys>` or
77+
a :opsmgr:`Personal API key
78+
</tutorial/configure-public-api-access/#personal-api-keys-deprecated>`.
79+
80+
If omitted, uses the {+default-profile+}. To learn more about
81+
creating a profile, see :ref:`mcli-configure`.
82+
83+
- no
84+
85+
.. _mcli-iam-organization-delete-output:
86+
87+
Output
88+
------
89+
90+
The command prints following fields in |json| format to the
91+
terminal if the command succeeds. If the command returns errors,
92+
see :ref:`Troubleshooting <troubleshooting>` for recommended
93+
solutions.
94+
95+
.. code-block:: text
96+
:copyable: false
97+
98+
Organization '<organization-id>' deleted
99+
100+
.. _mcli-iam-organization-delete-examples:
101+
102+
Examples
103+
--------
104+
105+
Delete an Organization with Confirmation
106+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
107+
108+
The following command deletes an organization with the ID
109+
``5e33545ef10fab20b49c0f3b`` in an |onprem| instance. The command
110+
uses the {+default-profile+}, which contains |api| keys that have the
111+
``Global Owner`` role.
112+
113+
.. code-block:: text
114+
115+
mongocli iam organization delete 5e33545ef10fab20b49c0f3b
116+
117+
The previous command prints the following to
118+
the terminal. For more information on these fields, see
119+
:ref:`Output <mcli-iam-project-list-output>`.
120+
121+
.. code-block:: text
122+
:copyable: false
123+
124+
? Are you sure you want to delete: 5e33545ef10fab20b49c0f3b Yes
125+
Organization '5e33545ef10fab20b49c0f3b' deleted
126+
127+
Delete an Organization without Confirmation
128+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129+
130+
The following command deletes an organization without requiring
131+
confirmation. The command uses the {+default-profile+}, which contains
132+
|api| keys that have the ``Global Owner`` role.
133+
134+
.. code-block:: text
135+
136+
mongocli iam organization delete 9dj3545ef10fab20b49c0f3b --force
137+
138+
The previous command prints the following to the terminal:
139+
140+
.. code-block:: text
141+
:copyable: false
142+
143+
Organization '9dj3545ef10fab20b49c0f3b' deleted

0 commit comments

Comments
 (0)