Close all related alerts

Microsoft.SystemCenter.MicrosoftAzure.Insights.BaseRuleClass.CloseAllAlerts.Task (Task)

Task changes the state of all alerts to "Closed" for the corresponding rule. "Time Range Hours" option defines the period of time in the past over which Azure Alerts are looked for. Default Maximum Time range — 30 days (720 hours).

Element properties:

TargetMicrosoft.SystemCenter.MicrosoftAzure.Insights.BaseRuleClass
AccessibilityPublic
CategorySystem
EnabledTrue
RemotableFalse
Timeout900

Member Modules:

ID Module Type TypeId RunAs 
WA WriteAction Microsoft.SystemCenter.MicrosoftAzure.Insights.BaseRuleClass.CloseAllAlerts.Task.WA Default

Source Code:

<Task ID="Microsoft.SystemCenter.MicrosoftAzure.Insights.BaseRuleClass.CloseAllAlerts.Task" Accessibility="Public" Enabled="true" Target="Microsoft.SystemCenter.MicrosoftAzure.Insights.BaseRuleClass" Timeout="900" Remotable="true">
<Category>System</Category>
<WriteAction ID="WA" TypeID="Microsoft.SystemCenter.MicrosoftAzure.Insights.BaseRuleClass.CloseAllAlerts.Task.WA">
<ADUserName>$RunAs[Name="Microsoft.SystemCenter.MicrosoftAzure.RunAsProfile.ADCredentials"]/UserName$</ADUserName>
<ADPassword>$RunAs[Name="Microsoft.SystemCenter.MicrosoftAzure.RunAsProfile.ADCredentials"]/Password$</ADPassword>
<ADClientId>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/ClientId$</ADClientId>
<SubscriptionId>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/SubscriptionId$</SubscriptionId>
<Proxy>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/ProxyServerAddress$</Proxy>
<AuthBaseAddress>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/Authority$</AuthBaseAddress>
<ResourceBaseAddress>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/ArmServiceUri$</ResourceBaseAddress>
<Audience>$Target/Host/Host/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.Subscription"]/ResourceUri$</Audience>
<TimeoutSeconds>300</TimeoutSeconds>
<ServiceId>$Target/Property[Type="Microsoft.SystemCenter.MicrosoftAzure.AzureServiceGeneric"]/ServiceId$</ServiceId>
<TimeRange>720</TimeRange>
</WriteAction>
</Task>