Edit

Share via


New-AzScheduledQueryRuleTriggerCondition

Creates an object of type Trigger Condition

Syntax

Default (Default)

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.

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

-MetricTrigger

Trigger condition for metric query rule

Parameter properties

Type:PSScheduledQueryRuleLogMetricTrigger
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

-Threshold

The threshold above which alert gets fired

Parameter properties

Type:Double
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

-ThresholdOperator

The threshold operator : GreaterThan, LessThan or Equal

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

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

PSScheduledQueryRuleTriggerCondition