MetricAlertResourceInner Class
public class MetricAlertResourceInner implements Resource
The metric alert resource.
Method Summary
Modifier and Type | Method and Description |
---|---|
List<Metric |
actions()
Get the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. |
Boolean |
autoMitigate()
Get the flag that indicates whether the alert should be auto resolved or not. |
Metric |
criteria()
Get defines the specific alert criteria information. |
String |
description()
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. |
Period |
evaluationFrequency()
Get how often the metric alert is evaluated represented in ISO 8601 duration format. |
DateTime |
lastUpdatedTime()
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. |
int |
severity()
Get alert severity {0, 1, 2, 3, 4}. |
String |
targetResourceRegion()
Get the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. |
String |
targetResourceType()
Get the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. |
Period |
windowSize()
Get the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. |
Metric |
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. |
Metric |
withAutoMitigate(Boolean autoMitigate)
Set the flag that indicates whether the alert should be auto resolved or not. |
Metric |
withCriteria(MetricAlertCriteria criteria)
Set defines the specific alert criteria information. |
Metric |
withDescription(String description)
Set the description of the metric alert that will be included in the alert email. |
Metric |
withEnabled(boolean enabled)
Set the flag that indicates whether the metric alert is enabled. |
Metric |
withEvaluationFrequency(Period evaluationFrequency)
Set how often the metric alert is evaluated represented in ISO 8601 duration format. |
Metric |
withScopes(List<String> scopes)
Set the list of resource id's that this metric alert is scoped to. |
Metric |
withSeverity(int severity)
Set alert severity {0, 1, 2, 3, 4}. |
Metric |
withTargetResourceRegion(String targetResourceRegion)
Set the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. |
Metric |
withTargetResourceType(String targetResourceType)
Set the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. |
Metric |
withWindowSize(Period windowSize)
Set the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. |
Inherited Members
Method Details
actions
public List
Get the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
Returns:
autoMitigate
public Boolean autoMitigate()
Get the flag that indicates whether the alert should be auto resolved or not.
Returns:
criteria
public MetricAlertCriteria criteria()
Get defines the specific alert criteria information.
Returns:
description
public String description()
Get the description of the metric alert that will be included in the alert email.
Returns:
enabled
public boolean enabled()
Get the flag that indicates whether the metric alert is enabled.
Returns:
evaluationFrequency
public Period evaluationFrequency()
Get how often the metric alert is evaluated represented in ISO 8601 duration format.
Returns:
lastUpdatedTime
public DateTime lastUpdatedTime()
Get last time the rule was updated in ISO8601 format.
Returns:
scopes
public List
Get the list of resource id's that this metric alert is scoped to.
Returns:
severity
public int severity()
Get alert severity {0, 1, 2, 3, 4}.
Returns:
targetResourceRegion
public String targetResourceRegion()
Get the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
Returns:
targetResourceType
public String targetResourceType()
Get the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
Returns:
windowSize
public Period windowSize()
Get the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
Returns:
withActions
public MetricAlertResourceInner withActions(List
Set the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
Parameters:
Returns:
withAutoMitigate
public MetricAlertResourceInner withAutoMitigate(Boolean autoMitigate)
Set the flag that indicates whether the alert should be auto resolved or not.
Parameters:
Returns:
withCriteria
public MetricAlertResourceInner withCriteria(MetricAlertCriteria criteria)
Set defines the specific alert criteria information.
Parameters:
Returns:
withDescription
public MetricAlertResourceInner withDescription(String description)
Set the description of the metric alert that will be included in the alert email.
Parameters:
Returns:
withEnabled
public MetricAlertResourceInner withEnabled(boolean enabled)
Set the flag that indicates whether the metric alert is enabled.
Parameters:
Returns:
withEvaluationFrequency
public MetricAlertResourceInner withEvaluationFrequency(Period evaluationFrequency)
Set how often the metric alert is evaluated represented in ISO 8601 duration format.
Parameters:
Returns:
withScopes
public MetricAlertResourceInner withScopes(List
Set the list of resource id's that this metric alert is scoped to.
Parameters:
Returns:
withSeverity
public MetricAlertResourceInner withSeverity(int severity)
Set alert severity {0, 1, 2, 3, 4}.
Parameters:
Returns:
withTargetResourceRegion
public MetricAlertResourceInner withTargetResourceRegion(String targetResourceRegion)
Set the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
Parameters:
Returns:
withTargetResourceType
public MetricAlertResourceInner withTargetResourceType(String targetResourceType)
Set the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
Parameters:
Returns:
withWindowSize
public MetricAlertResourceInner withWindowSize(Period windowSize)
Set the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for