Create an Azure Cosmos DB for Table account
APPLIES TO: Table
An Azure Cosmos DB for Table account contains all of your Azure Cosmos DB resources: tables and items. The account provides a unique endpoint for various tools and SDKs to connect to Azure Cosmos DB and perform everyday operations. For more information about the resources in Azure Cosmos DB, see Azure Cosmos DB resource model.
- An Azure account with an active subscription. Create an account for free.
Create an account
Create a single Azure Cosmos DB account using the API for Table.
Create shell variables for accountName, resourceGroupName, and location.
# Variable for resource group name resourceGroupName="msdocs-cosmos" # Variable for location location="westus" # Variable for account name with a randomnly generated suffix let suffix=$RANDOM*$RANDOM accountName="msdocs-$suffix"
If you haven't already, sign in to the Azure CLI using the
az group createcommand to create a new resource group in your subscription.
az group create \ --name $resourceGroupName \ --location $location
az cosmosdb createcommand to create a new Azure Cosmos DB for Table account with default settings.
az cosmosdb create \ --resource-group $resourceGroupName \ --name $accountName \ --capabilities EnableTable \ --locations regionName=$location
In this guide, you learned how to create an Azure Cosmos DB for Table account.