Class Condition
java.lang.Object
com.azure.resourcemanager.monitor.models.Condition
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Condition>
A condition of the scheduled query rule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the dimensions property: List of Dimensions conditions.Get the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.static ConditionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Condition from the JsonReader.Get the metricMeasureColumn property: The column containing the metric measure number.Get the metricName property: The name of the metric to be sent.operator()Get the operator property: The criteria operator.query()Get the query property: Log query alert.Get the resourceIdColumn property: The column containing the resource id.Get the threshold property: the criteria threshold value that activates the alert.Get the timeAggregation property: Aggregation type.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withDimensions(List<Dimension> dimensions) Set the dimensions property: List of Dimensions conditions.withFailingPeriods(ConditionFailingPeriods failingPeriods) Set the failingPeriods property: The minimum number of violations required within the selected lookback time window required to raise an alert.withMetricMeasureColumn(String metricMeasureColumn) Set the metricMeasureColumn property: The column containing the metric measure number.withMetricName(String metricName) Set the metricName property: The name of the metric to be sent.withOperator(ConditionOperator operator) Set the operator property: The criteria operator.Set the query property: Log query alert.withResourceIdColumn(String resourceIdColumn) Set the resourceIdColumn property: The column containing the resource id.withThreshold(Double threshold) Set the threshold property: the criteria threshold value that activates the alert.withTimeAggregation(TimeAggregation timeAggregation) Set the timeAggregation property: Aggregation type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
Condition
public Condition()Creates an instance of Condition class.
-
-
Method Details
-
query
Get the query property: Log query alert.- Returns:
- the query value.
-
withQuery
Set the query property: Log query alert.- Parameters:
query- the query value to set.- Returns:
- the Condition object itself.
-
timeAggregation
Get the timeAggregation property: Aggregation type. Relevant and required only for rules of the kind LogAlert.- Returns:
- the timeAggregation value.
-
withTimeAggregation
Set the timeAggregation property: Aggregation type. Relevant and required only for rules of the kind LogAlert.- Parameters:
timeAggregation- the timeAggregation value to set.- Returns:
- the Condition object itself.
-
metricMeasureColumn
Get the metricMeasureColumn property: The column containing the metric measure number. Relevant only for rules of the kind LogAlert.- Returns:
- the metricMeasureColumn value.
-
withMetricMeasureColumn
Set the metricMeasureColumn property: The column containing the metric measure number. Relevant only for rules of the kind LogAlert.- Parameters:
metricMeasureColumn- the metricMeasureColumn value to set.- Returns:
- the Condition object itself.
-
resourceIdColumn
Get the resourceIdColumn property: The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.- Returns:
- the resourceIdColumn value.
-
withResourceIdColumn
Set the resourceIdColumn property: The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.- Parameters:
resourceIdColumn- the resourceIdColumn value to set.- Returns:
- the Condition object itself.
-
dimensions
Get the dimensions property: List of Dimensions conditions.- Returns:
- the dimensions value.
-
withDimensions
Set the dimensions property: List of Dimensions conditions.- Parameters:
dimensions- the dimensions value to set.- Returns:
- the Condition object itself.
-
operator
Get the operator property: The criteria operator. Relevant and required only for rules of the kind LogAlert.- Returns:
- the operator value.
-
withOperator
Set the operator property: The criteria operator. Relevant and required only for rules of the kind LogAlert.- Parameters:
operator- the operator value to set.- Returns:
- the Condition object itself.
-
threshold
Get the threshold property: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert.- Returns:
- the threshold value.
-
withThreshold
Set the threshold property: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert.- Parameters:
threshold- the threshold value to set.- Returns:
- the Condition object itself.
-
failingPeriods
Get the failingPeriods property: 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.- 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. Relevant only for rules of the kind LogAlert.- Parameters:
failingPeriods- the failingPeriods value to set.- Returns:
- the Condition object itself.
-
metricName
Get the metricName property: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.- Returns:
- the metricName value.
-
withMetricName
Set the metricName property: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.- Parameters:
metricName- the metricName value to set.- Returns:
- the Condition object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<Condition>- Throws:
IOException
-
fromJson
Reads an instance of Condition from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Condition 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 Condition.
-