Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .rule_condition_py3 import RuleCondition
class LocationThresholdRuleCondition(RuleCondition):
"""A rule condition based on a certain number of locations failing.
All required parameters must be populated in order to send to Azure.
:param data_source: the resource from which the rule collects its data.
For this type dataSource will always be of type RuleMetricDataSource.
:type data_source: ~azure.mgmt.monitor.models.RuleDataSource
:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param window_size: 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.
:type window_size: timedelta
:param failed_location_count: Required. the number of locations that must
fail to activate the alert.
:type failed_location_count: int
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .rule_condition_py3 import RuleCondition
class ThresholdRuleCondition(RuleCondition):
"""A rule condition based on a metric crossing a threshold.
All required parameters must be populated in order to send to Azure.
:param data_source: the resource from which the rule collects its data.
For this type dataSource will always be of type RuleMetricDataSource.
:type data_source: ~azure.mgmt.monitor.models.RuleDataSource
:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param operator: Required. the operator used to compare the data and the
threshold. Possible values include: 'GreaterThan', 'GreaterThanOrEqual',
'LessThan', 'LessThanOrEqual'
:type operator: str or ~azure.mgmt.monitor.models.ConditionOperator
:param threshold: Required. the threshold value that activates the alert.
:type threshold: float
:param window_size: the period of time (in ISO 8601 duration format) that
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from .rule_condition_py3 import RuleCondition
class ManagementEventRuleCondition(RuleCondition):
"""A management event rule condition.
All required parameters must be populated in order to send to Azure.
:param data_source: the resource from which the rule collects its data.
For this type dataSource will always be of type RuleMetricDataSource.
:type data_source: ~azure.mgmt.monitor.models.RuleDataSource
:param odatatype: Required. Constant filled by server.
:type odatatype: str
:param aggregation: How the data that is collected should be combined over
time and when the alert is activated. Note that for management event
alerts aggregation is optional – if it is not provided then any event will
cause the alert to activate.
:type aggregation:
~azure.mgmt.monitor.models.ManagementEventAggregationCondition
"""