How do we purge a soft-deleted resource using az?
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
[Enter feedback here]
Get an error below, how do I prege this resource? We have the resource ID.
I tried "az resource delete", it does not return anything but it also does not purge it.
Thanks
Error: creating "test-service" (Resource Group "test-rg"): cognitiveservices.AccountsClient#Create: Failure sending request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status= Code="FlagMustBeSetForRestore" Message="An existing resource with ID '/subscriptions/****/resourceGroups/test-rg/providers/Microsoft.CognitiveServices/accounts/test-service' has been soft-deleted. To restore the resource, you must specify 'restore' to be 'true' in the property. If you don't want to restore existing resource, please purge it first."
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: e76a8ad2-efd8-9e8a-9b2b-eebeb1e9d1d4
* Version Independent ID: 280b7ea9-eb6c-9601-464b-09bf8e0cff5d
* Content: [az resource](https://docs.microsoft.com/en-us/cli/azure/resource?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/resource.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/master/latest/docs-ref-autogen/resource.yml)
* Service: **azure-resource-manager**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**
Contributor guide
Assessment
This issue has not been assessed yet.