Class MetricAlertResourcePatch
java.lang.Object
com.microsoft.azure.management.monitor.MetricAlertResourcePatch
The metric alert resource for patch operations.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.booleanenabled()Get the flag that indicates whether the metric alert is enabled.org.joda.time.PeriodGet how often the metric alert is evaluated represented in ISO 8601 duration format.org.joda.time.DateTimeGet last time the rule was updated in ISO8601 format.scopes()Get the list of resource id's that this metric alert is scoped to.intseverity()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.PeriodGet 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- 
MetricAlertResourcePatchpublic MetricAlertResourcePatch()
 
- 
- 
Method Details- 
tagsGet resource tags.- Returns:
- the tags value
 
- 
withTagsSet resource tags.- Parameters:
- tags- the tags value to set
- Returns:
- the MetricAlertResourcePatch object itself.
 
- 
descriptionGet the description of the metric alert that will be included in the alert email.- Returns:
- the description value
 
- 
withDescriptionSet 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.
 
- 
severitypublic int severity()Get alert severity {0, 1, 2, 3, 4}.- Returns:
- the severity value
 
- 
withSeveritySet alert severity {0, 1, 2, 3, 4}.- Parameters:
- severity- the severity value to set
- Returns:
- the MetricAlertResourcePatch object itself.
 
- 
enabledpublic boolean enabled()Get the flag that indicates whether the metric alert is enabled.- Returns:
- the enabled value
 
- 
withEnabledSet the flag that indicates whether the metric alert is enabled.- Parameters:
- enabled- the enabled value to set
- Returns:
- the MetricAlertResourcePatch object itself.
 
- 
scopesGet the list of resource id's that this metric alert is scoped to.- Returns:
- the scopes value
 
- 
withScopesSet 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.
 
- 
evaluationFrequencypublic org.joda.time.Period evaluationFrequency()Get how often the metric alert is evaluated represented in ISO 8601 duration format.- Returns:
- the evaluationFrequency value
 
- 
withEvaluationFrequencySet 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.
 
- 
windowSizepublic 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
 
- 
withWindowSizeSet 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.
 
- 
targetResourceTypeGet the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.- Returns:
- the targetResourceType value
 
- 
withTargetResourceTypeSet 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.
 
- 
targetResourceRegionGet the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.- Returns:
- the targetResourceRegion value
 
- 
withTargetResourceRegionSet 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.
 
- 
criteriaGet defines the specific alert criteria information.- Returns:
- the criteria value
 
- 
withCriteriaSet defines the specific alert criteria information.- Parameters:
- criteria- the criteria value to set
- Returns:
- the MetricAlertResourcePatch object itself.
 
- 
autoMitigateGet the flag that indicates whether the alert should be auto resolved or not.- Returns:
- the autoMitigate value
 
- 
withAutoMitigateSet 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.
 
- 
actionsGet the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.- Returns:
- the actions value
 
- 
withActionsSet 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.
 
- 
lastUpdatedTimepublic org.joda.time.DateTime lastUpdatedTime()Get last time the rule was updated in ISO8601 format.- Returns:
- the lastUpdatedTime value
 
 
-