Class RuleEmailAction

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

public final class RuleEmailAction extends RuleAction
Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of RuleEmailAction class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the customEmails property: the list of administrator's custom email addresses to notify of the activation of the alert.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of RuleEmailAction from the JsonReader.
    Get the odataType property: specifies the type of the action.
    Get the sendToServiceOwners property: Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    Validates the instance.
    withCustomEmails(List<String> customEmails)
    Set the customEmails property: the list of administrator's custom email addresses to notify of the activation of the alert.
    withSendToServiceOwners(Boolean sendToServiceOwners)
    Set the sendToServiceOwners property: Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Constructor Details

    • RuleEmailAction

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

    • odataType

      public String odataType()
      Get the odataType property: specifies the type of the action. There are two types of actions: RuleEmailAction and RuleWebhookAction.
      Overrides:
      odataType in class RuleAction
      Returns:
      the odataType value.
    • sendToServiceOwners

      public Boolean sendToServiceOwners()
      Get the sendToServiceOwners property: Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
      Returns:
      the sendToServiceOwners value.
    • withSendToServiceOwners

      public RuleEmailAction withSendToServiceOwners(Boolean sendToServiceOwners)
      Set the sendToServiceOwners property: Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
      Parameters:
      sendToServiceOwners - the sendToServiceOwners value to set.
      Returns:
      the RuleEmailAction object itself.
    • customEmails

      public List<String> customEmails()
      Get the customEmails property: the list of administrator's custom email addresses to notify of the activation of the alert.
      Returns:
      the customEmails value.
    • withCustomEmails

      public RuleEmailAction withCustomEmails(List<String> customEmails)
      Set the customEmails property: the list of administrator's custom email addresses to notify of the activation of the alert.
      Parameters:
      customEmails - the customEmails value to set.
      Returns:
      the RuleEmailAction object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class RuleAction
      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<RuleAction>
      Overrides:
      toJson in class RuleAction
      Throws:
      IOException
    • fromJson

      public static RuleEmailAction fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of RuleEmailAction from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of RuleEmailAction 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 RuleEmailAction.