@@ -332,6 +332,10 @@ class MultiMetricCriteria(Model):
332332 :param dimensions: List of dimension conditions.
333333 :type dimensions:
334334 list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
335+ :param skip_metric_validation: Allows creating an alert rule on a custom
336+ metric that isn't yet emitted, by causing the metric validation to be
337+ skipped.
338+ :type skip_metric_validation: bool
335339 :param criterion_type: Required. Constant filled by server.
336340 :type criterion_type: str
337341 """
@@ -350,21 +354,23 @@ class MultiMetricCriteria(Model):
350354 'metric_namespace' : {'key' : 'metricNamespace' , 'type' : 'str' },
351355 'time_aggregation' : {'key' : 'timeAggregation' , 'type' : 'object' },
352356 'dimensions' : {'key' : 'dimensions' , 'type' : '[MetricDimension]' },
357+ 'skip_metric_validation' : {'key' : 'skipMetricValidation' , 'type' : 'bool' },
353358 'criterion_type' : {'key' : 'criterionType' , 'type' : 'str' },
354359 }
355360
356361 _subtype_map = {
357362 'criterion_type' : {'StaticThresholdCriterion' : 'MetricCriteria' , 'DynamicThresholdCriterion' : 'DynamicMetricCriteria' }
358363 }
359364
360- def __init__ (self , * , name : str , metric_name : str , time_aggregation , additional_properties = None , metric_namespace : str = None , dimensions = None , ** kwargs ) -> None :
365+ def __init__ (self , * , name : str , metric_name : str , time_aggregation , additional_properties = None , metric_namespace : str = None , dimensions = None , skip_metric_validation : bool = None , ** kwargs ) -> None :
361366 super (MultiMetricCriteria , self ).__init__ (** kwargs )
362367 self .additional_properties = additional_properties
363368 self .name = name
364369 self .metric_name = metric_name
365370 self .metric_namespace = metric_namespace
366371 self .time_aggregation = time_aggregation
367372 self .dimensions = dimensions
373+ self .skip_metric_validation = skip_metric_validation
368374 self .criterion_type = None
369375
370376
@@ -387,6 +393,10 @@ class DynamicMetricCriteria(MultiMetricCriteria):
387393 :param dimensions: List of dimension conditions.
388394 :type dimensions:
389395 list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
396+ :param skip_metric_validation: Allows creating an alert rule on a custom
397+ metric that isn't yet emitted, by causing the metric validation to be
398+ skipped.
399+ :type skip_metric_validation: bool
390400 :param criterion_type: Required. Constant filled by server.
391401 :type criterion_type: str
392402 :param operator: Required. The operator used to compare the metric value
@@ -427,15 +437,16 @@ class DynamicMetricCriteria(MultiMetricCriteria):
427437 'metric_namespace' : {'key' : 'metricNamespace' , 'type' : 'str' },
428438 'time_aggregation' : {'key' : 'timeAggregation' , 'type' : 'object' },
429439 'dimensions' : {'key' : 'dimensions' , 'type' : '[MetricDimension]' },
440+ 'skip_metric_validation' : {'key' : 'skipMetricValidation' , 'type' : 'bool' },
430441 'criterion_type' : {'key' : 'criterionType' , 'type' : 'str' },
431442 'operator' : {'key' : 'operator' , 'type' : 'str' },
432443 'alert_sensitivity' : {'key' : 'alertSensitivity' , 'type' : 'str' },
433444 'failing_periods' : {'key' : 'failingPeriods' , 'type' : 'DynamicThresholdFailingPeriods' },
434445 'ignore_data_before' : {'key' : 'ignoreDataBefore' , 'type' : 'iso-8601' },
435446 }
436447
437- 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 :
438- 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 )
448+ def __init__ (self , * , name : str , metric_name : str , time_aggregation , operator , alert_sensitivity , failing_periods , additional_properties = None , metric_namespace : str = None , dimensions = None , skip_metric_validation : bool = None , ignore_data_before = None , ** kwargs ) -> None :
449+ super (DynamicMetricCriteria , self ).__init__ (additional_properties = additional_properties , name = name , metric_name = metric_name , metric_namespace = metric_namespace , time_aggregation = time_aggregation , dimensions = dimensions , skip_metric_validation = skip_metric_validation , ** kwargs )
439450 self .operator = operator
440451 self .alert_sensitivity = alert_sensitivity
441452 self .failing_periods = failing_periods
@@ -1057,6 +1068,10 @@ class MetricCriteria(MultiMetricCriteria):
10571068 :param dimensions: List of dimension conditions.
10581069 :type dimensions:
10591070 list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension]
1071+ :param skip_metric_validation: Allows creating an alert rule on a custom
1072+ metric that isn't yet emitted, by causing the metric validation to be
1073+ skipped.
1074+ :type skip_metric_validation: bool
10601075 :param criterion_type: Required. Constant filled by server.
10611076 :type criterion_type: str
10621077 :param operator: Required. the criteria operator. Possible values include:
@@ -1084,13 +1099,14 @@ class MetricCriteria(MultiMetricCriteria):
10841099 'metric_namespace' : {'key' : 'metricNamespace' , 'type' : 'str' },
10851100 'time_aggregation' : {'key' : 'timeAggregation' , 'type' : 'object' },
10861101 'dimensions' : {'key' : 'dimensions' , 'type' : '[MetricDimension]' },
1102+ 'skip_metric_validation' : {'key' : 'skipMetricValidation' , 'type' : 'bool' },
10871103 'criterion_type' : {'key' : 'criterionType' , 'type' : 'str' },
10881104 'operator' : {'key' : 'operator' , 'type' : 'str' },
10891105 'threshold' : {'key' : 'threshold' , 'type' : 'float' },
10901106 }
10911107
1092- def __init__ (self , * , name : str , metric_name : str , time_aggregation , operator , threshold : float , additional_properties = None , metric_namespace : str = None , dimensions = None , ** kwargs ) -> None :
1093- 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 )
1108+ def __init__ (self , * , name : str , metric_name : str , time_aggregation , operator , threshold : float , additional_properties = None , metric_namespace : str = None , dimensions = None , skip_metric_validation : bool = None , ** kwargs ) -> None :
1109+ super (MetricCriteria , self ).__init__ (additional_properties = additional_properties , name = name , metric_name = metric_name , metric_namespace = metric_namespace , time_aggregation = time_aggregation , dimensions = dimensions , skip_metric_validation = skip_metric_validation , ** kwargs )
10941110 self .operator = operator
10951111 self .threshold = threshold
10961112 self .criterion_type = 'StaticThresholdCriterion'
0 commit comments