Azure Cosmos DB Quickstarts
Get started quickly with Azure Cosmos DB by following these step-by-step guides to create your first database account and explore its capabilities.
Create an Azure Cosmos DB Account using the REST API
Learn how to programmatically create an Azure Cosmos DB account using its powerful REST API. This is ideal for automation and integration scenarios.
View Guide
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts?api-version=2021-05-15
Create an Azure Cosmos DB Account using an SDK
Discover how to create an Azure Cosmos DB account using various SDKs, including .NET, Java, Python, and Node.js. Choose the language that best suits your development environment.
View Guide
// Example for .NET SDK
var cosmosClient = new CosmosClient(accountEndpoint, accountKey);
var databaseResponse = await cosmosClient.CreateDatabaseIfNotExistsAsync("myDatabase");
Create an Azure Cosmos DB Account using the Azure CLI
Use the Azure Command-Line Interface (CLI) to quickly provision an Azure Cosmos DB account. This method is efficient for scripting and command-line operations.
View Guide
az cosmosdb create --name mycosmosdbaccount --resource-group myresourcegroup --kind GlobalDocument
Create an Azure Cosmos DB Account using Azure PowerShell
Leverage Azure PowerShell to automate the creation of your Azure Cosmos DB accounts. This guide is useful for Windows-based administration and scripting.
View Guide
New-AzResourceGroup -Name "myResourceGroup" -Location "East US"
New-AzCosmosDBAccount -ResourceGroupName "myResourceGroup" -Name "mycosmosdbaccount" -Location "East US" -ApiKind Sql
Next Steps
After creating your Cosmos DB account, you'll want to learn how to manage your data, optimize performance, and integrate with other Azure services. Explore our tutorials for in-depth guidance.
Explore Tutorials