Class ActivityLogAlertLeafCondition
java.lang.Object
com.azure.resourcemanager.monitor.models.AlertRuleLeafCondition
com.azure.resourcemanager.monitor.models.ActivityLogAlertLeafCondition
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AlertRuleLeafCondition>
An Activity Log Alert rule condition that is met when all its member conditions are met.
Each condition can be of one of the following types:
__Important__: Each type has its unique subset of properties. Properties from different types CANNOT exist in one
condition.
* __Leaf Condition -__ must contain 'field' and either 'equals' or 'containsAny'.
_Please note, 'anyOf' should __not__ be set in a Leaf Condition._
* __AnyOf Condition -__ must contain __only__ 'anyOf' (which is an array of Leaf Conditions).
_Please note, 'field', 'equals' and 'containsAny' should __not__ be set in an AnyOf Condition._.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ActivityLogAlertLeafCondition class. -
Method Summary
Modifier and TypeMethodDescriptionanyOf()Get the anyOf property: An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ActivityLogAlertLeafCondition from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAnyOf(List<AlertRuleLeafCondition> anyOf) Set the anyOf property: An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met.withContainsAny(List<String> containsAny) 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.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.Set the field property: The name of the Activity Log event's field that this condition will examine.Methods inherited from class com.azure.resourcemanager.monitor.models.AlertRuleLeafCondition
containsAny, equals, fieldMethods 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
-
ActivityLogAlertLeafCondition
public ActivityLogAlertLeafCondition()Creates an instance of ActivityLogAlertLeafCondition class.
-
-
Method Details
-
anyOf
Get the anyOf property: An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met.- Returns:
- the anyOf value.
-
withAnyOf
Set the anyOf property: An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met.- Parameters:
anyOf- the anyOf value to set.- Returns:
- the ActivityLogAlertLeafCondition object itself.
-
withField
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'.- Overrides:
withFieldin classAlertRuleLeafCondition- Parameters:
field- the field value to set.- Returns:
- the AlertRuleLeafCondition object itself.
-
withEquals
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.- Overrides:
withEqualsin classAlertRuleLeafCondition- Parameters:
equals- the equals value to set.- Returns:
- the AlertRuleLeafCondition object itself.
-
withContainsAny
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.- Overrides:
withContainsAnyin classAlertRuleLeafCondition- Parameters:
containsAny- the containsAny value to set.- Returns:
- the AlertRuleLeafCondition object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classAlertRuleLeafCondition- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AlertRuleLeafCondition>- Overrides:
toJsonin classAlertRuleLeafCondition- Throws:
IOException
-
fromJson
public static ActivityLogAlertLeafCondition fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ActivityLogAlertLeafCondition from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ActivityLogAlertLeafCondition 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 ActivityLogAlertLeafCondition.
-