New-AzScheduledQueryRuleAlertingAction

Creates an object of type Alerting Action

Syntax

New-AzScheduledQueryRuleAlertingAction
   [-AznsAction <PSScheduledQueryRuleAznsAction>]
   -Severity <String>
   [-ThrottlingInMinutes <Int32>]
   -Trigger <PSScheduledQueryRuleTriggerCondition>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Creates an object of type Alerting Action This object is to be passed to the command that creates Log Alert Rule

Examples

Example 1

PS C:\> $alertingAction = New-AzScheduledQueryRuleAlertingAction -AznsAction $aznsActionGroup -Severity "1" -Trigger $triggerCondition

Parameters

-AznsAction

The AzNS action details

Type:Microsoft.Azure.Commands.Insights.OutputClasses.PSScheduledQueryRuleAznsAction
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Severity

The severity for this alert

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ThrottlingInMinutes

The duration in minutes for which alert should be throttled

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Trigger

The alert trigger condition

Type:Microsoft.Azure.Commands.Insights.OutputClasses.PSScheduledQueryRuleTriggerCondition
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Microsoft.Azure.Commands.Insights.OutputClasses.PSScheduledQueryRuleAlertingAction