Class MetricAlertResourcePatch
java.lang.Object
com.microsoft.azure.management.monitor.MetricAlertResourcePatch
The metric alert resource for patch operations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions()
Get the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.Get the flag that indicates whether the alert should be auto resolved or not.criteria()
Get defines the specific alert criteria information.Get the description of the metric alert that will be included in the alert email.boolean
enabled()
Get the flag that indicates whether the metric alert is enabled.org.joda.time.Period
Get how often the metric alert is evaluated represented in ISO 8601 duration format.org.joda.time.DateTime
Get last time the rule was updated in ISO8601 format.scopes()
Get the list of resource id's that this metric alert is scoped to.int
severity()
Get alert severity {0, 1, 2, 3, 4}.tags()
Get resource tags.Get the region of the target resource(s) on which the alert is created/updated.Get the resource type of the target resource(s) on which the alert is created/updated.org.joda.time.Period
Get the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.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.withAutoMitigate
(Boolean autoMitigate) Set the flag that indicates whether the alert should be auto resolved or not.withCriteria
(MetricAlertCriteria criteria) Set defines the specific alert criteria information.withDescription
(String description) Set the description of the metric alert that will be included in the alert email.withEnabled
(boolean enabled) Set the flag that indicates whether the metric alert is enabled.withEvaluationFrequency
(org.joda.time.Period evaluationFrequency) Set how often the metric alert is evaluated represented in ISO 8601 duration format.withScopes
(List<String> scopes) Set the list of resource id's that this metric alert is scoped to.withSeverity
(int severity) Set alert severity {0, 1, 2, 3, 4}.Set resource tags.withTargetResourceRegion
(String targetResourceRegion) Set the region of the target resource(s) on which the alert is created/updated.withTargetResourceType
(String targetResourceType) Set the resource type of the target resource(s) on which the alert is created/updated.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.
-
Constructor Details
-
MetricAlertResourcePatch
public MetricAlertResourcePatch()
-
-
Method Details
-
tags
Get resource tags.- Returns:
- the tags value
-
withTags
Set resource tags.- Parameters:
tags
- the tags value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
description
Get the description of the metric alert that will be included in the alert email.- Returns:
- the description value
-
withDescription
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
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
Set the flag that indicates whether the metric alert is enabled.- Parameters:
enabled
- the enabled value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
scopes
Get the list of resource id's that this metric alert is scoped to.- Returns:
- the scopes value
-
withScopes
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
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
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.
-
targetResourceType
Get the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.- Returns:
- the targetResourceType value
-
withTargetResourceType
Set the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.- Parameters:
targetResourceType
- the targetResourceType value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
targetResourceRegion
Get the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.- Returns:
- the targetResourceRegion value
-
withTargetResourceRegion
Set the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.- Parameters:
targetResourceRegion
- the targetResourceRegion value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
criteria
Get defines the specific alert criteria information.- Returns:
- the criteria value
-
withCriteria
Set defines the specific alert criteria information.- Parameters:
criteria
- the criteria value to set- Returns:
- the MetricAlertResourcePatch object itself.
-
autoMitigate
Get the flag that indicates whether the alert should be auto resolved or not.- Returns:
- the autoMitigate value
-
withAutoMitigate
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
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
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
-