@@ -58,88 +58,51 @@ Considerations
58
58
59
59
.. _vsce-connect-task:
60
60
61
- Create a Connection to a Deployment
62
- -----------------------------------
61
+ Create a Connection
62
+ -------------------
63
+
64
+ |vsce| provides two options to connect to your deployment:
65
+
66
+ .. list-table::
67
+ :header-rows: 1
68
+ :widths: 20 40
63
69
64
- |vsce| provides two methods to create a connection to a deployment. You
65
- can:
70
+ * - Connection Method
71
+ - Description
66
72
67
- - Provide a deployment connection string, or
68
- - Fill in a deployment information in specific fields.
73
+ * - :guilabel:`Connect with Connection String`
74
+ - This method is faster and easier than
75
+ using the advanced connection settings. Use this option
76
+ if your deployment is hosted on |service| or you already have a
77
+ connection string for a deployment available.
69
78
70
- Providing a connection string is faster and easier than filling in a
71
- deployment's details. Use this option if |service| hosts your
72
- deployment or if you have a connection string for a deployment
73
- available.
79
+ * - :guilabel:`Advanced Connection Settings`
80
+ - This method lets you build a connection string with a form.
81
+ Use this option if you need to customize the connection
82
+ string and want to see available connection options .
74
83
75
- Define how your connection is saved with the
76
- :guilabel:`Default Connection Saving Location`
77
- :ref:`setting <vsce-settings>`:
84
+ .. note::
78
85
79
- .. include:: includes/connection-location-table.rst
86
+ To specify where |vsce| connections are saved, use
87
+ the :guilabel:`Default Connection Saving Location`
88
+ :ref:`setting <vsce-settings>`.
80
89
81
90
.. tabs::
82
91
83
- .. tab:: Paste Connection String
84
- :tabid: paste -connection-string
92
+ .. tab:: Connect with Connection String
93
+ :tabid: connect-with -connection-string
85
94
86
95
When you provide a connection string, |vsce| supports
87
96
most :manual:`Connection String Options
88
97
</reference/connection-string/#connection-string-options>`
89
98
supported by MongoDB.
90
99
91
- .. include:: /includes/steps/starting-vsce-paste-string.rst
92
-
93
- .. tab:: Fill in Individual Fields
94
- :tabid: individual-fields
95
-
96
- .. include:: /includes/steps/starting-vsce-individual-fields.rst
97
-
98
- .. _vsce-activate-connection:
99
-
100
- Activate a Connection
101
- ---------------------
102
-
103
- You can connect |vsce| to only one deployment at a time. To change the
104
- active connection to a different deployment, or to connect to a
105
- deployment from which you were disconnected:
106
-
107
- .. include:: /includes/steps/activate-connection.rst
108
-
109
- Launch MongoDB Shell
110
- ~~~~~~~~~~~~~~~~~~~~
111
-
112
- You can connect the :mongosh:`MongoDB Shell </>` or legacy
113
- :binary:`mongo <mongo>` shell to your active deployment.
114
-
115
-
116
- Considerations
117
- ``````````````
118
-
119
- - The shell that |vsce| uses to connect to your deployment is
120
- determined by the :guilabel:`Shell` setting in your
121
- :ref:`extension settings <vsce-settings>`. You can choose either
122
- the :mongosh:`MongoDB Shell </>` or the legacy :binary:`mongo <mongo>` shell.
100
+ .. include:: /includes/steps/starting-vsce-connect-with-connection-string.rst
123
101
124
- - The path to your selected shell must exist in your system's ``PATH``.
125
- If it does not exist in your ``PATH``, the operation errors.
102
+ .. tab:: Advanced Connection Settings
103
+ :tabid: Advanced Connection Settings
126
104
127
- Procedure
128
- `````````
129
-
130
- To connect the shell to your active deployment:
131
-
132
- 1. In the |vsce| :guilabel:`Connections` list, right-click your active
133
- deployment.
134
-
135
- #. Select :guilabel:`Launch MongoDB Shell`.
136
-
137
- |vsce| opens the :guilabel:`Terminal` window in VS Code and launches
138
- the shell connected to your selected deployment.
139
-
140
- .. seealso::
141
-
142
- :mongosh:`Perform CRUD Operations in the MongoDB Shell </crud>`
105
+ .. include:: /includes/steps/starting-vsce-connect-with-advanced-connection-settings.rst
143
106
144
107
145
108
.. _vsce-connect-task-atlas-streams:
@@ -207,6 +170,129 @@ For details on how to configure Atlas Stream Processing, see
207
170
:figwidth: 700px
208
171
:alt: Image of a stream processing template
209
172
173
+ .. _vsce-activate-connection:
174
+
175
+ Activate a Connection
176
+ ---------------------
177
+
178
+ You can connect |vsce| to only one deployment at a time. To change the
179
+ active connection to a different deployment, or to connect to a
180
+ deployment from which you were disconnected:
181
+
182
+ .. include:: /includes/steps/activate-connection.rst
183
+
184
+ Launch MongoDB Shell
185
+ ~~~~~~~~~~~~~~~~~~~~
186
+
187
+ You can connect the :mongosh:`MongoDB Shell </>` or legacy
188
+ :binary:`mongo <mongo>` shell to your active deployment.
189
+
190
+
191
+ Considerations
192
+ ``````````````
193
+
194
+ - The shell that |vsce| uses to connect to your deployment is
195
+ determined by the :guilabel:`Shell` setting in your
196
+ :ref:`extension settings <vsce-settings>`. You can choose either
197
+ the :mongosh:`MongoDB Shell </>` or the legacy :binary:`mongo <mongo>` shell.
198
+
199
+ - The path to your selected shell must exist in your system's ``PATH``.
200
+ If it does not exist in your ``PATH``, the operation errors.
201
+
202
+ Procedure
203
+ `````````
204
+
205
+ To connect the shell to your active deployment:
206
+
207
+ a. In the |vsce| :guilabel:`Connections` list, right-click your active
208
+ deployment.
209
+
210
+ #. Select :guilabel:`Launch MongoDB Shell`.
211
+
212
+ |vsce| opens the :guilabel:`Terminal` window in VS Code and launches
213
+ the shell connected to your selected deployment.
214
+
215
+ .. seealso::
216
+
217
+ :mongosh:`Perform CRUD Operations in the MongoDB Shell </crud>`
218
+
219
+ .. _vsce-edit-connection-task:
220
+
221
+ Edit a Connection
222
+ -----------------
223
+
224
+ .. procedure::
225
+ :style: normal
226
+
227
+
228
+ .. step:: In |vscode-short|, click the :guilabel:`MongoDB` icon in the :guilabel:`Activity Bar`
229
+
230
+ .. figure:: /images/vsce-mongodb-extension-sidemenu.png
231
+ :figwidth: 600px
232
+ :alt: Image VSCode side bar menu.
233
+
234
+ .. step:: Expand the :guilabel:`Connections` pane
235
+
236
+ Expand the :guilabel:`Connections` pane in the left
237
+ navigation if it's collapsed.
238
+
239
+ .. figure:: /images/vsce-expand-connections.png
240
+ :figwidth: 600px
241
+ :alt: Image showing connections pane
242
+
243
+ .. step:: Select a connection
244
+
245
+ From the :guilabel:`Connections` menu, right-click the
246
+ connection and select :guilabel:`Edit Connection...`
247
+
248
+ .. step:: Make changes and save
249
+
250
+ Click :icon-fa5:`chevron-right`
251
+ :guilabel:`Advanced Connection Options` to display
252
+ the advanced connection form.
253
+
254
+ .. tip::
255
+
256
+ You can also click the :guilabel:`Edit Connection String`
257
+ toggle in the top-right of the form to edit the connection
258
+ string URI directly.
259
+
260
+ Once you are done editing the connection options click
261
+ :guilabel:`Save & Connect`.
262
+
263
+ .. _vsce-copy-connection-string-task:
264
+
265
+ Copy a Connection
266
+ -----------------
267
+
268
+ You can copy a connection string from an existing |vscode-short|
269
+ connection.
270
+
271
+ .. procedure::
272
+ :style: normal
273
+
274
+ .. step:: In |vscode-short|, click the :guilabel:`MongoDB` icon in the :guilabel:`Activity Bar`
275
+
276
+ .. figure:: /images/vsce-mongodb-extension-sidemenu.png
277
+ :figwidth: 600px
278
+ :alt: Image VSCode side bar menu.
279
+
280
+ .. step:: Expand the :guilabel:`Connections` pane
281
+
282
+ Expand the :guilabel:`Connections` pane in the left
283
+ navigation if it's collapsed.
284
+
285
+ .. figure:: /images/vsce-expand-connections.png
286
+ :figwidth: 600px
287
+ :alt: Image showing connections pane
288
+
289
+ .. step:: Select a connection
290
+
291
+ From the :guilabel:`Connections` menu, right-click the
292
+ connection and select :guilabel:`Copy Connection String`.
293
+
294
+ The connection string is copied to your clipboard.
295
+
210
296
.. _vsce-rename-connection:
211
297
212
298
Rename a Connection
@@ -223,35 +309,37 @@ Disconnect from a Deployment
223
309
224
310
|vsce| provides two methods to disconnect from a deployment. You can:
225
311
226
- - Disconnect with the Command Palette, or
312
+ - Disconnect with the Command Palette.
227
313
- Disconnect from the :guilabel:`MongoDB` view in the
228
314
:guilabel:`Activity Bar`.
229
315
230
316
.. tabs::
231
317
232
- .. tab:: Disconnect with the Command Palette
233
- :tabid: command-palette
234
-
235
- .. include:: /includes/steps/disconnect-command-palette.rst
236
-
237
- .. tab:: Disconnect from the MongoDB View
318
+ .. tab:: MongoDB View
238
319
:tabid: mdb-view
239
320
240
321
.. include:: /includes/steps/disconnect-mongodb-view.rst
241
322
323
+ .. tab:: Command Palette
324
+ :tabid: command-palette
325
+
326
+ .. include:: /includes/steps/disconnect-command-palette.rst
327
+
242
328
Disconnecting from a MongoDB instance closes the |vsce| connection to
243
329
the active instance. You must :ref:`reconnect <vsce-connect-task>` to
244
330
interact with data in your deployment again.
245
331
332
+ .. _vsce-remove-connection-task:
333
+
246
334
Remove a Connection
247
335
-------------------
248
336
249
337
|vsce| provides two methods to remove a connection to a deployment from
250
338
|vscode-short|. You can:
251
339
252
- - Remove a connection with the Command Palette, or
253
340
- Remove a connection from the :guilabel:`MongoDB` view in the
254
341
:guilabel:`Activity Bar`.
342
+ - Remove a connection with the Command Palette.
255
343
256
344
.. important::
257
345
@@ -260,16 +348,16 @@ Remove a Connection
260
348
261
349
.. tabs::
262
350
263
- .. tab:: Remove Connection with the Command Palette
264
- :tabid: command-palette
265
-
266
- .. include:: /includes/steps/remove-connection-command-palette.rst
267
-
268
- .. tab:: Remove Connection from the MongoDB View
351
+ .. tab:: MongoDB View
269
352
:tabid: mdb-view
270
353
271
354
.. include:: /includes/steps/remove-connection-mdb-view.rst
272
355
356
+ .. tab:: Command Palette
357
+ :tabid: command-palette
358
+
359
+ .. include:: /includes/steps/remove-connection-command-palette.rst
360
+
273
361
.. seealso::
274
362
275
363
:ref:`playground-connect-to-deployment`
0 commit comments