Add-AzWebtestAlertRule中没有动作组参数

我想创建具有可用性的AppInsights测试(WebTest),并使用Azure Powershell将电子邮件警报规则附加到该测试。而且我想将具有所需电子邮件地址的现有actionGroup附加到警报规则。

根据最新的Add-AzWebtestAlertRule方法documentation,没有actionGroup参数。但是,在Azure门户中,我们可以将现有操作组附加到WebTest警报规则。 Add-AzWebtestAlertRule仅具有类型为List 1 [microsoft.Azure.Management.Monitor.Management.Models.Ruleaction]>]`的“ action”属性,但尚不清楚如何使用该属性。

另外,如果看看Add-AzMetricAlertRuleV2,它确实具有actionGroup属性,因此我们可以将操作组附加到该属性。

这就是为什么一个方法具有actionGroup属性,而另一个方法却具有相似性的原因。也许有一种方法可以使用“动作”属性来附加动作组,但尚不清楚如何。

lizhc 回答:Add-AzWebtestAlertRule中没有动作组参数

根据我的研究,命令Add-AzWebtestAlertRule提供了属性action。其类型为List`1[Microsoft.Azure.Management.Monitor.Management.Models.RuleAction]。我们可以使用该属性来确保在满足规则条件后我们将执行哪些操作。有关更多详细信息,请参阅documententer image description here

本文链接:https://www.f2er.com/3138141.html

大家都在问