I want to create the AppInsights with Availability test (WebTest), and attach email alert rule to it using Azure Powershell. And I'd like to attach the already existing ActionGroup with needed email addresses to the alert rule.
According to latest Add-AzWebtestAlertRule method documentation, there is no ActionGroup parameter. However, in Azure portal we can attach the existing action group to the WebTest alert rule.
The Add-AzWebtestAlertRule has only the "Action" property which is of type List
1[Microsoft.Azure.Management.Monitor.Management.Models.RuleAction]>]`, but it's not clear how to use that one.
Also, if take a look at Add-AzMetricAlertRuleV2, it does have the ActionGroup property and so we can attach action group to it.
So this is the confusion why one method has ActionGroup prop, and another one that seems similar, does not. Maybe there is a way to use the "Action" property to attach action group, but it's not clear how.