Skip to content

Commit 9acba87

Browse files
(DOCSP-11071): mongocli config rename
1 parent fe6144e commit 9acba87

File tree

2 files changed

+87
-1
lines changed

2 files changed

+87
-1
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
.. _mcli-config-rename-command:
2+
3+
======================
4+
mongocli config rename
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 rename`` command renames a profile so you don't have to
16+
directly edit the :ref:`mcli-config-file`.
17+
18+
.. seealso:: :ref:`mcli-configure`
19+
20+
.. _mcli-config-rename-syntax:
21+
22+
Syntax
23+
------
24+
25+
.. code-block:: sh
26+
27+
mongocli config rename <existing-profile-name> <new-profile-name>
28+
29+
.. _mcli-config-rename-options:
30+
31+
Arguments
32+
---------
33+
34+
.. list-table::
35+
:header-rows: 1
36+
:widths: 40 10 40 10
37+
38+
* - Argument
39+
- Type
40+
- Description
41+
- Required?
42+
43+
* - ``<existing-profile-name>``
44+
- string
45+
- Name of the profile to rename.
46+
- yes
47+
48+
* - ``<new-profile-name>``
49+
- string
50+
- New name of the profile.
51+
- yes
52+
53+
.. _mcli-config-rename-output:
54+
55+
Output
56+
------
57+
58+
The command output looks similar to the following if the command
59+
succeeds. If the command prints errors, see :ref:`troubleshooting`
60+
for recommended solutions.
61+
62+
.. code-block:: sh
63+
:copyable: false
64+
65+
The profile <existing-profile-name> was renamed to <new-profile-name>.
66+
67+
.. _mcli-config-rename-egs:
68+
69+
Example
70+
-------
71+
72+
The following example uses the ``mongocli config rename`` command
73+
to rename the ``example1`` profile to ``sample2``.
74+
75+
.. code-block:: sh
76+
77+
mongocli config rename example1 sample2
78+
79+
The preceding command prints the following output to the terminal:
80+
81+
.. code-block:: sh
82+
:copyable: false
83+
84+
The profile example1 was renamed to sample2.

source/reference/configuration.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ including |service-fullname|, |cloud|, and |mms-full|.
2323
- :ref:`Retrieve a profile <mcli-config-describe-command>`
2424
- :ref:`Delete a profile <mcli-config-delete-command>`
2525
- :ref:`View available profiles <mcli-config-list-command>`
26+
- :ref:`Rename a profile <mcli-config-rename-command>`
2627

2728
.. class:: hidden
2829

@@ -33,4 +34,5 @@ including |service-fullname|, |cloud|, and |mms-full|.
3334
Update a Profile </reference/mcli-config-set>
3435
Retrieve a Profile </reference/config/config-describe>
3536
Delete a Profile </reference/config/config-delete>
36-
View Available Profiles </reference/mcli-config-list>
37+
View Available Profiles </reference/mcli-config-list>
38+
Rename a Profile </reference/config/config-rename>

0 commit comments

Comments
 (0)