Class AlertRuleResourceInner
- java.lang.Object
-
- com.azure.core.management.ProxyResource
-
- com.azure.core.management.Resource
-
- com.azure.resourcemanager.monitor.fluent.models.AlertRuleResourceInner
-
public class AlertRuleResourceInner extends com.azure.core.management.ResourceThe alert rule resource.
-
-
Constructor Summary
Constructors Constructor Description AlertRuleResourceInner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleActionaction()Get the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.List<RuleAction>actions()Get the actions property: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.RuleConditioncondition()Get the condition property: the condition that results in the alert rule being activated.Stringdescription()Get the description property: the description of the alert rule that will be included in the alert email.booleanisEnabled()Get the isEnabled property: the flag that indicates whether the alert rule is enabled.OffsetDateTimelastUpdatedTime()Get the lastUpdatedTime property: Last time the rule was updated in ISO8601 format.StringnamePropertiesName()Get the namePropertiesName property: the name of the alert rule.StringprovisioningState()Get the provisioningState property: the provisioning state.voidvalidate()Validates the instance.AlertRuleResourceInnerwithAction(RuleAction action)Set the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.AlertRuleResourceInnerwithActions(List<RuleAction> actions)Set the actions property: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.AlertRuleResourceInnerwithCondition(RuleCondition condition)Set the condition property: the condition that results in the alert rule being activated.AlertRuleResourceInnerwithDescription(String description)Set the description property: the description of the alert rule that will be included in the alert email.AlertRuleResourceInnerwithIsEnabled(boolean isEnabled)Set the isEnabled property: the flag that indicates whether the alert rule is enabled.AlertRuleResourceInnerwithLocation(String location)AlertRuleResourceInnerwithNamePropertiesName(String namePropertiesName)Set the namePropertiesName property: the name of the alert rule.AlertRuleResourceInnerwithProvisioningState(String provisioningState)Set the provisioningState property: the provisioning state.AlertRuleResourceInnerwithTags(Map<String,String> tags)
-
-
-
Method Detail
-
namePropertiesName
public String namePropertiesName()
Get the namePropertiesName property: the name of the alert rule.- Returns:
- the namePropertiesName value.
-
withNamePropertiesName
public AlertRuleResourceInner withNamePropertiesName(String namePropertiesName)
Set the namePropertiesName property: the name of the alert rule.- Parameters:
namePropertiesName- the namePropertiesName value to set.- Returns:
- the AlertRuleResourceInner object itself.
-
description
public String description()
Get the description property: the description of the alert rule that will be included in the alert email.- Returns:
- the description value.
-
withDescription
public AlertRuleResourceInner withDescription(String description)
Set the description property: the description of the alert rule that will be included in the alert email.- Parameters:
description- the description value to set.- Returns:
- the AlertRuleResourceInner object itself.
-
provisioningState
public String provisioningState()
Get the provisioningState property: the provisioning state.- Returns:
- the provisioningState value.
-
withProvisioningState
public AlertRuleResourceInner withProvisioningState(String provisioningState)
Set the provisioningState property: the provisioning state.- Parameters:
provisioningState- the provisioningState value to set.- Returns:
- the AlertRuleResourceInner object itself.
-
isEnabled
public boolean isEnabled()
Get the isEnabled property: the flag that indicates whether the alert rule is enabled.- Returns:
- the isEnabled value.
-
withIsEnabled
public AlertRuleResourceInner withIsEnabled(boolean isEnabled)
Set the isEnabled property: the flag that indicates whether the alert rule is enabled.- Parameters:
isEnabled- the isEnabled value to set.- Returns:
- the AlertRuleResourceInner object itself.
-
condition
public RuleCondition condition()
Get the condition property: the condition that results in the alert rule being activated.- Returns:
- the condition value.
-
withCondition
public AlertRuleResourceInner withCondition(RuleCondition condition)
Set the condition property: the condition that results in the alert rule being activated.- Parameters:
condition- the condition value to set.- Returns:
- the AlertRuleResourceInner object itself.
-
action
public RuleAction action()
Get the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.- Returns:
- the action value.
-
withAction
public AlertRuleResourceInner withAction(RuleAction action)
Set the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.- Parameters:
action- the action value to set.- Returns:
- the AlertRuleResourceInner object itself.
-
actions
public List<RuleAction> actions()
Get the actions property: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.- Returns:
- the actions value.
-
withActions
public AlertRuleResourceInner withActions(List<RuleAction> actions)
Set the actions property: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.- Parameters:
actions- the actions value to set.- Returns:
- the AlertRuleResourceInner object itself.
-
lastUpdatedTime
public OffsetDateTime lastUpdatedTime()
Get the lastUpdatedTime property: Last time the rule was updated in ISO8601 format.- Returns:
- the lastUpdatedTime value.
-
withLocation
public AlertRuleResourceInner withLocation(String location)
- Overrides:
withLocationin classcom.azure.core.management.Resource
-
withTags
public AlertRuleResourceInner withTags(Map<String,String> tags)
- Overrides:
withTagsin classcom.azure.core.management.Resource
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-