Class MetricAlertResourcePatch

java.lang.Object
com.microsoft.azure.management.monitor.MetricAlertResourcePatch

public class MetricAlertResourcePatch extends Object
The metric alert resource for patch operations.
  • Constructor Details

    • MetricAlertResourcePatch

      public MetricAlertResourcePatch()
  • Method Details

    • tags

      public Map<String,String> tags()
      Get resource tags.
      Returns:
      the tags value
    • 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.
    • targetResourceType

      public String 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

      public MetricAlertResourcePatch withTargetResourceType(String targetResourceType)
      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

      public String targetResourceRegion()
      Get the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria.
      Returns:
      the targetResourceRegion value
    • withTargetResourceRegion

      public MetricAlertResourcePatch withTargetResourceRegion(String targetResourceRegion)
      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

      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