From 57749ba38f92a4b2e29d583929f487c289a976ea Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 18 Apr 2019 07:18:01 +0000 Subject: [PATCH 1/3] Generated from 74bb59c05d38452155d9af98a26da148d796c581 Rename microsoft.insight --- .../azure/mgmt/monitor/models/__init__.py | 18 +++-- .../monitor/models/dynamic_metric_criteria.py | 80 +++++++++++++++++++ .../models/dynamic_metric_criteria_py3.py | 80 +++++++++++++++++++ .../dynamic_threshold_failing_periods.py | 42 ++++++++++ .../dynamic_threshold_failing_periods_py3.py | 42 ++++++++++ ...ingle_resource_multiple_metric_criteria.py | 4 +- ...e_resource_multiple_metric_criteria_py3.py | 4 +- .../monitor/models/multi_metric_criteria.py | 27 ++++++- .../models/multi_metric_criteria_py3.py | 29 ++++++- ..._criteria.py => static_metric_criteria.py} | 31 +++---- ...a_py3.py => static_metric_criteria_py3.py} | 33 ++++---- 11 files changed, 338 insertions(+), 52 deletions(-) create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria_py3.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods.py create mode 100644 azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods_py3.py rename azure-mgmt-monitor/azure/mgmt/monitor/models/{metric_criteria.py => static_metric_criteria.py} (87%) rename azure-mgmt-monitor/azure/mgmt/monitor/models/{metric_criteria_py3.py => static_metric_criteria_py3.py} (84%) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py index 2e0e28c930b..a0c344323ec 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py @@ -100,11 +100,13 @@ from .metric_alert_status_properties_py3 import MetricAlertStatusProperties from .metric_alert_status_py3 import MetricAlertStatus from .metric_alert_status_collection_py3 import MetricAlertStatusCollection - from .metric_dimension_py3 import MetricDimension - from .metric_criteria_py3 import MetricCriteria + from .static_metric_criteria_py3 import StaticMetricCriteria from .metric_alert_single_resource_multiple_metric_criteria_py3 import MetricAlertSingleResourceMultipleMetricCriteria + from .metric_dimension_py3 import MetricDimension from .multi_metric_criteria_py3 import MultiMetricCriteria from .metric_alert_multiple_resource_multiple_metric_criteria_py3 import MetricAlertMultipleResourceMultipleMetricCriteria + from .dynamic_threshold_failing_periods_py3 import DynamicThresholdFailingPeriods + from .dynamic_metric_criteria_py3 import DynamicMetricCriteria from .source_py3 import Source from .schedule_py3 import Schedule from .action_py3 import Action @@ -216,11 +218,13 @@ from .metric_alert_status_properties import MetricAlertStatusProperties from .metric_alert_status import MetricAlertStatus from .metric_alert_status_collection import MetricAlertStatusCollection - from .metric_dimension import MetricDimension - from .metric_criteria import MetricCriteria + from .static_metric_criteria import StaticMetricCriteria from .metric_alert_single_resource_multiple_metric_criteria import MetricAlertSingleResourceMultipleMetricCriteria + from .metric_dimension import MetricDimension from .multi_metric_criteria import MultiMetricCriteria from .metric_alert_multiple_resource_multiple_metric_criteria import MetricAlertMultipleResourceMultipleMetricCriteria + from .dynamic_threshold_failing_periods import DynamicThresholdFailingPeriods + from .dynamic_metric_criteria import DynamicMetricCriteria from .source import Source from .schedule import Schedule from .action import Action @@ -372,11 +376,13 @@ 'MetricAlertStatusProperties', 'MetricAlertStatus', 'MetricAlertStatusCollection', - 'MetricDimension', - 'MetricCriteria', + 'StaticMetricCriteria', 'MetricAlertSingleResourceMultipleMetricCriteria', + 'MetricDimension', 'MultiMetricCriteria', 'MetricAlertMultipleResourceMultipleMetricCriteria', + 'DynamicThresholdFailingPeriods', + 'DynamicMetricCriteria', 'Source', 'Schedule', 'Action', diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria.py new file mode 100644 index 00000000000..4d21ef377c6 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria.py @@ -0,0 +1,80 @@ +# 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 .multi_metric_criteria import MultiMetricCriteria + + +class DynamicMetricCriteria(MultiMetricCriteria): + """Criterion for dynamic threshold. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Name of the criteria. + :type name: str + :param metric_name: Required. Name of the metric. + :type metric_name: str + :param metric_namespace: Namespace of the metric. + :type metric_namespace: str + :param time_aggregation: Required. the criteria time aggregation types. + :type time_aggregation: object + :param dimensions: List of dimension conditions. + :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] + :param criterion_type: Required. Constant filled by server. + :type criterion_type: str + :param operator: Required. The condition used to compare the metric value + against the threshold + :type operator: object + :param alert_sensitivity: Required. The sensitivity of the threshold + :type alert_sensitivity: object + :param failing_periods: Required. Select minimum number of violations + within the selected lookback time window required to raise an alert + :type failing_periods: + ~azure.mgmt.monitor.models.DynamicThresholdFailingPeriods + :param ignore_data_before: Use this option to set the date from which to + start learning the metric historical data and calculate the dynamic + thresholds + :type ignore_data_before: datetime + """ + + _validation = { + 'name': {'required': True}, + 'metric_name': {'required': True}, + 'time_aggregation': {'required': True}, + 'criterion_type': {'required': True}, + 'operator': {'required': True}, + 'alert_sensitivity': {'required': True}, + 'failing_periods': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'object'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'criterion_type': {'key': 'criterionType', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'object'}, + 'alert_sensitivity': {'key': 'alertSensitivity', 'type': 'object'}, + 'failing_periods': {'key': 'failingPeriods', 'type': 'DynamicThresholdFailingPeriods'}, + 'ignore_data_before': {'key': 'ignoreDataBefore', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(DynamicMetricCriteria, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.alert_sensitivity = kwargs.get('alert_sensitivity', None) + self.failing_periods = kwargs.get('failing_periods', None) + self.ignore_data_before = kwargs.get('ignore_data_before', None) + self.criterion_type = 'DynamicThresholdCriterion' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria_py3.py new file mode 100644 index 00000000000..5e0901ac5ea --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria_py3.py @@ -0,0 +1,80 @@ +# 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 .multi_metric_criteria_py3 import MultiMetricCriteria + + +class DynamicMetricCriteria(MultiMetricCriteria): + """Criterion for dynamic threshold. + + All required parameters must be populated in order to send to Azure. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, object] + :param name: Required. Name of the criteria. + :type name: str + :param metric_name: Required. Name of the metric. + :type metric_name: str + :param metric_namespace: Namespace of the metric. + :type metric_namespace: str + :param time_aggregation: Required. the criteria time aggregation types. + :type time_aggregation: object + :param dimensions: List of dimension conditions. + :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] + :param criterion_type: Required. Constant filled by server. + :type criterion_type: str + :param operator: Required. The condition used to compare the metric value + against the threshold + :type operator: object + :param alert_sensitivity: Required. The sensitivity of the threshold + :type alert_sensitivity: object + :param failing_periods: Required. Select minimum number of violations + within the selected lookback time window required to raise an alert + :type failing_periods: + ~azure.mgmt.monitor.models.DynamicThresholdFailingPeriods + :param ignore_data_before: Use this option to set the date from which to + start learning the metric historical data and calculate the dynamic + thresholds + :type ignore_data_before: datetime + """ + + _validation = { + 'name': {'required': True}, + 'metric_name': {'required': True}, + 'time_aggregation': {'required': True}, + 'criterion_type': {'required': True}, + 'operator': {'required': True}, + 'alert_sensitivity': {'required': True}, + 'failing_periods': {'required': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'object'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'criterion_type': {'key': 'criterionType', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'object'}, + 'alert_sensitivity': {'key': 'alertSensitivity', 'type': 'object'}, + 'failing_periods': {'key': 'failingPeriods', 'type': 'DynamicThresholdFailingPeriods'}, + 'ignore_data_before': {'key': 'ignoreDataBefore', 'type': 'iso-8601'}, + } + + def __init__(self, *, name: str, metric_name: str, time_aggregation, operator, alert_sensitivity, failing_periods, additional_properties=None, metric_namespace: str=None, dimensions=None, ignore_data_before=None, **kwargs) -> None: + super(DynamicMetricCriteria, self).__init__(additional_properties=additional_properties, name=name, metric_name=metric_name, metric_namespace=metric_namespace, time_aggregation=time_aggregation, dimensions=dimensions, **kwargs) + self.operator = operator + self.alert_sensitivity = alert_sensitivity + self.failing_periods = failing_periods + self.ignore_data_before = ignore_data_before + self.criterion_type = 'DynamicThresholdCriterion' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods.py new file mode 100644 index 00000000000..24ce832e65a --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class DynamicThresholdFailingPeriods(Model): + """Select minimum number of violations within the selected lookback time + window required to raise an alert. + + All required parameters must be populated in order to send to Azure. + + :param number_of_evaluation_periods: Required. Select how many t the + lookback time window, + :type number_of_evaluation_periods: float + :param min_failing_periods_to_alert: Required. The least number of + violations + :type min_failing_periods_to_alert: float + """ + + _validation = { + 'number_of_evaluation_periods': {'required': True}, + 'min_failing_periods_to_alert': {'required': True}, + } + + _attribute_map = { + 'number_of_evaluation_periods': {'key': 'numberOfEvaluationPeriods', 'type': 'float'}, + 'min_failing_periods_to_alert': {'key': 'minFailingPeriodsToAlert', 'type': 'float'}, + } + + def __init__(self, **kwargs): + super(DynamicThresholdFailingPeriods, self).__init__(**kwargs) + self.number_of_evaluation_periods = kwargs.get('number_of_evaluation_periods', None) + self.min_failing_periods_to_alert = kwargs.get('min_failing_periods_to_alert', None) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods_py3.py new file mode 100644 index 00000000000..92d1b8f3142 --- /dev/null +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods_py3.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class DynamicThresholdFailingPeriods(Model): + """Select minimum number of violations within the selected lookback time + window required to raise an alert. + + All required parameters must be populated in order to send to Azure. + + :param number_of_evaluation_periods: Required. Select how many t the + lookback time window, + :type number_of_evaluation_periods: float + :param min_failing_periods_to_alert: Required. The least number of + violations + :type min_failing_periods_to_alert: float + """ + + _validation = { + 'number_of_evaluation_periods': {'required': True}, + 'min_failing_periods_to_alert': {'required': True}, + } + + _attribute_map = { + 'number_of_evaluation_periods': {'key': 'numberOfEvaluationPeriods', 'type': 'float'}, + 'min_failing_periods_to_alert': {'key': 'minFailingPeriodsToAlert', 'type': 'float'}, + } + + def __init__(self, *, number_of_evaluation_periods: float, min_failing_periods_to_alert: float, **kwargs) -> None: + super(DynamicThresholdFailingPeriods, self).__init__(**kwargs) + self.number_of_evaluation_periods = number_of_evaluation_periods + self.min_failing_periods_to_alert = min_failing_periods_to_alert diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py index ccc84e1991c..6556885da9a 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py @@ -24,7 +24,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): :param odatatype: Required. Constant filled by server. :type odatatype: str :param all_of: The list of metric criteria for this 'all of' operation. - :type all_of: list[~azure.mgmt.monitor.models.MetricCriteria] + :type all_of: list[~azure.mgmt.monitor.models.StaticMetricCriteria] """ _validation = { @@ -34,7 +34,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, - 'all_of': {'key': 'allOf', 'type': '[MetricCriteria]'}, + 'all_of': {'key': 'allOf', 'type': '[StaticMetricCriteria]'}, } def __init__(self, **kwargs): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py index 7e74e7a9027..115e6f7b50d 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py @@ -24,7 +24,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): :param odatatype: Required. Constant filled by server. :type odatatype: str :param all_of: The list of metric criteria for this 'all of' operation. - :type all_of: list[~azure.mgmt.monitor.models.MetricCriteria] + :type all_of: list[~azure.mgmt.monitor.models.StaticMetricCriteria] """ _validation = { @@ -34,7 +34,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, - 'all_of': {'key': 'allOf', 'type': '[MetricCriteria]'}, + 'all_of': {'key': 'allOf', 'type': '[StaticMetricCriteria]'}, } def __init__(self, *, additional_properties=None, all_of=None, **kwargs) -> None: diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria.py index 03c567924a3..7f7909a8f32 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria.py @@ -16,31 +16,54 @@ class MultiMetricCriteria(Model): """The types of conditions for a multi resource alert. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MetricCriteria + sub-classes are: StaticMetricCriteria, DynamicMetricCriteria All required parameters must be populated in order to send to Azure. :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] + :param name: Required. Name of the criteria. + :type name: str + :param metric_name: Required. Name of the metric. + :type metric_name: str + :param metric_namespace: Namespace of the metric. + :type metric_namespace: str + :param time_aggregation: Required. the criteria time aggregation types. + :type time_aggregation: object + :param dimensions: List of dimension conditions. + :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] :param criterion_type: Required. Constant filled by server. :type criterion_type: str """ _validation = { + 'name': {'required': True}, + 'metric_name': {'required': True}, + 'time_aggregation': {'required': True}, 'criterion_type': {'required': True}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'object'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, 'criterion_type': {'key': 'criterionType', 'type': 'str'}, } _subtype_map = { - 'criterion_type': {'StaticThresholdCriterion': 'MetricCriteria'} + 'criterion_type': {'StaticThresholdCriterion': 'StaticMetricCriteria', 'DynamicThresholdCriterion': 'DynamicMetricCriteria'} } def __init__(self, **kwargs): super(MultiMetricCriteria, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) + self.name = kwargs.get('name', None) + self.metric_name = kwargs.get('metric_name', None) + self.metric_namespace = kwargs.get('metric_namespace', None) + self.time_aggregation = kwargs.get('time_aggregation', None) + self.dimensions = kwargs.get('dimensions', None) self.criterion_type = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria_py3.py index 20c983aab66..554c08886d7 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria_py3.py @@ -16,31 +16,54 @@ class MultiMetricCriteria(Model): """The types of conditions for a multi resource alert. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: MetricCriteria + sub-classes are: StaticMetricCriteria, DynamicMetricCriteria All required parameters must be populated in order to send to Azure. :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] + :param name: Required. Name of the criteria. + :type name: str + :param metric_name: Required. Name of the metric. + :type metric_name: str + :param metric_namespace: Namespace of the metric. + :type metric_namespace: str + :param time_aggregation: Required. the criteria time aggregation types. + :type time_aggregation: object + :param dimensions: List of dimension conditions. + :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] :param criterion_type: Required. Constant filled by server. :type criterion_type: str """ _validation = { + 'name': {'required': True}, + 'metric_name': {'required': True}, + 'time_aggregation': {'required': True}, 'criterion_type': {'required': True}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, + 'name': {'key': 'name', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'object'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, 'criterion_type': {'key': 'criterionType', 'type': 'str'}, } _subtype_map = { - 'criterion_type': {'StaticThresholdCriterion': 'MetricCriteria'} + 'criterion_type': {'StaticThresholdCriterion': 'StaticMetricCriteria', 'DynamicThresholdCriterion': 'DynamicMetricCriteria'} } - def __init__(self, *, additional_properties=None, **kwargs) -> None: + def __init__(self, *, name: str, metric_name: str, time_aggregation, additional_properties=None, metric_namespace: str=None, dimensions=None, **kwargs) -> None: super(MultiMetricCriteria, self).__init__(**kwargs) self.additional_properties = additional_properties + self.name = name + self.metric_name = metric_name + self.metric_namespace = metric_namespace + self.time_aggregation = time_aggregation + self.dimensions = dimensions self.criterion_type = None diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria.py similarity index 87% rename from azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py rename to azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria.py index 726e08b77ee..b74955f579f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria.py @@ -12,7 +12,7 @@ from .multi_metric_criteria import MultiMetricCriteria -class MetricCriteria(MultiMetricCriteria): +class StaticMetricCriteria(MultiMetricCriteria): """Criterion to filter metrics. All required parameters must be populated in order to send to Azure. @@ -20,53 +20,48 @@ class MetricCriteria(MultiMetricCriteria): :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] - :param criterion_type: Required. Constant filled by server. - :type criterion_type: str :param name: Required. Name of the criteria. :type name: str :param metric_name: Required. Name of the metric. :type metric_name: str :param metric_namespace: Namespace of the metric. :type metric_namespace: str - :param operator: Required. the criteria operator. - :type operator: object :param time_aggregation: Required. the criteria time aggregation types. :type time_aggregation: object + :param dimensions: List of dimension conditions. + :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] + :param criterion_type: Required. Constant filled by server. + :type criterion_type: str + :param operator: Required. the criteria operator. + :type operator: object :param threshold: Required. the criteria threshold value that activates the alert. :type threshold: float - :param dimensions: List of dimension conditions. - :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] """ _validation = { - 'criterion_type': {'required': True}, 'name': {'required': True}, 'metric_name': {'required': True}, - 'operator': {'required': True}, 'time_aggregation': {'required': True}, + 'criterion_type': {'required': True}, + 'operator': {'required': True}, 'threshold': {'required': True}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, - 'criterion_type': {'key': 'criterionType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'metric_name': {'key': 'metricName', 'type': 'str'}, 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'object'}, 'time_aggregation': {'key': 'timeAggregation', 'type': 'object'}, - 'threshold': {'key': 'threshold', 'type': 'float'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'criterion_type': {'key': 'criterionType', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'object'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, } def __init__(self, **kwargs): - super(MetricCriteria, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.metric_name = kwargs.get('metric_name', None) - self.metric_namespace = kwargs.get('metric_namespace', None) + super(StaticMetricCriteria, self).__init__(**kwargs) self.operator = kwargs.get('operator', None) - self.time_aggregation = kwargs.get('time_aggregation', None) self.threshold = kwargs.get('threshold', None) - self.dimensions = kwargs.get('dimensions', None) self.criterion_type = 'StaticThresholdCriterion' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria_py3.py similarity index 84% rename from azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py rename to azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria_py3.py index 7b0a1edc9db..2abd7cea152 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria_py3.py @@ -12,7 +12,7 @@ from .multi_metric_criteria_py3 import MultiMetricCriteria -class MetricCriteria(MultiMetricCriteria): +class StaticMetricCriteria(MultiMetricCriteria): """Criterion to filter metrics. All required parameters must be populated in order to send to Azure. @@ -20,53 +20,48 @@ class MetricCriteria(MultiMetricCriteria): :param additional_properties: Unmatched properties from the message are deserialized this collection :type additional_properties: dict[str, object] - :param criterion_type: Required. Constant filled by server. - :type criterion_type: str :param name: Required. Name of the criteria. :type name: str :param metric_name: Required. Name of the metric. :type metric_name: str :param metric_namespace: Namespace of the metric. :type metric_namespace: str - :param operator: Required. the criteria operator. - :type operator: object :param time_aggregation: Required. the criteria time aggregation types. :type time_aggregation: object + :param dimensions: List of dimension conditions. + :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] + :param criterion_type: Required. Constant filled by server. + :type criterion_type: str + :param operator: Required. the criteria operator. + :type operator: object :param threshold: Required. the criteria threshold value that activates the alert. :type threshold: float - :param dimensions: List of dimension conditions. - :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] """ _validation = { - 'criterion_type': {'required': True}, 'name': {'required': True}, 'metric_name': {'required': True}, - 'operator': {'required': True}, 'time_aggregation': {'required': True}, + 'criterion_type': {'required': True}, + 'operator': {'required': True}, 'threshold': {'required': True}, } _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, - 'criterion_type': {'key': 'criterionType', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'metric_name': {'key': 'metricName', 'type': 'str'}, 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, - 'operator': {'key': 'operator', 'type': 'object'}, 'time_aggregation': {'key': 'timeAggregation', 'type': 'object'}, - 'threshold': {'key': 'threshold', 'type': 'float'}, 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'criterion_type': {'key': 'criterionType', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'object'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, } - def __init__(self, *, name: str, metric_name: str, operator, time_aggregation, threshold: float, additional_properties=None, metric_namespace: str=None, dimensions=None, **kwargs) -> None: - super(MetricCriteria, self).__init__(additional_properties=additional_properties, **kwargs) - self.name = name - self.metric_name = metric_name - self.metric_namespace = metric_namespace + def __init__(self, *, name: str, metric_name: str, time_aggregation, operator, threshold: float, additional_properties=None, metric_namespace: str=None, dimensions=None, **kwargs) -> None: + super(StaticMetricCriteria, self).__init__(additional_properties=additional_properties, name=name, metric_name=metric_name, metric_namespace=metric_namespace, time_aggregation=time_aggregation, dimensions=dimensions, **kwargs) self.operator = operator - self.time_aggregation = time_aggregation self.threshold = threshold - self.dimensions = dimensions self.criterion_type = 'StaticThresholdCriterion' From e0c59ca455cd47dcdc9b51d361abba1b2eecc2b0 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 18 Apr 2019 09:01:12 +0000 Subject: [PATCH 2/3] Generated from 1f7739776b7592e12bef8e4be6cf24d68e0f25da Update dynamic threshold criteria descriptions --- .../monitor/models/dynamic_metric_criteria.py | 15 +++++++++------ .../monitor/models/dynamic_metric_criteria_py3.py | 15 +++++++++------ .../models/dynamic_threshold_failing_periods.py | 12 +++++++----- .../dynamic_threshold_failing_periods_py3.py | 12 +++++++----- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria.py index 4d21ef377c6..9608b7ae26b 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria.py @@ -32,18 +32,21 @@ class DynamicMetricCriteria(MultiMetricCriteria): :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] :param criterion_type: Required. Constant filled by server. :type criterion_type: str - :param operator: Required. The condition used to compare the metric value - against the threshold + :param operator: Required. The operator used to compare the metric value + against the threshold. :type operator: object - :param alert_sensitivity: Required. The sensitivity of the threshold + :param alert_sensitivity: Required. The extent of deviation required to + trigger an alert. This will affect how tight the threshold is to the + metric series pattern. :type alert_sensitivity: object - :param failing_periods: Required. Select minimum number of violations - within the selected lookback time window required to raise an alert + :param failing_periods: Required. The minimum number of violations + required within the selected lookback time window required to raise an + alert. :type failing_periods: ~azure.mgmt.monitor.models.DynamicThresholdFailingPeriods :param ignore_data_before: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic - thresholds + thresholds (in ISO8601 format) :type ignore_data_before: datetime """ diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria_py3.py index 5e0901ac5ea..4ceee195c47 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_metric_criteria_py3.py @@ -32,18 +32,21 @@ class DynamicMetricCriteria(MultiMetricCriteria): :type dimensions: list[~azure.mgmt.monitor.models.MetricDimension] :param criterion_type: Required. Constant filled by server. :type criterion_type: str - :param operator: Required. The condition used to compare the metric value - against the threshold + :param operator: Required. The operator used to compare the metric value + against the threshold. :type operator: object - :param alert_sensitivity: Required. The sensitivity of the threshold + :param alert_sensitivity: Required. The extent of deviation required to + trigger an alert. This will affect how tight the threshold is to the + metric series pattern. :type alert_sensitivity: object - :param failing_periods: Required. Select minimum number of violations - within the selected lookback time window required to raise an alert + :param failing_periods: Required. The minimum number of violations + required within the selected lookback time window required to raise an + alert. :type failing_periods: ~azure.mgmt.monitor.models.DynamicThresholdFailingPeriods :param ignore_data_before: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic - thresholds + thresholds (in ISO8601 format) :type ignore_data_before: datetime """ diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods.py index 24ce832e65a..b3980af7849 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods.py @@ -13,16 +13,18 @@ class DynamicThresholdFailingPeriods(Model): - """Select minimum number of violations within the selected lookback time + """The minimum number of violations required within the selected lookback time window required to raise an alert. All required parameters must be populated in order to send to Azure. - :param number_of_evaluation_periods: Required. Select how many t the - lookback time window, + :param number_of_evaluation_periods: Required. The number of aggregated + lookback points. The lookback time window is calculated based on the + aggregation granularity (windowSize) and the selected number of aggregated + points. :type number_of_evaluation_periods: float - :param min_failing_periods_to_alert: Required. The least number of - violations + :param min_failing_periods_to_alert: Required. The number of violations to + trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. :type min_failing_periods_to_alert: float """ diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods_py3.py index 92d1b8f3142..249e9f4782f 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/dynamic_threshold_failing_periods_py3.py @@ -13,16 +13,18 @@ class DynamicThresholdFailingPeriods(Model): - """Select minimum number of violations within the selected lookback time + """The minimum number of violations required within the selected lookback time window required to raise an alert. All required parameters must be populated in order to send to Azure. - :param number_of_evaluation_periods: Required. Select how many t the - lookback time window, + :param number_of_evaluation_periods: Required. The number of aggregated + lookback points. The lookback time window is calculated based on the + aggregation granularity (windowSize) and the selected number of aggregated + points. :type number_of_evaluation_periods: float - :param min_failing_periods_to_alert: Required. The least number of - violations + :param min_failing_periods_to_alert: Required. The number of violations to + trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. :type min_failing_periods_to_alert: float """ From d2497512c7495f4ada0c6b440173d557f7970e77 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sun, 28 Apr 2019 10:36:01 +0000 Subject: [PATCH 3/3] Generated from 31ef899f35bb54b58b5c01a849f4f4710000c5e5 Fix PR comments: Revert name change + Use fake subscriptionId --- azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py | 6 +++--- ...metric_alert_single_resource_multiple_metric_criteria.py | 4 ++-- ...ic_alert_single_resource_multiple_metric_criteria_py3.py | 4 ++-- .../{static_metric_criteria.py => metric_criteria.py} | 4 ++-- ...static_metric_criteria_py3.py => metric_criteria_py3.py} | 4 ++-- .../azure/mgmt/monitor/models/multi_metric_criteria.py | 4 ++-- .../azure/mgmt/monitor/models/multi_metric_criteria_py3.py | 4 ++-- 7 files changed, 15 insertions(+), 15 deletions(-) rename azure-mgmt-monitor/azure/mgmt/monitor/models/{static_metric_criteria.py => metric_criteria.py} (96%) rename azure-mgmt-monitor/azure/mgmt/monitor/models/{static_metric_criteria_py3.py => metric_criteria_py3.py} (90%) diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py index a0c344323ec..0e8040be7c8 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/__init__.py @@ -100,7 +100,7 @@ from .metric_alert_status_properties_py3 import MetricAlertStatusProperties from .metric_alert_status_py3 import MetricAlertStatus from .metric_alert_status_collection_py3 import MetricAlertStatusCollection - from .static_metric_criteria_py3 import StaticMetricCriteria + from .metric_criteria_py3 import MetricCriteria from .metric_alert_single_resource_multiple_metric_criteria_py3 import MetricAlertSingleResourceMultipleMetricCriteria from .metric_dimension_py3 import MetricDimension from .multi_metric_criteria_py3 import MultiMetricCriteria @@ -218,7 +218,7 @@ from .metric_alert_status_properties import MetricAlertStatusProperties from .metric_alert_status import MetricAlertStatus from .metric_alert_status_collection import MetricAlertStatusCollection - from .static_metric_criteria import StaticMetricCriteria + from .metric_criteria import MetricCriteria from .metric_alert_single_resource_multiple_metric_criteria import MetricAlertSingleResourceMultipleMetricCriteria from .metric_dimension import MetricDimension from .multi_metric_criteria import MultiMetricCriteria @@ -376,7 +376,7 @@ 'MetricAlertStatusProperties', 'MetricAlertStatus', 'MetricAlertStatusCollection', - 'StaticMetricCriteria', + 'MetricCriteria', 'MetricAlertSingleResourceMultipleMetricCriteria', 'MetricDimension', 'MultiMetricCriteria', diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py index 6556885da9a..ccc84e1991c 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria.py @@ -24,7 +24,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): :param odatatype: Required. Constant filled by server. :type odatatype: str :param all_of: The list of metric criteria for this 'all of' operation. - :type all_of: list[~azure.mgmt.monitor.models.StaticMetricCriteria] + :type all_of: list[~azure.mgmt.monitor.models.MetricCriteria] """ _validation = { @@ -34,7 +34,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, - 'all_of': {'key': 'allOf', 'type': '[StaticMetricCriteria]'}, + 'all_of': {'key': 'allOf', 'type': '[MetricCriteria]'}, } def __init__(self, **kwargs): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py index 115e6f7b50d..7e74e7a9027 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_alert_single_resource_multiple_metric_criteria_py3.py @@ -24,7 +24,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): :param odatatype: Required. Constant filled by server. :type odatatype: str :param all_of: The list of metric criteria for this 'all of' operation. - :type all_of: list[~azure.mgmt.monitor.models.StaticMetricCriteria] + :type all_of: list[~azure.mgmt.monitor.models.MetricCriteria] """ _validation = { @@ -34,7 +34,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): _attribute_map = { 'additional_properties': {'key': '', 'type': '{object}'}, 'odatatype': {'key': 'odata\\.type', 'type': 'str'}, - 'all_of': {'key': 'allOf', 'type': '[StaticMetricCriteria]'}, + 'all_of': {'key': 'allOf', 'type': '[MetricCriteria]'}, } def __init__(self, *, additional_properties=None, all_of=None, **kwargs) -> None: diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py similarity index 96% rename from azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria.py rename to azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py index b74955f579f..aff905946ee 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria.py @@ -12,7 +12,7 @@ from .multi_metric_criteria import MultiMetricCriteria -class StaticMetricCriteria(MultiMetricCriteria): +class MetricCriteria(MultiMetricCriteria): """Criterion to filter metrics. All required parameters must be populated in order to send to Azure. @@ -61,7 +61,7 @@ class StaticMetricCriteria(MultiMetricCriteria): } def __init__(self, **kwargs): - super(StaticMetricCriteria, self).__init__(**kwargs) + super(MetricCriteria, self).__init__(**kwargs) self.operator = kwargs.get('operator', None) self.threshold = kwargs.get('threshold', None) self.criterion_type = 'StaticThresholdCriterion' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py similarity index 90% rename from azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria_py3.py rename to azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py index 2abd7cea152..86029593f20 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/static_metric_criteria_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/metric_criteria_py3.py @@ -12,7 +12,7 @@ from .multi_metric_criteria_py3 import MultiMetricCriteria -class StaticMetricCriteria(MultiMetricCriteria): +class MetricCriteria(MultiMetricCriteria): """Criterion to filter metrics. All required parameters must be populated in order to send to Azure. @@ -61,7 +61,7 @@ class StaticMetricCriteria(MultiMetricCriteria): } def __init__(self, *, name: str, metric_name: str, time_aggregation, operator, threshold: float, additional_properties=None, metric_namespace: str=None, dimensions=None, **kwargs) -> None: - super(StaticMetricCriteria, self).__init__(additional_properties=additional_properties, name=name, metric_name=metric_name, metric_namespace=metric_namespace, time_aggregation=time_aggregation, dimensions=dimensions, **kwargs) + super(MetricCriteria, self).__init__(additional_properties=additional_properties, name=name, metric_name=metric_name, metric_namespace=metric_namespace, time_aggregation=time_aggregation, dimensions=dimensions, **kwargs) self.operator = operator self.threshold = threshold self.criterion_type = 'StaticThresholdCriterion' diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria.py index 7f7909a8f32..1547f135843 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria.py @@ -16,7 +16,7 @@ class MultiMetricCriteria(Model): """The types of conditions for a multi resource alert. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StaticMetricCriteria, DynamicMetricCriteria + sub-classes are: MetricCriteria, DynamicMetricCriteria All required parameters must be populated in order to send to Azure. @@ -55,7 +55,7 @@ class MultiMetricCriteria(Model): } _subtype_map = { - 'criterion_type': {'StaticThresholdCriterion': 'StaticMetricCriteria', 'DynamicThresholdCriterion': 'DynamicMetricCriteria'} + 'criterion_type': {'StaticThresholdCriterion': 'MetricCriteria', 'DynamicThresholdCriterion': 'DynamicMetricCriteria'} } def __init__(self, **kwargs): diff --git a/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria_py3.py b/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria_py3.py index 554c08886d7..d168ae9c394 100644 --- a/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria_py3.py +++ b/azure-mgmt-monitor/azure/mgmt/monitor/models/multi_metric_criteria_py3.py @@ -16,7 +16,7 @@ class MultiMetricCriteria(Model): """The types of conditions for a multi resource alert. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: StaticMetricCriteria, DynamicMetricCriteria + sub-classes are: MetricCriteria, DynamicMetricCriteria All required parameters must be populated in order to send to Azure. @@ -55,7 +55,7 @@ class MultiMetricCriteria(Model): } _subtype_map = { - 'criterion_type': {'StaticThresholdCriterion': 'StaticMetricCriteria', 'DynamicThresholdCriterion': 'DynamicMetricCriteria'} + 'criterion_type': {'StaticThresholdCriterion': 'MetricCriteria', 'DynamicThresholdCriterion': 'DynamicMetricCriteria'} } def __init__(self, *, name: str, metric_name: str, time_aggregation, additional_properties=None, metric_namespace: str=None, dimensions=None, **kwargs) -> None: