Skip to content

Commit 2605b5d

Browse files
authored
(DOCSP-33184) Adds info to find Atlas connection string with the Atlas CLI (#4702) (#4729)
* (DOCSP-33184) Adds info to find Atlas connection string with the Atlas CLI * Includes tech review feedback * Includes copy review changes
1 parent 48e084b commit 2605b5d

File tree

2 files changed

+56
-29
lines changed

2 files changed

+56
-29
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.. procedure::
2+
:style: normal
3+
4+
.. step:: Open the :guilabel:`Connection Method` dialog.
5+
6+
a. Click :guilabel:`Database` in the sidebar in {+atlas+}.
7+
b. Click :guilabel:`Connect` for the database deployment to which
8+
you want to connect.
9+
c. Click :guilabel:`Choose a Connection Method`. {+atlas+}
10+
selects :guilabel:`Standard Connection` by default. To
11+
connect using a :atlas:`private endpoint
12+
</security-private-endpoint/>`, select
13+
:guilabel:`Private Endpoint`.
14+
15+
.. step:: Choose a connection method.
16+
17+
To connect to your application, click :guilabel:`Drivers`. To
18+
connect using tools, click the tool you want to use to access your
19+
data.
20+
21+
.. step:: Follow instructions for the connection method you selected.
22+
23+
a. If you selected :guilabel:`Drivers`, select your driver and
24+
version. If you selected a tool, download the tool.
25+
b. If your database deployment is a cluster, select
26+
:guilabel:`Connect To Cluster`.
27+
c. Copy the connection string. Replace ``<password>`` and
28+
``<username>`` in the connection string with the database
29+
user's credentials.

source/reference/connection-string.txt

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,35 +47,33 @@ Complete these steps to find your connection string.
4747
Find Your {+atlas+} Connection String
4848
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4949

50-
.. procedure::
51-
:style: normal
52-
53-
.. step:: Open the :guilabel:`Connection Method` dialog.
54-
55-
a. Click :guilabel:`Database` in the sidebar in {+atlas+}.
56-
b. Click :guilabel:`Connect` for the database deployment to which
57-
you want to connect.
58-
c. Click :guilabel:`Choose a Connection Method`. {+atlas+}
59-
selects :guilabel:`Standard Connection` by default. To
60-
connect using a :atlas:`private endpoint
61-
</security-private-endpoint/>`, select
62-
:guilabel:`Private Endpoint`.
63-
64-
.. step:: Choose a connection method.
65-
66-
To connect to your application, click :guilabel:`Drivers`. To
67-
connect using tools, click the tool you want to use to access your
68-
data.
69-
70-
.. step:: Follow instructions for the connection method you selected.
71-
72-
a. If you selected :guilabel:`Drivers`, select your driver and
73-
version. If you selected a tool, download the tool.
74-
b. If your database deployment is a cluster, select
75-
:guilabel:`Connect To Cluster`.
76-
c. Copy the connection string. Replace ``<password>`` and
77-
``<username>`` in the connection string with the database
78-
user's credentials.
50+
.. tabs::
51+
52+
.. tab:: Atlas CLI
53+
:tabid: atlas-cli
54+
55+
To find your {+atlas+} connection string using the
56+
:atlascli:`Atlas CLI </>`, :atlascli:`install
57+
</install-atlas-cli/>` and :atlascli:`connect
58+
</connect-atlas-cli/>` from the Atlas CLI, then run the following
59+
command. Replace ``<clusterName>`` with the name of the {+atlas+}
60+
cluster and replace ``<projectId>`` with the project ID.
61+
62+
.. code-block::
63+
64+
atlas clusters connectionStrings describe <clusterName> --projectId <projectId>
65+
66+
To learn more, see
67+
:atlascli:`atlas clusters connectionStrings describe
68+
</command/atlas-clusters-connectionStrings-describe/>`.
69+
70+
.. tab:: Atlas UI
71+
:tabid: atlas-ui
72+
73+
To find your {+atlas+} connection string in the Atlas UI,
74+
follow these steps:
75+
76+
.. include:: /includes/steps-find-atlas-connection-string.rst
7977

8078
Your {+atlas+} connection string resembles the following
8179
example:

0 commit comments

Comments
 (0)