Class DynamicMetricCriteria
java.lang.Object
com.azure.resourcemanager.monitor.models.MultiMetricCriteria
com.azure.resourcemanager.monitor.models.DynamicMetricCriteria
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MultiMetricCriteria>
Criterion for dynamic threshold.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the alertSensitivity property: The extent of deviation required to trigger an alert.Get the criterionType property: Specifies the type of threshold criteria.Get the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.static DynamicMetricCriteria
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of DynamicMetricCriteria from the JsonReader.Get the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).operator()
Get the operator property: The operator used to compare the metric value against the threshold.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withAlertSensitivity
(DynamicThresholdSensitivity alertSensitivity) Set the alertSensitivity property: The extent of deviation required to trigger an alert.withDimensions
(List<MetricDimension> dimensions) Set the dimensions property: List of dimension conditions.withFailingPeriods
(DynamicThresholdFailingPeriods failingPeriods) Set the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.withIgnoreDataBefore
(OffsetDateTime ignoreDataBefore) Set the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).withMetricName
(String metricName) Set the metricName property: Name of the metric.withMetricNamespace
(String metricNamespace) Set the metricNamespace property: Namespace of the metric.Set the name property: Name of the criteria.withOperator
(DynamicThresholdOperator operator) Set the operator property: The operator used to compare the metric value against the threshold.withSkipMetricValidation
(Boolean skipMetricValidation) Set the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.withTimeAggregation
(AggregationTypeEnum timeAggregation) Set the timeAggregation property: the criteria time aggregation types.Methods inherited from class com.azure.resourcemanager.monitor.models.MultiMetricCriteria
additionalProperties, dimensions, metricName, metricNamespace, name, skipMetricValidation, timeAggregation, withAdditionalProperties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
DynamicMetricCriteria
public DynamicMetricCriteria()Creates an instance of DynamicMetricCriteria class.
-
-
Method Details
-
criterionType
Get the criterionType property: Specifies the type of threshold criteria.- Overrides:
criterionType
in classMultiMetricCriteria
- Returns:
- the criterionType value.
-
operator
Get the operator property: The operator used to compare the metric value against the threshold.- Returns:
- the operator value.
-
withOperator
Set the operator property: The operator used to compare the metric value against the threshold.- Parameters:
operator
- the operator value to set.- Returns:
- the DynamicMetricCriteria object itself.
-
alertSensitivity
Get the alertSensitivity property: The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.- Returns:
- the alertSensitivity value.
-
withAlertSensitivity
Set the alertSensitivity property: The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern.- Parameters:
alertSensitivity
- the alertSensitivity value to set.- Returns:
- the DynamicMetricCriteria object itself.
-
failingPeriods
Get the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.- Returns:
- the failingPeriods value.
-
withFailingPeriods
Set the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.- Parameters:
failingPeriods
- the failingPeriods value to set.- Returns:
- the DynamicMetricCriteria object itself.
-
ignoreDataBefore
Get the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).- Returns:
- the ignoreDataBefore value.
-
withIgnoreDataBefore
Set the ignoreDataBefore property: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format).- Parameters:
ignoreDataBefore
- the ignoreDataBefore value to set.- Returns:
- the DynamicMetricCriteria object itself.
-
withName
Set the name property: Name of the criteria.- Overrides:
withName
in classMultiMetricCriteria
- Parameters:
name
- the name value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withMetricName
Set the metricName property: Name of the metric.- Overrides:
withMetricName
in classMultiMetricCriteria
- Parameters:
metricName
- the metricName value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withMetricNamespace
Set the metricNamespace property: Namespace of the metric.- Overrides:
withMetricNamespace
in classMultiMetricCriteria
- Parameters:
metricNamespace
- the metricNamespace value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withTimeAggregation
Set the timeAggregation property: the criteria time aggregation types.- Overrides:
withTimeAggregation
in classMultiMetricCriteria
- Parameters:
timeAggregation
- the timeAggregation value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withDimensions
Set the dimensions property: List of dimension conditions.- Overrides:
withDimensions
in classMultiMetricCriteria
- Parameters:
dimensions
- the dimensions value to set.- Returns:
- the MultiMetricCriteria object itself.
-
withSkipMetricValidation
Set the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.- Overrides:
withSkipMetricValidation
in classMultiMetricCriteria
- Parameters:
skipMetricValidation
- the skipMetricValidation value to set.- Returns:
- the MultiMetricCriteria object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validate
in classMultiMetricCriteria
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MultiMetricCriteria>
- Overrides:
toJson
in classMultiMetricCriteria
- Throws:
IOException
-
fromJson
public static DynamicMetricCriteria fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of DynamicMetricCriteria from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of DynamicMetricCriteria if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the DynamicMetricCriteria.
-