问题
I have created some of the new alerts through the portal UI and now need to deploy these by resource manager template, but I am unable to locate the JSON schema for this resource type.
I can find the resource listing in the relevant resource group in the Resource Explorer website (looks like it must be the type microsoft.insights/scheduledqueryrules), but the JSON to create the resource does not exist.
There is documentation for templating the classic alerts, but nothing for the new type.
Is it possible.
回答1:
You need to use the Resource Explorer in Azure Portal, not the https://resources.azure.com/ one as it seems to not include everything.
I wrote a blog about the whole process. It includes the ARM template and some common gotchas you might come across.
http://chapsas.com/setting-up-alerts-using-application-insights-the-new-ones/
来源:https://stackoverflow.com/questions/49739021/create-azure-alerts-not-classic-by-resource-manager-templates