Class EmailNotificationHook

java.lang.Object
com.azure.ai.metricsadvisor.administration.models.NotificationHook
com.azure.ai.metricsadvisor.administration.models.EmailNotificationHook

public final class EmailNotificationHook extends NotificationHook
A hook that describes email based incident alerts notification.
  • Constructor Details

    • EmailNotificationHook

      public EmailNotificationHook(String name)
      Create a new instance of EmailNotificationHook.
      Parameters:
      name - The email hook name.
    • EmailNotificationHook

      public EmailNotificationHook(String name, List<String> emails)
      Create a new instance of EmailNotificationHook.
      Parameters:
      name - The email hook name.
      emails - The emails to send the alerts.
  • Method Details

    • getName

      public String getName()
      Description copied from class: NotificationHook
      Gets the name for the Notification hook.
      Specified by:
      getName in class NotificationHook
      Returns:
      The name.
    • getDescription

      public String getDescription()
      Description copied from class: NotificationHook
      Gets the description for the Notification hook.
      Specified by:
      getDescription in class NotificationHook
      Returns:
      The description.
    • getExternalLink

      public String getExternalLink()
      Gets the customized external link which is displayed in the title bar of the alert email.
      Returns:
      The external link.
    • getEmailsToAlert

      public List<String> getEmailsToAlert()
      Gets the emails to send the alerts.
      Returns:
      The emails.
    • setEmailsToAlert

      public EmailNotificationHook setEmailsToAlert(List<String> emails)
      Sets the emails to send the alert.
      Parameters:
      emails - The emails.
      Returns:
      The EmailNotificationHook object itself.
    • setName

      public EmailNotificationHook setName(String name)
      Sets email hook name.
      Parameters:
      name - The email hook name.
      Returns:
      The EmailNotificationHook object itself.
    • setDescription

      public EmailNotificationHook setDescription(String description)
      Sets email hook description.
      Parameters:
      description - The email hook description.
      Returns:
      The EmailNotificationHook object itself.
    • setExternalLink

      public EmailNotificationHook setExternalLink(String externalLink)
      Sets the customized external link which is displayed in the title bar of the alert email.
      Parameters:
      externalLink - The customized link.
      Returns:
      The EmailNotificationHook object itself.
    • setAdmins

      public EmailNotificationHook setAdmins(List<String> admins)
      Sets the user e-mails and clientIds with administrative rights to manage the hook.

      The administrators have total control over the hook, being allowed to update or delete the hook. Each element in this list represents a user with administrator access, but the value of each string element is either user email address or clientId uniquely identifying the user service principal.

      Parameters:
      admins - A list containing email or clientId of admins
      Returns:
      The EmailNotificationHook object itself.