New-AzScheduledQueryRuleTriggerCondition

Creates an object of type Trigger Condition

Syntax

New-AzScheduledQueryRuleTriggerCondition
   -ThresholdOperator <String>
   -Threshold <Double>
   [-MetricTrigger <PSScheduledQueryRuleLogMetricTrigger>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

Creates an object of type Trigger Condition. This object is to be passed to the command that creates Alerting Action object

Examples

Example 1

PS C:\>  $triggerCondition = New-AzScheduledQueryRuleTriggerCondition -ThresholdOperator "GreaterThan" -Threshold 3 -MetricTrigger $metricTrigger

Parameters

-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
-MetricTrigger

Trigger condition for metric query rule

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

The threshold above which alert gets fired

Type:Double
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ThresholdOperator

The threshold operator : GreaterThan, LessThan or Equal

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

Inputs

None

Outputs

Microsoft.Azure.Commands.Insights.OutputClasses.PSScheduledQueryRuleTriggerCondition