'Enter character in MongoDB in Azure Cosmos DB collection. How can I remove the collection?
I'm not able to remove a collection because I managed to add an Enter character in the name somehow.
Here is the URL I found with Fiddler while trying to delete the collection via PowerShell with Remove-AzCosmosDBMongoDBCollection:
DELETE /subscriptions/ad5b32b4-1023-4e0a-bc65-fc09541cf7df/resourceGroups/RG-WORK-02/providers/Microsoft.DocumentDB/databaseAccounts/work-mongodb-02/mongodbDatabases/WORK/collections/%2Fsubscriptions%2Fad5b32b4-1023-4e0a-bc65-fc09541cf7df%2FresourceGroups%2FRG-WORK-02%2Fproviders%2FMicrosoft.DocumentDB%2FdatabaseAccounts%2Fwork-mongodb-02%2FmongodbDatabases%2FWORK%2Fcollections%2Fjustatest%0A?api-version=2021-04-15 HTTP/1.1
%0A is an enter character for an URL.
I've tried all kind of things
- Adding the escape characters r n, n and r separated with the name in PowerShell.
- I tried it by first calling the collection & then removing it..
- I tried it through ATLAS Compass by copying the special character
- The portal of course by copying all kinds of things (unsuccessful).
I cannot create a support ticket because it's an MSDN environment. Does anyone else have an idea or an incredible creative idea?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
