

Select-Object -Property "Primary MongoDB Connection String" You'll use these credentials later.įind the CONNECTION STRING from the list of keys and connection strings for the account with the Get-AzCosmosDBAccountKey cmdlet. az cosmosdb keys list -type connection-strings \ Select the MongoDB server version that matches your application requirements.įind the API for MongoDB connection string from the list of connection strings for the account with the az cosmosdb keys list command. With Azure Cosmos DB free tier, you'll get the first 1000 RU/s and 25 GB of storage for free in an account. Select Serverless to create an account in serverless mode. Select Provisioned throughput to create an account in provisioned throughput mode. Use the location that is closest to your users to give them the fastest access to the data. Select a geographic location to host your Azure Cosmos DB account. The name must also be between 3-44 characters in length. The name can only contain lowercase letters, numbers, and the hyphen (-) character. The name will be used as part of a fully qualified domain name (FQDN) with a suffix of, so the name must be globally unique. Select a resource group, or select Create new, then enter a unique name for the new resource group.Įnter a name to identify your Azure Cosmos DB account.

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" Create shell variables for accountName, resourceGroupName, and location.
