![]() Select the Azure subscription that you wish to use for this Azure Cosmos DB account. On the Create Azure Cosmos DB Account page, enter the following information: Setting Azure Cosmos DB has five APIs: SQL, MongoDB, Gremlin, Table, and Cassandra. On the Select API option page, select the Create option within the MongoDB section. On the New page, search for and select Azure Cosmos DB. New-AzCosmosDBAccount this quickstart, we recommend using the resource group name msdocs-cosmos-quickstart-rg.įrom the Azure portal menu or the Home page, select Create a resource. New-AzResourceGroup the New-AzCosmosDBAccount cmdlet to create a new Azure Cosmos DB for MongoDB account with default settings. Use the New-AzResourceGroup cmdlet to create a new resource group in your subscription. If you haven't already, sign in to Azure PowerShell using the Connect-AzAccount cmdlet. $RESOURCE_GROUP_NAME = "msdocs-cosmos-quickstart-rg" az cosmosdb create \Ĭreate shell variables for ACCOUNT_NAME, RESOURCE_GROUP_NAME, and LOCATION. Use the az cosmosdb create command to create a new Azure Cosmos DB for MongoDB account with default settings. Use the az group create command to create a new resource group in your subscription. If you haven't already, sign in to the Azure CLI using the az login command. # Variable for account name with a randomnly generated suffix ResourceGroupName="msdocs-cosmos-quickstart-rg" This quickstart will create a single Azure Cosmos DB account using the API for MongoDB.Ĭreate shell variables for accountName, resourceGroupName, and location. This section walks you through creating an Azure Cosmos DB account and setting up a project that uses the MongoDB npm package. Run az -version (Azure CLI) or Get-Module -ListAvailable Az* (Azure PowerShell) to check that you have the appropriate Azure command-line tools installed.In a terminal or command window, run python -version to check that you have a recent version of Python.Azure Command-Line Interface (CLI) or Azure PowerShell.An Azure account with an active subscription. ![]() Also, you'll use the MongoDB extension commands, which are designed to help you create and obtain database resources that are specific to the Azure Cosmos DB capacity model. In this quickstart, you'll communicate with the Azure Cosmos DB’s API for MongoDB by using one of the open-source MongoDB client drivers for Python, PyMongo. The example code snippets are available on GitHub as a Python project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |