Edit

Share via


New-AzScheduledQueryRuleAlertingAction

Creates an object of type Alerting Action

Syntax

Default (Default)

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

Parameter properties

Type:PSScheduledQueryRuleAznsAction
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

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

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Severity

The severity for this alert

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ThrottlingInMinutes

The duration in minutes for which alert should be throttled

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Trigger

The alert trigger condition

Parameter properties

Type:PSScheduledQueryRuleTriggerCondition
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

PSScheduledQueryRuleAlertingAction