Share via

How to fix 'Microsoft.DocumentDB' for api version 'xxxx-xx-xx'

Shiva Nathan 0 Reputation points
2025-10-03T22:48:38.6233333+00:00

In AzureGov subscription, we are unable to deploy an Azure managed instance of Cassandra cluster.

We receive an error, "Resource type cannot be found in the namespace 'Microsoft.DocumentDB' for api version 'xxxx-xx-xx'". We have tried several API versions and still do not have a resolution.

Azure Cosmos DB
Azure Cosmos DB

An Azure NoSQL database service for app development.


1 answer

Sort by: Most helpful
  1. Jerald Felix 12,050 Reputation points Volunteer Moderator
    2025-10-04T02:48:58.38+00:00

    Hi Shiva Nathan,

    Thanks for your question about the "Resource type cannot be found in the namespace 'Microsoft.DocumentDB' for api version 'xxxx-xx-xx'" error when deploying Azure Managed Instance for Apache Cassandra in Azure Gov. This typically occurs due to an unregistered resource provider, unsupported API version in Gov clouds, or region-specific availability issues. Azure Gov has some differences from commercial Azure, so not all features/API versions are immediately available. Let's resolve it step by step.

    Troubleshooting and Fix

    Register the Resource Provider:

    In Azure CLI (ensure you're logged into Azure Gov: az cloud set --name AzureUSGovernment), run:

       text
       az provider register --namespace Microsoft.DocumentDB --wait
    
      This registers Cosmos DB (DocumentDB) for your subscription. Wait for confirmation (it can take 5-10 minutes). Check status with **`az provider show --namespace Microsoft.DocumentDB`**.
      
      **Verify Supported API Versions**:
      
         List available API versions for DocumentDB in your subscription:
         
         ```yaml
         text
         az provider show --namespace Microsoft.DocumentDB --query "resourceTypes[?resourceType=='databaseAccounts'].apiVersions"
         ```
         
            Common supported versions include 2023-04-15, 2022-08-15, etc.—pick the latest one that matches (e.g., avoid 'xxxx-xx-xx' if it's invalid). For Managed Cassandra, try 2023-04-15 or check the [Cosmos DB API docs](https://learn.microsoft.com/en-us/azure/cosmos-db/managed-cassandra/introduction) for Gov specifics.
            
            **Update Your Deployment Template**:
            
               In your ARM template or Bicep file, set the **`apiVersion`** to a supported one from step 2, e.g.:
               
               ```json
               text
               "type": "Microsoft.DocumentDB/databaseAccounts",
    

    "apiVersion": "2023-04-15", ```

                  Ensure the location is a supported Gov region (e.g., USGov Virginia) and that Managed Cassandra is available there—it's in preview in some regions, so confirm via portal or **`az feature list`**.
                  
                  **Additional Checks**:
                  
                     If using PowerShell/CLI for deployment, update to the latest version (e.g., **`az upgrade`**) to ensure API compatibility.
                     
                        Test a simple Cosmos DB account creation first: **`az cosmosdb create --name <account> --resource-group <rg> --kind GlobalDocumentDB --locations region=USGovVirginia failoverPriority=0`**.
                        
                           If the error persists, it might be a Gov-specific limitation—open a support ticket via Azure Portal with your subscription ID and error details for escalation.
                           
    

    This should get your deployment working. Managed Cassandra is under Microsoft.DocumentDB, so once registered, it should proceed. If you share your exact API version or template snippet, I can refine this further!

    Best Regards,

    Jerald Felix

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.