Search code examples
windowsazurenosqlazure-cosmosdbserverless

CosmosDB is not allowing serverless capabalities to NoSQL, it says I must use CapacityMode


I am learning Azure and I just created a fresh account. I attempted to create a Cosmos DB NoSQL account, choosing the serverless capacity mode. This is for a small educational project that would not require many requests or activity. When I try to deploy I receive a failure message saying:

Error Details:

BadRequest: Capability EnableServerless is not allowed in API version beyond 2024-05-15-preview. Used API Version: 2024-05-15-preview. Use CapacityMode instead to serverless. ActivityId: 489b235f-666d-4ae8-8000-3ec036c63e58, Microsoft.Azure.Documents.Common/2.14.0 (Code: BadRequest, Target: /subscriptions/4070fa8a-409d-41a2-a276-43b501561297/resourceGroups/personalwebsite-rg/providers/Microsoft.DocumentDb/databaseAccounts/personalsite)

Raw Error:

{
  "code": "DeploymentFailed",
  "target": "/subscriptions/4070fa8a-409d-41a2-a276-43b501561297/resourceGroups/personalwebsite-rg/providers/Microsoft.Resources/deployments/Microsoft.Azure.CosmosDB-20240426190336",
  "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.",
  "details": [
    {
      "code": "BadRequest",
      "target": "/subscriptions/4070fa8a-409d-41a2-a276-43b501561297/resourceGroups/personalwebsite-rg/providers/Microsoft.DocumentDb/databaseAccounts/personalsite",
      "message": "BadRequest: Capability EnableServerless is not allowed in API version beyond 2024-05-15-preview. Used API Version: 2024-05-15-preview. Use CapacityMode instead to serverless.\r\nActivityId: 489b235f-666d-4ae8-8000-3ec036c63e58, Microsoft.Azure.Documents.Common/2.14.0"
    }
  ]
}

Operation Detail:

BadRequest: Capability EnableServerless is not allowed in API version beyond 2024-05-15-preview. Used API Version: 2024-05-15-preview. Use CapacityMode instead to serverless.\r\nActivityId: 489b235f-666d-4ae8-8000-3ec036c63e58, Microsoft.Azure.Documents.Common/2.14.0

My account is using the standard "Azure Plan" subscription. The current resource group is located in EAST 2, currently using the resource group for Static Web App and Storage Account with no issues.


Solution

  • After repeating the steps that caused the initial failure days after posting this, it seems the issue has been resolved on Microsoft's side. Deployment of the CosmosDB account took much longer than usual and the portal seemingly has a bit of a different layout, so it might have just been a bug on their end as they were rolling out this update.