ThresholdRuleCondition Class

A rule condition based on a metric crossing a threshold.

All required parameters must be populated in order to send to Azure.

Inheritance
azure.mgmt.monitor.v2015_04_01.models._models_py3.RuleCondition
ThresholdRuleCondition

Constructor

ThresholdRuleCondition(*, operator: Union[str, azure.mgmt.monitor.v2015_04_01.models._monitor_management_client_enums.ConditionOperator], threshold: float, data_source: Optional[azure.mgmt.monitor.v2015_04_01.models._models_py3.RuleDataSource] = None, window_size: Optional[datetime.timedelta] = None, time_aggregation: Optional[Union[str, azure.mgmt.monitor.v2015_04_01.models._monitor_management_client_enums.TimeAggregationOperator]] = None, **kwargs)

Variables

odata_type
str

Required. specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition (based on the number of failures of a web test), and ThresholdRuleCondition (based on the threshold of a metric).Constant filled by server.

data_source
<xref:$>(<xref:python-base-namespace>)RuleDataSource

the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.

operator
str or <xref:$>(<xref:python-base-namespace>)ConditionOperator

Required. the operator used to compare the data and the threshold. Possible values include: "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual".

threshold
float

Required. the threshold value that activates the alert.

window_size
timedelta

the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day.

time_aggregation
str or <xref:$>(<xref:python-base-namespace>)TimeAggregationOperator

the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible values include: "Average", "Minimum", "Maximum", "Total", "Last".