I'm attempting to list all Databases from a CosmosDB instances using the AZ command line -
az account set --subscription $subscriptionId
az cosmosdb database list --name $cosmosName --resource-group $resourceGroup
The above command is resulting the following response -
Operation Failed: Resource Not Found
When adding the --debug argument I'm presented with the above error as well as the below detail -
Status code: 404
{"code":"NotFound","message":"Entity with the specified id does not exist in the system.\r\nActivityId: d5383919-7c23-4158-bded-2c623d55ab9b, Microsoft.Azure.Documents.Common/2.0.0.0"}
The CosmosDB that I am attempting to query absolutely does exist, derived by running the command az cosmosdb list, and I copied the SubscriptionId and ResourceGroup directly from the portal.
The MS docs and the command az cosmosdb database list --help both seem to suggest what I'm doing should work.
Can anyone suggest what I could do to fix the issue?
--name? That should be the account name (e.g. foryourname.documents.azure.com, you'd specify--name yourname). - David Makogondocument.azure.com. - David Gard