Partilhar via


ConditionFailingPeriods Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.ConditionFailingPeriods

Implements

public final class ConditionFailingPeriods
implements JsonSerializable<ConditionFailingPeriods>

The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.

Constructor Summary

Constructor Description
ConditionFailingPeriods()

Creates an instance of ConditionFailingPeriods class.

Method Summary

Modifier and Type Method and Description
static ConditionFailingPeriods fromJson(JsonReader jsonReader)

Reads an instance of ConditionFailingPeriods from the JsonReader.

Long minFailingPeriodsToAlert()

Get the minFailingPeriodsToAlert property: The number of violations to trigger an alert.

Long numberOfEvaluationPeriods()

Get the numberOfEvaluationPeriods property: The number of aggregated lookback points.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ConditionFailingPeriods withMinFailingPeriodsToAlert(Long minFailingPeriodsToAlert)

Set the minFailingPeriodsToAlert property: The number of violations to trigger an alert.

ConditionFailingPeriods withNumberOfEvaluationPeriods(Long numberOfEvaluationPeriods)

Set the numberOfEvaluationPeriods property: The number of aggregated lookback points.

Methods inherited from java.lang.Object

Constructor Details

ConditionFailingPeriods

public ConditionFailingPeriods()

Creates an instance of ConditionFailingPeriods class.

Method Details

fromJson

public static ConditionFailingPeriods fromJson(JsonReader jsonReader)

Reads an instance of ConditionFailingPeriods from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ConditionFailingPeriods if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ConditionFailingPeriods.

minFailingPeriodsToAlert

public Long minFailingPeriodsToAlert()

Get the minFailingPeriodsToAlert property: The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1.

Returns:

the minFailingPeriodsToAlert value.

numberOfEvaluationPeriods

public Long numberOfEvaluationPeriods()

Get the numberOfEvaluationPeriods property: 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. Default value is 1.

Returns:

the numberOfEvaluationPeriods value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMinFailingPeriodsToAlert

public ConditionFailingPeriods withMinFailingPeriodsToAlert(Long minFailingPeriodsToAlert)

Set the minFailingPeriodsToAlert property: The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1.

Parameters:

minFailingPeriodsToAlert - the minFailingPeriodsToAlert value to set.

Returns:

the ConditionFailingPeriods object itself.

withNumberOfEvaluationPeriods

public ConditionFailingPeriods withNumberOfEvaluationPeriods(Long numberOfEvaluationPeriods)

Set the numberOfEvaluationPeriods property: 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. Default value is 1.

Parameters:

numberOfEvaluationPeriods - the numberOfEvaluationPeriods value to set.

Returns:

the ConditionFailingPeriods object itself.

Applies to