TimeWindowCustomAlertRule Class
- java.
lang. Object - com.
azure. resourcemanager. security. models. CustomAlertRule - com.
azure. resourcemanager. security. models. ThresholdCustomAlertRule - com.
azure. resourcemanager. security. models. TimeWindowCustomAlertRule
- com.
- com.
- com.
public final class TimeWindowCustomAlertRule
extends ThresholdCustomAlertRule
A custom alert rule that checks if the number of activities (depends on the custom alert type) in a time window is within the given range.
Constructor Summary
| Constructor | Description |
|---|---|
| TimeWindowCustomAlertRule() |
Creates an instance of Time |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Time |
fromJson(JsonReader jsonReader)
Reads an instance of Time |
| String |
ruleType()
Get the rule |
| Duration |
timeWindowSize()
Get the time |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Time |
withIsEnabled(boolean isEnabled)
Set the is |
|
Time |
withMaxThreshold(int maxThreshold)
Set the max |
|
Time |
withMinThreshold(int minThreshold)
Set the min |
|
Time |
withTimeWindowSize(Duration timeWindowSize)
Set the time |
Methods inherited from CustomAlertRule
Methods inherited from ThresholdCustomAlertRule
Methods inherited from java.lang.Object
Constructor Details
TimeWindowCustomAlertRule
public TimeWindowCustomAlertRule()
Creates an instance of TimeWindowCustomAlertRule class.
Method Details
fromJson
public static TimeWindowCustomAlertRule fromJson(JsonReader jsonReader)
Reads an instance of TimeWindowCustomAlertRule from the JsonReader.
Parameters:
Returns:
Throws:
ruleType
public String ruleType()
Get the ruleType property: The ruleType property.
Overrides:
TimeWindowCustomAlertRule.ruleType()Returns:
timeWindowSize
public Duration timeWindowSize()
Get the timeWindowSize property: The time window size in iso8601 format.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
TimeWindowCustomAlertRule.toJson(JsonWriter jsonWriter)Parameters:
Throws:
validate
public void validate()
Validates the instance.
Overrides:
TimeWindowCustomAlertRule.validate()withIsEnabled
public TimeWindowCustomAlertRule withIsEnabled(boolean isEnabled)
Set the isEnabled property: Status of the custom alert.
Overrides:
TimeWindowCustomAlertRule.withIsEnabled(boolean isEnabled)Parameters:
withMaxThreshold
public TimeWindowCustomAlertRule withMaxThreshold(int maxThreshold)
Set the maxThreshold property: The maximum threshold.
Overrides:
TimeWindowCustomAlertRule.withMaxThreshold(int maxThreshold)Parameters:
withMinThreshold
public TimeWindowCustomAlertRule withMinThreshold(int minThreshold)
Set the minThreshold property: The minimum threshold.
Overrides:
TimeWindowCustomAlertRule.withMinThreshold(int minThreshold)Parameters:
withTimeWindowSize
public TimeWindowCustomAlertRule withTimeWindowSize(Duration timeWindowSize)
Set the timeWindowSize property: The time window size in iso8601 format.
Parameters:
Returns: