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.
Prerequisites
- An Azure account with an active subscription. Create a trial subscription.
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="chinanorth" # 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 login
command.Use the
az group create
command to create a new resource group in your subscription.az group create \ --name $resourceGroupName \ --location $location
Use the
az cosmosdb create
command 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
Next steps
In this guide, you learned how to create an Azure Cosmos DB for Table account.