Class MetricAlertResourcePatch
- java.lang.Object
-
- com.microsoft.azure.management.monitor.MetricAlertResourcePatch
-
public class MetricAlertResourcePatch extends Object
The metric alert resource for patch operations.
-
-
Constructor Summary
Constructors Constructor Description MetricAlertResourcePatch()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<MetricAlertAction>actions()Get the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.BooleanautoMitigate()Get the flag that indicates whether the alert should be auto resolved or not.MetricAlertCriteriacriteria()Get defines the specific alert criteria information.Stringdescription()Get the description of the metric alert that will be included in the alert email.booleanenabled()Get the flag that indicates whether the metric alert is enabled.org.joda.time.PeriodevaluationFrequency()Get how often the metric alert is evaluated represented in ISO 8601 duration format.org.joda.time.DateTimelastUpdatedTime()Get last time the rule was updated in ISO8601 format.List<String>scopes()Get the list of resource id's that this metric alert is scoped to.intseverity()Get alert severity {0, 1, 2, 3, 4}.Map<String,String>tags()Get resource tags.org.joda.time.PeriodwindowSize()Get the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.MetricAlertResourcePatchwithActions(List<MetricAlertAction> actions)Set the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.MetricAlertResourcePatchwithAutoMitigate(Boolean autoMitigate)Set the flag that indicates whether the alert should be auto resolved or not.MetricAlertResourcePatchwithCriteria(MetricAlertCriteria criteria)Set defines the specific alert criteria information.MetricAlertResourcePatchwithDescription(String description)Set the description of the metric alert that will be included in the alert email.MetricAlertResourcePatchwithEnabled(boolean enabled)Set the flag that indicates whether the metric alert is enabled.MetricAlertResourcePatchwithEvaluationFrequency(org.joda.time.Period evaluationFrequency)Set how often the metric alert is evaluated represented in ISO 8601 duration format.MetricAlertResourcePatchwithScopes(List<String> scopes)Set the list of resource id's that this metric alert is scoped to.MetricAlertResourcePatchwithSeverity(int severity)Set alert severity {0, 1, 2, 3, 4}.MetricAlertResourcePatchwithTags(Map<String,String> tags)Set resource tags.MetricAlertResourcePatchwithWindowSize(org.joda.time.Period windowSize)Set the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
-
-
-
Method Detail
-
withTags
public MetricAlertResourcePatch withTags(Map<String,String> tags)
Set resource tags.- Parameters:
tags- the tags value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
description
public String description()
Get the description of the metric alert that will be included in the alert email.- Returns:
- the description value
-
withDescription
public MetricAlertResourcePatch withDescription(String description)
Set the description of the metric alert that will be included in the alert email.- Parameters:
description- the description value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
severity
public int severity()
Get alert severity {0, 1, 2, 3, 4}.- Returns:
- the severity value
-
withSeverity
public MetricAlertResourcePatch withSeverity(int severity)
Set alert severity {0, 1, 2, 3, 4}.- Parameters:
severity- the severity value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
enabled
public boolean enabled()
Get the flag that indicates whether the metric alert is enabled.- Returns:
- the enabled value
-
withEnabled
public MetricAlertResourcePatch withEnabled(boolean enabled)
Set the flag that indicates whether the metric alert is enabled.- Parameters:
enabled- the enabled value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
scopes
public List<String> scopes()
Get the list of resource id's that this metric alert is scoped to.- Returns:
- the scopes value
-
withScopes
public MetricAlertResourcePatch withScopes(List<String> scopes)
Set the list of resource id's that this metric alert is scoped to.- Parameters:
scopes- the scopes value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
evaluationFrequency
public org.joda.time.Period evaluationFrequency()
Get how often the metric alert is evaluated represented in ISO 8601 duration format.- Returns:
- the evaluationFrequency value
-
withEvaluationFrequency
public MetricAlertResourcePatch withEvaluationFrequency(org.joda.time.Period evaluationFrequency)
Set how often the metric alert is evaluated represented in ISO 8601 duration format.- Parameters:
evaluationFrequency- the evaluationFrequency value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
windowSize
public org.joda.time.Period windowSize()
Get the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.- Returns:
- the windowSize value
-
withWindowSize
public MetricAlertResourcePatch withWindowSize(org.joda.time.Period windowSize)
Set the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.- Parameters:
windowSize- the windowSize value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
criteria
public MetricAlertCriteria criteria()
Get defines the specific alert criteria information.- Returns:
- the criteria value
-
withCriteria
public MetricAlertResourcePatch withCriteria(MetricAlertCriteria criteria)
Set defines the specific alert criteria information.- Parameters:
criteria- the criteria value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
autoMitigate
public Boolean autoMitigate()
Get the flag that indicates whether the alert should be auto resolved or not.- Returns:
- the autoMitigate value
-
withAutoMitigate
public MetricAlertResourcePatch withAutoMitigate(Boolean autoMitigate)
Set the flag that indicates whether the alert should be auto resolved or not.- Parameters:
autoMitigate- the autoMitigate value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
actions
public List<MetricAlertAction> actions()
Get 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 MetricAlertResourcePatch withActions(List<MetricAlertAction> actions)
Set 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 MetricAlertResourcePatch object itself.
-
lastUpdatedTime
public org.joda.time.DateTime lastUpdatedTime()
Get last time the rule was updated in ISO8601 format.- Returns:
- the lastUpdatedTime value
-
-