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:PSScheduledQueryRuleAznsAction
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Severity

The severity for this alert

Type:String
Position:Named
Default value:None
Required:True
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Trigger

The alert trigger condition

Type:PSScheduledQueryRuleTriggerCondition
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSScheduledQueryRuleAlertingAction