It is a managed disk, but it is locked by azure site recovery. hence i am unable to delete the disk with the help of above API.
thanks for your answer
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have created a VM with site recovery enabled on azure. I delete the disk via the API on the original VM. The replication stops working after this because the disk has been removed on the original VM. However, I tried using the API https://learn.microsoft.com/en-us/rest/api/site-recovery/replication-protected-items/remove-disks?tabs=HTTP to remove the replicated disk. Upon making the API request received a 202 response status code along with a url to poll for status in response header. However, upon polling the url, got to know that the remove disk operation had failed. Please let me know ways to delete the replicated disk via API
It is a managed disk, but it is locked by azure site recovery. hence i am unable to delete the disk with the help of above API.
thanks for your answer
first, check the disk type maybe it is managed or unmanaged
if it is managed, you can use the following to delete managed disk
https://learn.microsoft.com/en-us/rest/api/compute/disks/delete?tabs=HTTP