public class MetricAlertResourcePatch extends Object
| Constructor and Description |
|---|
MetricAlertResourcePatch() |
| Modifier and Type | Method and Description |
|---|---|
List<MetricAlertAction> |
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.
|
Boolean |
autoMitigate()
Get the autoMitigate property: the flag that indicates whether the alert should be auto resolved or not.
|
MetricAlertCriteria |
criteria()
Get the criteria property: defines the specific alert criteria information.
|
String |
description()
Get the description property: the description of the metric alert that will be included in the alert email.
|
Boolean |
enabled()
Get the enabled property: the flag that indicates whether the metric alert is enabled.
|
Duration |
evaluationFrequency()
Get the evaluationFrequency property: how often the metric alert is evaluated represented in ISO 8601 duration
format.
|
OffsetDateTime |
lastUpdatedTime()
Get the lastUpdatedTime property: Last time the rule was updated in ISO8601 format.
|
List<String> |
scopes()
Get the scopes property: the list of resource id's that this metric alert is scoped to.
|
Integer |
severity()
Get the severity property: Alert severity {0, 1, 2, 3, 4}.
|
Map<String,String> |
tags()
Get the tags property: Resource tags.
|
String |
targetResourceRegion()
Get the targetResourceRegion property: the region of the target resource(s) on which the alert is
created/updated.
|
String |
targetResourceType()
Get the targetResourceType property: the resource type of the target resource(s) on which the alert is
created/updated.
|
void |
validate()
Validates the instance.
|
Duration |
windowSize()
Get the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert
activity based on the threshold.
|
MetricAlertResourcePatch |
withActions(List<MetricAlertAction> 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.
|
MetricAlertResourcePatch |
withAutoMitigate(Boolean autoMitigate)
Set the autoMitigate property: the flag that indicates whether the alert should be auto resolved or not.
|
MetricAlertResourcePatch |
withCriteria(MetricAlertCriteria criteria)
Set the criteria property: defines the specific alert criteria information.
|
MetricAlertResourcePatch |
withDescription(String description)
Set the description property: the description of the metric alert that will be included in the alert email.
|
MetricAlertResourcePatch |
withEnabled(Boolean enabled)
Set the enabled property: the flag that indicates whether the metric alert is enabled.
|
MetricAlertResourcePatch |
withEvaluationFrequency(Duration evaluationFrequency)
Set the evaluationFrequency property: how often the metric alert is evaluated represented in ISO 8601 duration
format.
|
MetricAlertResourcePatch |
withScopes(List<String> scopes)
Set the scopes property: the list of resource id's that this metric alert is scoped to.
|
MetricAlertResourcePatch |
withSeverity(Integer severity)
Set the severity property: Alert severity {0, 1, 2, 3, 4}.
|
MetricAlertResourcePatch |
withTags(Map<String,String> tags)
Set the tags property: Resource tags.
|
MetricAlertResourcePatch |
withTargetResourceRegion(String targetResourceRegion)
Set the targetResourceRegion property: the region of the target resource(s) on which the alert is
created/updated.
|
MetricAlertResourcePatch |
withTargetResourceType(String targetResourceType)
Set the targetResourceType property: the resource type of the target resource(s) on which the alert is
created/updated.
|
MetricAlertResourcePatch |
withWindowSize(Duration windowSize)
Set the windowSize property: the period of time (in ISO 8601 duration format) that is used to monitor alert
activity based on the threshold.
|
public Map<String,String> tags()
public MetricAlertResourcePatch withTags(Map<String,String> tags)
tags - the tags value to set.public String description()
public MetricAlertResourcePatch withDescription(String description)
description - the description value to set.public Integer severity()
public MetricAlertResourcePatch withSeverity(Integer severity)
severity - the severity value to set.public Boolean enabled()
public MetricAlertResourcePatch withEnabled(Boolean enabled)
enabled - the enabled value to set.public List<String> scopes()
public MetricAlertResourcePatch withScopes(List<String> scopes)
scopes - the scopes value to set.public Duration evaluationFrequency()
public MetricAlertResourcePatch withEvaluationFrequency(Duration evaluationFrequency)
evaluationFrequency - the evaluationFrequency value to set.public Duration windowSize()
public MetricAlertResourcePatch withWindowSize(Duration windowSize)
windowSize - the windowSize value to set.public String targetResourceType()
public MetricAlertResourcePatch withTargetResourceType(String targetResourceType)
targetResourceType - the targetResourceType value to set.public String targetResourceRegion()
public MetricAlertResourcePatch withTargetResourceRegion(String targetResourceRegion)
targetResourceRegion - the targetResourceRegion value to set.public MetricAlertCriteria criteria()
public MetricAlertResourcePatch withCriteria(MetricAlertCriteria criteria)
criteria - the criteria value to set.public Boolean autoMitigate()
public MetricAlertResourcePatch withAutoMitigate(Boolean autoMitigate)
autoMitigate - the autoMitigate value to set.public List<MetricAlertAction> actions()
public MetricAlertResourcePatch withActions(List<MetricAlertAction> actions)
actions - the actions value to set.public OffsetDateTime lastUpdatedTime()
public void validate()
IllegalArgumentException - thrown if the instance is not valid.Copyright © 2020 Microsoft Corporation. All rights reserved.