AlertRuleProperties Class
- java.
lang. Object - com.
azure. resourcemanager. monitor. fluent. models. AlertRuleProperties
- com.
Implements
public final class AlertRuleProperties
implements JsonSerializable<AlertRuleProperties>
An Azure Activity Log Alert rule.
Constructor | Description |
---|---|
Alert |
Creates an instance of Alert |
Modifier and Type | Method and Description |
---|---|
Action |
actions()
Get the actions property: The actions that will activate when the condition is met. |
Activity |
condition()
Get the condition property: The condition that will cause this alert to activate. |
String |
description()
Get the description property: A description of this Activity Log Alert rule. |
Boolean |
enabled()
Get the enabled property: Indicates whether this Activity Log Alert rule is enabled. |
static
Alert |
from Reads an instance of Alert |
List<String> |
scopes()
Get the scopes property: A list of resource IDs that will be used as prefixes. |
Json |
to |
void |
validate()
Validates the instance. |
Alert |
with Set the actions property: The actions that will activate when the condition is met. |
Alert |
with Set the condition property: The condition that will cause this alert to activate. |
Alert |
with Set the description property: A description of this Activity Log Alert rule. |
Alert |
with Set the enabled property: Indicates whether this Activity Log Alert rule is enabled. |
Alert |
with Set the scopes property: A list of resource IDs that will be used as prefixes. |
Methods inherited from java.lang.Object
AlertRuleProperties
public AlertRuleProperties()
Creates an instance of AlertRuleProperties class.
actions
public ActionList actions()
Get the actions property: The actions that will activate when the condition is met.
Returns:
condition
public ActivityLogAlertAllOfCondition condition()
Get the condition property: The condition that will cause this alert to activate.
Returns:
description
public String description()
Get the description property: A description of this Activity Log Alert rule.
Returns:
enabled
public Boolean enabled()
Get the enabled property: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.
Returns:
fromJson
public static AlertRuleProperties fromJson(JsonReader jsonReader)
Reads an instance of AlertRuleProperties from the JsonReader.
Parameters:
Returns:
Throws:
scopes
public List
Get the scopes property: A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.
Returns:
toJson
validate
public void validate()
Validates the instance.
withActions
public AlertRuleProperties withActions(ActionList actions)
Set the actions property: The actions that will activate when the condition is met.
Parameters:
Returns:
withCondition
public AlertRuleProperties withCondition(ActivityLogAlertAllOfCondition condition)
Set the condition property: The condition that will cause this alert to activate.
Parameters:
Returns:
withDescription
public AlertRuleProperties withDescription(String description)
Set the description property: A description of this Activity Log Alert rule.
Parameters:
Returns:
withEnabled
public AlertRuleProperties withEnabled(Boolean enabled)
Set the enabled property: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated.
Parameters:
Returns:
withScopes
public AlertRuleProperties withScopes(List
Set the scopes property: A list of resource IDs that will be used as prefixes. The alert will only apply to Activity Log events with resource IDs that fall under one of these prefixes. This list must include at least one item.
Parameters:
Returns:
Azure SDK for Java feedback
Azure SDK for Java is an open source project. Select a link to provide feedback: