RuleCondition Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. RuleCondition
- com.
Implements
public class RuleCondition
implements JsonSerializable<RuleCondition>
The condition that results in the alert rule being activated.
Constructor Summary
Constructor | Description |
---|---|
RuleCondition() |
Creates an instance of Rule |
Method Summary
Modifier and Type | Method and Description |
---|---|
Rule |
dataSource()
Get the data |
static
Rule |
fromJson(JsonReader jsonReader)
Reads an instance of Rule |
String |
odataType()
Get the odata |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Rule |
withDataSource(RuleDataSource dataSource)
Set the data |
Methods inherited from java.lang.Object
Constructor Details
RuleCondition
public RuleCondition()
Creates an instance of RuleCondition class.
Method Details
dataSource
public RuleDataSource dataSource()
Get the dataSource property: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
Returns:
fromJson
public static RuleCondition fromJson(JsonReader jsonReader)
Reads an instance of RuleCondition from the JsonReader.
Parameters:
Returns:
Throws:
odataType
public String odataType()
Get the odataType property: specifies the type of condition. This can be one of three types: ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition (based on the number of failures of a web test), and ThresholdRuleCondition (based on the threshold of a metric).
Returns:
toJson
validate
public void validate()
Validates the instance.
withDataSource
public RuleCondition withDataSource(RuleDataSource dataSource)
Set the dataSource property: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource.
Parameters:
Returns:
Applies to
Azure SDK for Java