Class MetricAlertAction

java.lang.Object
com.azure.resourcemanager.monitor.models.MetricAlertAction
All Implemented Interfaces:
com.azure.json.JsonSerializable<MetricAlertAction>

public final class MetricAlertAction extends Object implements com.azure.json.JsonSerializable<MetricAlertAction>
An alert action.
  • Constructor Details

    • MetricAlertAction

      public MetricAlertAction()
      Creates an instance of MetricAlertAction class.
  • Method Details

    • actionGroupId

      public String actionGroupId()
      Get the actionGroupId property: the id of the action group to use.
      Returns:
      the actionGroupId value.
    • withActionGroupId

      public MetricAlertAction withActionGroupId(String actionGroupId)
      Set the actionGroupId property: the id of the action group to use.
      Parameters:
      actionGroupId - the actionGroupId value to set.
      Returns:
      the MetricAlertAction object itself.
    • webhookProperties

      public Map<String,String> webhookProperties()
      Get the webhookProperties property: This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
      Returns:
      the webhookProperties value.
    • withWebhookProperties

      public MetricAlertAction withWebhookProperties(Map<String,String> webhookProperties)
      Set the webhookProperties property: This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.
      Parameters:
      webhookProperties - the webhookProperties value to set.
      Returns:
      the MetricAlertAction object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<MetricAlertAction>
      Throws:
      IOException
    • fromJson

      public static MetricAlertAction fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of MetricAlertAction from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MetricAlertAction if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the MetricAlertAction.