Condition Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. Condition
- com.
Implements
public final class Condition
implements JsonSerializable<Condition>
A condition of the scheduled query rule.
Constructor Summary
Constructor | Description |
---|---|
Condition() |
Creates an instance of Condition class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
List<Dimension> |
dimensions()
Get the dimensions property: List of Dimensions conditions. |
Condition |
failingPeriods()
Get the failing |
static Condition |
fromJson(JsonReader jsonReader)
Reads an instance of Condition from the Json |
String |
metricMeasureColumn()
Get the metric |
String |
metricName()
Get the metric |
Condition |
operator()
Get the operator property: The criteria operator. |
String |
query()
Get the query property: Log query alert. |
String |
resourceIdColumn()
Get the resource |
Double |
threshold()
Get the threshold property: the criteria threshold value that activates the alert. |
Time |
timeAggregation()
Get the time |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Condition |
withDimensions(List<Dimension> dimensions)
Set the dimensions property: List of Dimensions conditions. |
Condition |
withFailingPeriods(ConditionFailingPeriods failingPeriods)
Set the failing |
Condition |
withMetricMeasureColumn(String metricMeasureColumn)
Set the metric |
Condition |
withMetricName(String metricName)
Set the metric |
Condition |
withOperator(ConditionOperator operator)
Set the operator property: The criteria operator. |
Condition |
withQuery(String query)
Set the query property: Log query alert. |
Condition |
withResourceIdColumn(String resourceIdColumn)
Set the resource |
Condition |
withThreshold(Double threshold)
Set the threshold property: the criteria threshold value that activates the alert. |
Condition |
withTimeAggregation(TimeAggregation timeAggregation)
Set the time |
Methods inherited from java.lang.Object
Constructor Details
Condition
public Condition()
Creates an instance of Condition class.
Method Details
dimensions
public List
Get the dimensions property: List of Dimensions conditions.
Returns:
failingPeriods
public ConditionFailingPeriods 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:
fromJson
public static Condition fromJson(JsonReader jsonReader)
Reads an instance of Condition from the JsonReader.
Parameters:
Returns:
Throws:
metricMeasureColumn
public String metricMeasureColumn()
Get the metricMeasureColumn property: The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
Returns:
metricName
public String metricName()
Get the metricName property: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
Returns:
operator
public ConditionOperator operator()
Get the operator property: The criteria operator. Relevant and required only for rules of the kind LogAlert.
Returns:
query
public String query()
Get the query property: Log query alert.
Returns:
resourceIdColumn
public String 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:
threshold
public Double threshold()
Get the threshold property: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert.
Returns:
timeAggregation
public TimeAggregation timeAggregation()
Get the timeAggregation property: Aggregation type. Relevant and required only for rules of the kind LogAlert.
Returns:
toJson
validate
public void validate()
Validates the instance.
withDimensions
public Condition withDimensions(List
Set the dimensions property: List of Dimensions conditions.
Parameters:
Returns:
withFailingPeriods
public Condition withFailingPeriods(ConditionFailingPeriods failingPeriods)
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:
Returns:
withMetricMeasureColumn
public Condition withMetricMeasureColumn(String metricMeasureColumn)
Set the metricMeasureColumn property: The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
Parameters:
Returns:
withMetricName
public Condition withMetricName(String metricName)
Set the metricName property: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
Parameters:
Returns:
withOperator
public Condition withOperator(ConditionOperator operator)
Set the operator property: The criteria operator. Relevant and required only for rules of the kind LogAlert.
Parameters:
Returns:
withQuery
public Condition withQuery(String query)
Set the query property: Log query alert.
Parameters:
Returns:
withResourceIdColumn
public Condition withResourceIdColumn(String resourceIdColumn)
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:
Returns:
withThreshold
public Condition withThreshold(Double threshold)
Set the threshold property: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert.
Parameters:
Returns:
withTimeAggregation
public Condition withTimeAggregation(TimeAggregation timeAggregation)
Set the timeAggregation property: Aggregation type. Relevant and required only for rules of the kind LogAlert.
Parameters:
Returns:
Applies to
Azure SDK for Java