Skip to content

Commit 7cc80be

Browse files
jocelyn-mendezJocelyn Mendez
andauthored
(DOCSP-10949)Added page for new config list command (#126)
* (DOCSP-10949) Added page for new config command * (DOCSP-10949) Added page for new config command * (DOCSP-10949) Added page for new config command * (DOCSP-10949) Added page for new config command * (DOCSP-10949) Added page for new config command * (DOCSP-10949) Added 'config ls' examples * (DOCSP-10949) Added 'config ls' examples * (DOCSP-10949) Added 'config ls' examples * (DOCSP-10949) Added 'config ls' examples * (DOCSP-10949) Added 'config ls' example Co-authored-by: Jocelyn Mendez <[email protected]>
1 parent 2bc24e8 commit 7cc80be

File tree

3 files changed

+83
-1
lines changed

3 files changed

+83
-1
lines changed

source/reference/config.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Syntax
7171
.. code-block:: text
7272
:copyable: false
7373

74-
mongocli config
74+
mongocli config
7575
[ --profile|-P <profile-name> ]
7676
[ --service cloud|cloud-manager|ops-manager ]
7777

source/reference/configuration.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ including |service-fullname|, |cloud|, and |mms-full|.
2222
- :ref:`Update a configuration file <mcli-config-set-command>`
2323
- :ref:`Retrieve a profile from the configuration file <mcli-config-describe-command>`
2424
- :ref:`Delete a profile <mcli-config-delete-command>`
25+
- :ref:`View available profiles <mcli-config-list-command>`
2526

2627
.. class:: hidden
2728

@@ -32,3 +33,4 @@ including |service-fullname|, |cloud|, and |mms-full|.
3233
Update a Configuration File </reference/mcli-config-set>
3334
Retrieve a Profile </reference/config/config-describe>
3435
Delete a Profile </reference/config/config-delete>
36+
View Available Profiles </reference/mcli-config-list>

source/reference/mcli-config-list.txt

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
.. _mcli-config-list-command:
2+
3+
====================
4+
mongocli config list
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 ``config list`` command prints a list of available profiles by name.
16+
If you did not :ref:`specify a name <mcli-configure>` for your profile,
17+
it displays as the {+default-profile+}.
18+
19+
.. _mcli-config-list-syntax:
20+
21+
Syntax
22+
------
23+
24+
.. code-block:: sh
25+
26+
mongocli config list|ls
27+
28+
.. include:: /includes/fact-command-line-help.rst
29+
30+
.. _config-list-output:
31+
32+
Output
33+
------
34+
35+
The command output looks similar to the following if the command
36+
succeeds. If the command prints errors, see :ref:`troubleshooting`
37+
for recommended solutions.
38+
39+
.. code-block:: sh
40+
:copyable: false
41+
42+
Available profiles:
43+
<profile-name>
44+
45+
.. _mcli-config-list-examples:
46+
47+
Examples
48+
--------
49+
50+
The following examples use the ``mongocli config list`` command
51+
to display available profiles by name.
52+
53+
**Example 1**
54+
55+
In the following example, the user configured only a
56+
{+default-profile+}. The command lists ``default`` as the available
57+
profile.
58+
59+
.. code-block:: text
60+
:copyable: false
61+
62+
mongocli config list
63+
Available profiles:
64+
default
65+
66+
**Example 2**
67+
68+
In the following example, the user configured multiple profiles. The
69+
command returns the available profiles in alphabetical order.
70+
71+
.. code-block:: text
72+
:copyable: false
73+
74+
mongocli config list
75+
Available profiles:
76+
aProfile
77+
default
78+
egAtlasProfile
79+
egcmProfile
80+
testProfile

0 commit comments

Comments
 (0)