Hello @Srinivasan Gurukannan
To stay within the Cosmos DB Free Tier limits:
- Ensure the total provisioned throughput across all containers in your Free Tier accounts does not exceed 1000 RU/s. Use the provided Azure CLI script to check throughput settings.
 - Ensure the total storage consumed by your Cosmos DB accounts does not exceed 25 GB. Use the provided Azure CLI script to check storage usage.
 - Confirm that you are only utilizing the Free Tier benefit in one region per Azure subscription.
 
Step 1: Check Database-Level Throughput:
DATABASE_NAME="YourDatabaseName"
az cosmosdb sql database throughput show 
    --account-name $ACCOUNT_NAME 
    --resource-group $RESOURCE_GROUP 
    --name $DATABASE_NAME 
    --query "{Database:name, Throughput: throughput}"
This command checks throughput at the database level.
Check Container-Level Throughput:
CONTAINER_NAME="YourContainerName"
az cosmosdb sql container throughput show 
    --account-name $ACCOUNT_NAME 
    --resource-group $RESOURCE_GROUP 
    --database-name $DATABASE_NAME 
    --name $CONTAINER_NAME 
    --query "{Container:id, Throughput: throughput}"
Step 2: Checking Storage Usage (GB) using Azure CLI
--- Configuration Variables (Use the same variables as above) ---
2. Check Storage Size (in Bytes) for the Account
echo "Checking total storage size for account: $ACCOUNT_NAME"
Note: Storage metrics are often reported at the account level or require specific metric queries.
We query the 'Total Data Size' metric for the account.
Define the time range (e.g., last 1 hour)
END_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
START_TIME=$(date -u -d '1 hour ago' +"%Y-%m-%dT%H:%M:%SZ")
az monitor metrics list 
    --resource "/subscriptions/{subscriptionId}/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.DocumentDB/databaseAccounts/$ACCOUNT_NAME" 
    --metric "Total Data Size" 
    --interval 1h 
    --start-time $START_TIME 
    --end-time $END_TIME 
    --aggregation Average 
    --query "value[0].timeseries[0].data[-1].total" 
    --output tsv
Expected Output: A large number representing bytes.
Convert this number to GB (Divide by 1024^3) to check against the 25 GB limit.
This script retrieves the TotalStorageUsage metric for a specified Cosmos DB account. It converts the storage usage from bytes to GB and prints the result to the console. Replace "YourCosmosResourceGroup" and "YourCosmosAccountName" with your actual resource group and account names, respectively.
If the Answer is helpful, please click Accept Answer and Up-Vote, so that it can help others in the community looking for help on similar topics.