A way to extend backup monitoring for app services using policy?
There are azure policies for monitoring whether virtual machines have backups or not. Most of the online documentations point towards the two built-in policies which deal with backups. I want to extend/tweak the built-in policy definition to cover App Services as well.
For virtual machine, the backups are listed under backupprotecteditems in Microsoft.RecoveryServices/vaults which is easy enough to audit in policies. The web apps wont have backups there. The backup for a web app, goes in a storage container which were manually created when the backups were enabled.
So I abandoned working with policy and started looking at powershell scripts to automate backups for webapps. I found Get-AzWebAppBackupList command which would do the job for me. But, as with all of azure powershell commands, I assumed it will be working with a REST query under the hood. After some more digging, the command is a POST call to the following url: https://management.azure.com/subscriptions<sub_id>/resourceGroups/<rg-name./providers/Microsoft.Web/sites/<site-name>/config/backup/list?api-version=2019-08-01
I thought if I can check for 'config/backup/list' in policy by using the fields property I can then make Policy do the monitoring for me. But I dont see any of those options while editing policy definition.
Is there any other way I can extend backup monitoring to app services using policy?