Skip to content

Commit 78e093c

Browse files
DOCSP-11017 doc for config describe command (#130)
* DOCSP-11017 doc for config describe command DOCSP-11017 self-review DOCSP-11017 self-review changes * Update source/reference/config/config-describe.txt Co-authored-by: Melissa Mahoney <[email protected]> * Update source/reference/config/config-describe.txt Co-authored-by: Melissa Mahoney <[email protected]> * Update source/reference/config/config-describe.txt Co-authored-by: Melissa Mahoney <[email protected]> * DOCSP-11017 updates for copy review feedback * DOCSP-11017 doc update for review feedback Co-authored-by: Melissa Mahoney <[email protected]>
1 parent e2a6a00 commit 78e093c

File tree

3 files changed

+117
-28
lines changed

3 files changed

+117
-28
lines changed

source/includes/steps-configure-mcli.yaml

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ level: 4
7272
ref: verify-profile
7373
content: |
7474
75-
View the :ref:`configuration file <mcli-config-file>` to verify your
76-
profile.
75+
View the :ref:`configuration file <mcli-config-file>` or run the
76+
:ref:`mcli-config-describe-command` command to verify your profile.
7777
7878
.. include:: /includes/admonitions/secure-config-file.rst
7979
@@ -85,55 +85,50 @@ content: |
8585
8686
.. example::
8787
88-
In this example, the configuration file is stored in the
89-
``/.config`` folder of the home directory. View the file
90-
using the ``cat`` command:
88+
In this example, the following command returns the settings
89+
in the {+default-profile+}:
9190
9291
.. code-block:: sh
9392
:copyable: false
9493
95-
cat ~/.config/mongocli.toml
94+
mongocli config describe default
9695
97-
The command returns the contents of the configuration file,
98-
which contains the {+default-profile+}. The
99-
{+default-profile+} has a |svc-api-key| and project ID for an
100-
{{service}} deployment.
96+
The command returns the following settings. The {+default-profile+}
97+
has a |svc-api-key|, which is redacted in the command output for
98+
security purposes, and project ID for an {{service}} deployment.
10199
102100
.. code-block:: sh
103101
:copyable: false
104102
105-
[default]
106-
private_api_key = "abcdef"
107-
public_api_key = "d5199648-abcd-1234-efgh-3ed4396a3096"
108-
project_id = "7ehf04abc10defb66c7d1234c"
109-
service = "{{serviceName}}"
103+
private_api_key = redacted
104+
public_api_key = redacted
105+
project_id = 7ehf04abc10defb66c7d1234c
106+
service = {{serviceName}}
110107
111108
.. tab:: Named Profile
112109
:tabid: named-profile
113110
114111
.. example::
115112
116-
In this example, the configuration file is stored in the
117-
``/.config`` folder of your home directory. View the file
118-
using the ``cat`` command:
113+
In this example, the following command returns the settings
114+
in the profile named ``myMongoDB``:
119115
120116
.. code-block:: sh
121117
:copyable: false
122118
123-
cat ~/.config/mongocli.toml
119+
mongocli config describe myMongoDB
124120
125-
The command returns the contents of the configuration file,
126-
which contains a profile named ``myMongoDB``. The
127-
``myMongoDB`` profile has a |svc-api-key| and project ID for
128-
an {{service}} deployment.
121+
The command returns following settings. The ``myMongoDB`` profile
122+
has a |svc-api-key|, which is redacted in the command output for
123+
security purposes, and project ID for an {{service}} deployment.
129124
130125
.. code-block:: sh
131126
:copyable: false
132127
133-
[myMongoDB]
134-
private_api_key = "abcdef"
135-
public_api_key = "d5199648-abcd-1234-efgh-3ed4396a3096"
136-
project_id = "7ehf04abc10defb66c7d1234c"
137-
service = "{{serviceName}}"
128+
private_api_key = redacted
129+
public_api_key = redacted
130+
project_id = 7ehf04abc10defb66c7d1234c
131+
service = {{serviceName}}
132+
138133
139134
...
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
.. _mcli-config-describe-command:
2+
3+
========================
4+
mongocli config describe
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 describe`` command retrieves details about the
16+
specified profile from the :ref:`mcli-config-file`.
17+
18+
.. seealso:: :ref:`mcli-configure`
19+
20+
.. _mcli-config-describe-syntax:
21+
22+
Syntax
23+
------
24+
25+
.. code-block:: sh
26+
27+
mongocli config describe <profile-name>
28+
29+
.. _mcli-config-describe-options:
30+
31+
Arguments
32+
---------
33+
34+
.. list-table::
35+
:header-rows: 1
36+
:widths: 20 10 60 10
37+
38+
* - Argument
39+
- Type
40+
- Description
41+
- Required?
42+
43+
* - ``<profile-name>``
44+
- string
45+
- Name of the profile to retrieve. Specify ``default`` to
46+
retrieve the {+default-profile+}.
47+
- yes
48+
49+
.. _mcli-config-describe-output:
50+
51+
Output
52+
------
53+
54+
The command output looks similar to the following if the command
55+
succeeds. If the command prints errors, see :ref:`troubleshooting`
56+
for recommended solutions.
57+
58+
.. code-block:: sh
59+
:copyable: false
60+
61+
public_api_key = redacted
62+
service = <service-name>
63+
ops_manager_url = <OM-URL>
64+
private_api_key = redacted
65+
project_id = <project-ID>
66+
67+
.. note::
68+
69+
The |svc-api-key|\s are redacted for security purposes.
70+
71+
.. _mcli-config-describe-egs:
72+
73+
Example
74+
-------
75+
76+
The following example uses the ``mongocli config describe`` command
77+
to retrieve a profile named ``egOmProfile`` from the configuration file.
78+
79+
.. code-block:: sh
80+
81+
mongocli config describe egOmProfile
82+
83+
The preceding command prints the following output to the terminal:
84+
85+
.. code-block:: sh
86+
:copyable: false
87+
88+
public_api_key = redacted
89+
service = ops-manager
90+
ops_manager_url = http://localhost:30700
91+
private_api_key = redacted
92+
project_id = 5e84b2edf949e9007a7beac3

source/reference/configuration.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ including |service-fullname|, |cloud|, and |mms-full|.
2020

2121
- :ref:`Create a configuration file <mcli-config-command>`
2222
- :ref:`Update a configuration file <mcli-config-set-command>`
23+
- :ref:`Retrieve a profile from the configuration file <mcli-config-describe-command>`
2324

2425
.. class:: hidden
2526

@@ -28,3 +29,4 @@ including |service-fullname|, |cloud|, and |mms-full|.
2829

2930
Create a Configuration File </reference/config>
3031
Update a Configuration File </reference/mcli-config-set>
32+
Retrieve a Profile </reference/config/config-describe>

0 commit comments

Comments
 (0)