AlertRuleAnyOfOrLeafCondition Class
- java.
lang. Object - com.
azure. resourcemanager. alertsmanagement. models. AlertRuleLeafCondition - com.
azure. resourcemanager. alertsmanagement. models. AlertRuleAnyOfOrLeafCondition
- com.
- com.
public final class AlertRuleAnyOfOrLeafCondition
extends 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
| Constructor | Description |
|---|---|
| AlertRuleAnyOfOrLeafCondition() |
Creates an instance of Alert |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
List<Alert |
anyOf()
Get the any |
|
static
Alert |
fromJson(JsonReader jsonReader)
Reads an instance of Alert |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Alert |
withAnyOf(List<AlertRuleLeafCondition> anyOf)
Set the any |
|
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 AlertRuleLeafCondition
Methods inherited from java.lang.Object
Constructor Details
AlertRuleAnyOfOrLeafCondition
public AlertRuleAnyOfOrLeafCondition()
Creates an instance of AlertRuleAnyOfOrLeafCondition class.
Method Details
anyOf
public List<AlertRuleLeafCondition> 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:
fromJson
public static AlertRuleAnyOfOrLeafCondition fromJson(JsonReader jsonReader)
Reads an instance of AlertRuleAnyOfOrLeafCondition from the JsonReader.
Parameters:
Returns:
Throws:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
AlertRuleAnyOfOrLeafCondition.toJson(JsonWriter jsonWriter)Parameters:
Throws:
validate
public void validate()
Validates the instance.
Overrides:
AlertRuleAnyOfOrLeafCondition.validate()withAnyOf
public AlertRuleAnyOfOrLeafCondition 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.
Parameters:
Returns:
withContainsAny
public AlertRuleAnyOfOrLeafCondition 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.
Overrides:
AlertRuleAnyOfOrLeafCondition.withContainsAny(List<String> containsAny)Parameters:
withEquals
public AlertRuleAnyOfOrLeafCondition 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.
Overrides:
AlertRuleAnyOfOrLeafCondition.withEquals(String equals)Parameters:
withField
public AlertRuleAnyOfOrLeafCondition 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'.
Overrides:
AlertRuleAnyOfOrLeafCondition.withField(String field)Parameters: