AlertRuleLeafCondition Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. models. AlertRuleLeafCondition
- com.
Implements
public class AlertRuleLeafCondition
implements JsonSerializable<AlertRuleLeafCondition>
An Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event. This condition must contain 'field' and either 'equals' or 'containsAny'.
Constructor Summary
Constructor | Description |
---|---|
AlertRuleLeafCondition() |
Creates an instance of Alert |
Method Summary
Modifier and Type | Method and Description |
---|---|
List<String> |
containsAny()
Get the contains |
String |
equals()
Get the equals property: The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. |
String |
field()
Get the field property: The name of the Activity Log event's field that this condition will examine. |
static
Alert |
fromJson(JsonReader jsonReader)
Reads an instance of Alert |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Alert |
withContainsAny(List<String> containsAny)
Set the contains |
Alert |
withEquals(String equals)
Set the equals property: The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met. |
Alert |
withField(String field)
Set the field property: The name of the Activity Log event's field that this condition will examine. |
Methods inherited from java.lang.Object
Constructor Details
AlertRuleLeafCondition
public AlertRuleLeafCondition()
Creates an instance of AlertRuleLeafCondition class.
Method Details
containsAny
public List
Get the containsAny property: The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met.
Returns:
equals
public String equals()
Get the equals property: The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met.
Returns:
field
public String field()
Get the field property: The name of the Activity Log event's field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'.
Returns:
fromJson
public static AlertRuleLeafCondition fromJson(JsonReader jsonReader)
Reads an instance of AlertRuleLeafCondition from the JsonReader.
Parameters:
Returns:
Throws:
toJson
validate
public void validate()
Validates the instance.
withContainsAny
public AlertRuleLeafCondition withContainsAny(List
Set the containsAny property: The value of the event's field will be compared to the values in this array (case-insensitive) to determine if the condition is met.
Parameters:
Returns:
withEquals
public AlertRuleLeafCondition withEquals(String equals)
Set the equals property: The value of the event's field will be compared to this value (case-insensitive) to determine if the condition is met.
Parameters:
Returns:
withField
public AlertRuleLeafCondition withField(String field)
Set the field property: The name of the Activity Log event's field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties'.
Parameters:
Returns:
Applies to
Azure SDK for Java