An Azure NoSQL database service for app development.
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