I have created 1 web test classic alert through the Azure Portal. Now I want to convert the classic alert to the new alert .I am using the following ARM template for the same.
{
"name": "TestMetricAlert",
"type": "Microsoft.Insights/metricAlerts",
"apiVersion": "2018-03-01",
"location": "global",
"tags": {},
"properties": {
"description": "Test Metric Description",
"severity": 2,
"enabled": true,
"scopes": [
],
"evaluationFrequency": "PT5M",
"windowSize": "PT5M",
"targetResourceType": "Microsoft.Insights/webtests",
"targetResourceRegion": "eastus",
"criteria": {
"additionalProperties": {},
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"
},
"dependsOn": [
"/subscriptions/a85f72bb-4bc4-4a9a-b77b-83db1cc0e1e4/resourceGroups/TestProjectRG/providers/microsoft.insights/webtests/testalert-testappinsights"
],
"autoMitigate": false,
"actions": [
{
"actionGroupId": "/subscriptions/a85f72bb-4bc4-4a9a-b77b-83db1cc0e1e4/resourceGroups/TestProjectRG/providers/microsoft.insights/actionGroups/TestAction"
}
]
}
}
But during deployment I am getting the following error.
Template deployment returned the following errors:
11:56:16 - 11:56:15 AM - Resource Microsoft.Insights/metricAlerts 'TestMetricAlert' failed with message '{
11:56:16 - "Code": "BadRequest",
11:56:16 - "Message": "No object created."
11:56:16 - }'
Could someone help me in rectifying what is wrong here or anything needs to be changed in the ARM template.