Nayden Van
Nayden Van

Reputation: 1567

Azure Api management purge

I guys, I am running some test with terraform and terratest, I created a API Management and deleted it, but I didn't realised that APIM has soft delete enabled by default, and now I can't create another one with the same name as I am supposed to purge the deleted one.

I tried to look in azure portal if there an option to purge the deleted APIM (same way as in key vaults) but I cannot find anything. And googling I couldn't find any solution related to purging the deleted APIM. Any help on how I can purge the deleted APIM please?

Upvotes: 0

Views: 2534

Answers (1)

Nayden Van
Nayden Van

Reputation: 1567

To delete a purged APIM instance use the following command:

az rest --method delete --header "Accept=application/json" \
-u 'https://management.azure.com/subscriptions/{SubscriptionId}/providers/Microsoft.ApiManagement/locations/{eastus}/deletedservices/{api name}?api-version=2020-06-01-preview'

Upvotes: 3

Related Questions