You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learn how to connect your MongoDB app to an Azure Cosmos DB by using a MongoDB connection string. You can then use an Azure Cosmos DB database as the data store for your MongoDB app.
21
23
22
24
This tutorial provides two ways to retrieve connection string information:
23
25
24
-
-[The quickstart method](#get-the-mongodb-connection-string-by-using-the-quick-start), for use with .NET, Node.js, MongoDB Shell, Java, and Python drivers
25
-
-[The custom connection string method](#get-the-mongodb-connection-string-to-customize), for use with other drivers
26
+
*[The quickstart method](#get-the-mongodb-connection-string-by-using-the-quick-start), for use with .NET, Node.js, MongoDB Shell, Java, and Python drivers.
27
+
*[The custom connection string method](#get-the-mongodb-connection-string-to-customize), for use with other drivers.
26
28
27
29
## Prerequisites
28
30
29
-
- An Azure account. If you don't have an Azure account, create a [free Azure account](https://azure.microsoft.com/free/) now.
30
-
- An Azure Cosmos DB account. For instructions, see [Build a web app using Azure Cosmos DB's API for MongoDB and .NET SDK](create-mongodb-dotnet.md).
31
+
* An Azure account. If you don't have an Azure account, create a [free Azure account](https://azure.microsoft.com/free/) now.
32
+
* An Azure Cosmos DB account. For instructions, see [Quickstart: Azure Cosmos DBfor MongoDB driver for Node.js](create-mongodb-dotnet.md).
31
33
32
34
## Get the MongoDB connection string by using the quick start
33
35
34
36
1. In an Internet browser, sign in to the [Azure portal](https://portal.azure.com).
35
-
2. In the **Azure Cosmos DB**blade, select the API.
36
-
3. In the left pane of the account blade, click**Quick start**.
37
-
4. Choose your platform (**.NET**, **Node.js**, **MongoDB Shell**, **Java**, **Python**). If you don't see your driver or tool listed, don't worry--we continuously document more connection code snippets. Please comment below on what you'd like to see. To learn how to craft your own connection, read [Get the account's connection string information](#get-the-mongodb-connection-string-to-customize).
38
-
5. Copy and paste the code snippet into your MongoDB app.
37
+
1. In the **Azure Cosmos DB**pane, select the API.
38
+
1. In the left pane of the account pane, select**Quick start**.
39
+
1. Choose your platform (**.NET**, **Node.js**, **MongoDB Shell**, **Java**, **Python**). If you don't see your driver or tool listed, don't worry--we continuously document more connection code snippets. Comment on what you'd like to see. To learn how to craft your own connection, read [Get the account's connection string information](#get-the-mongodb-connection-string-to-customize).
40
+
1. Copy and paste the code snippet into your MongoDB app.
:::image type="content" source="./media/connect-account/quickstart-pane.png" alt-text="Screenshot showing the Quick start pane.":::
41
43
42
44
## Get the MongoDB connection string to customize
43
45
44
46
1. In an Internet browser, sign in to the [Azure portal](https://portal.azure.com).
45
-
2. In the **Azure Cosmos DB**blade, select the API.
46
-
3. In the left pane of the account blade, click**Connection String**.
47
-
4. The **Connection String**blade opens. It has all the information necessary to connect to the account by using a driver for MongoDB, including a preconstructed connection string.
47
+
1. In the **Azure Cosmos DB**pane, select the API.
48
+
1. In the left pane of the account pane, select**Connection strings**.
49
+
1. The **Connection strings**pane opens. It has all the information necessary to connect to the account by using a driver for MongoDB, including a preconstructed connection string.
> Azure Cosmos DB has strict security requirements and standards. Azure Cosmos DB accounts require authentication and secure communication via *TLS*.
55
57
56
-
Azure Cosmos DB supports the standard MongoDB connection string URI format, with a couple of specific requirements: Azure Cosmos DB accounts require authentication and secure communication via TLS. So, the connection string format is:
58
+
Azure Cosmos DB supports the standard MongoDB connection string URI format, with a couple of specific requirements: Azure Cosmos DB accounts require authentication and secure communication via TLS. The connection string format is:
All drivers that support wire protocol version 3.4 or greater will support Azure Cosmos DB for MongoDB.
77
+
All drivers that support wire protocol version 3.4 or greater support Azure Cosmos DB for MongoDB.
76
78
77
79
Specifically, client drivers must support the Service Name Identification (SNI) TLS extension and/or the appName connection string option. If the `appName` parameter is provided, it must be included as found in the connection string value in the Azure portal.
78
80
79
81
## Next steps
80
82
81
-
- Learn how to [use Studio 3T](connect-using-mongochef.md) with Azure Cosmos DB's API for MongoDB.
82
-
- Learn how to [use Robo 3T](connect-using-robomongo.md) with Azure Cosmos DB's API for MongoDB.
83
-
- Explore MongoDB [samples](nodejs-console-app.md) with Azure Cosmos DB's API for MongoDB.
84
-
- Trying to do capacity planning for a migration to Azure Cosmos DB? You can use information about your existing database cluster for capacity planning.
85
-
- If all you know is the number of vcores and servers in your existing database cluster, read about [estimating request units using vCores or vCPUs](../convert-vcore-to-request-unit.md)
86
-
- If you know typical request rates for your current database workload, read about [estimating request units using Azure Cosmos DB capacity planner](estimate-ru-capacity-planner.md)
83
+
* Learn how to [use Studio 3T](connect-using-mongochef.md) with Azure Cosmos DB's API for MongoDB.
84
+
* Learn how to [use Robo 3T](connect-using-robomongo.md) with Azure Cosmos DB's API for MongoDB.
0 commit comments