Class AlertRuleResourceInner
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
com.azure.resourcemanager.monitor.fluent.models.AlertRuleResourceInner
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
public final class AlertRuleResourceInner
extends com.azure.core.management.Resource
The alert rule resource.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of AlertRuleResourceInner class. -
Method Summary
Modifier and TypeMethodDescriptionaction()
Get the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.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.Get the condition property: the condition that results in the alert rule being activated.Get the description property: the description of the alert rule that will be included in the alert email.static AlertRuleResourceInner
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AlertRuleResourceInner from the JsonReader.id()
Get the id property: Fully qualified resource Id for the resource.boolean
Get the isEnabled property: the flag that indicates whether the alert rule is enabled.Get the lastUpdatedTime property: Last time the rule was updated in ISO8601 format.name()
Get the name property: The name of the resource.Get the name property: the name of the alert rule.Get the provisioningState property: the provisioning state.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) type()
Get the type property: The type of the resource.void
validate()
Validates the instance.withAction
(RuleAction action) Set the action property: action that is performed when the alert rule becomes active, and when an alert condition is resolved.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.withCondition
(RuleCondition condition) Set the condition property: the condition that results in the alert rule being activated.withDescription
(String description) Set the description property: the description of the alert rule that will be included in the alert email.withIsEnabled
(boolean isEnabled) Set the isEnabled property: the flag that indicates whether the alert rule is enabled.withLocation
(String location) withNamePropertiesName
(String name) Set the name property: the name of the alert rule.withProvisioningState
(String provisioningState) Set the provisioningState property: the provisioning state.Methods inherited from class com.azure.core.management.Resource
location, tags
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
AlertRuleResourceInner
public AlertRuleResourceInner()Creates an instance of AlertRuleResourceInner class.
-
-
Method Details
-
id
Get the id property: Fully qualified resource Id for the resource.- Overrides:
id
in classcom.azure.core.management.ProxyResource
- Returns:
- the id value.
-
name
Get the name property: The name of the resource.- Overrides:
name
in classcom.azure.core.management.ProxyResource
- Returns:
- the name value.
-
type
Get the type property: The type of the resource.- Overrides:
type
in classcom.azure.core.management.ProxyResource
- Returns:
- the type value.
-
withLocation
- Overrides:
withLocation
in classcom.azure.core.management.Resource
-
withTags
- Overrides:
withTags
in classcom.azure.core.management.Resource
-
namePropertiesName
Get the name property: the name of the alert rule.- Returns:
- the name value.
-
withNamePropertiesName
Set the name property: the name of the alert rule.- Parameters:
name
- the name value to set.- Returns:
- the AlertRuleResourceInner object itself.
-
description
Get the description property: the description of the alert rule that will be included in the alert email.- Returns:
- the description value.
-
withDescription
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
Get the provisioningState property: the provisioning state.- Returns:
- the provisioningState value.
-
withProvisioningState
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
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
Get the condition property: the condition that results in the alert rule being activated.- Returns:
- the condition value.
-
withCondition
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
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
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
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
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
Get the lastUpdatedTime property: Last time the rule was updated in ISO8601 format.- Returns:
- the lastUpdatedTime value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
- Overrides:
toJson
in classcom.azure.core.management.Resource
- Throws:
IOException
-
fromJson
public static AlertRuleResourceInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AlertRuleResourceInner from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of AlertRuleResourceInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the AlertRuleResourceInner.
-