Class WebNotificationHook

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

public final class WebNotificationHook extends NotificationHook
A hook that describes web-hook based incident alerts notification.
  • Constructor Details

    • WebNotificationHook

      public WebNotificationHook(String name, String endpoint)
      Create a new instance of WebNotificationHook.
      Parameters:
      name - The web hook name.
      endpoint - The web endpoint to notify incident 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.
    • getEndpoint

      public String getEndpoint()
      Gets the web endpoint that receives incident alerts.
      Returns:
      The endpoint.
    • getExternalLink

      public String getExternalLink()
      Gets the external link url, this will be included in the notification sent to the users, this is usually a reference to any troubleshooting guide.
      Returns:
      The external link.
    • getUsername

      public String getUsername()
      Gets the user name to authenticate the endpoint.
      Returns:
      The user name.
    • getPassword

      public String getPassword()
      Gets the password to authenticate the endpoint.
      Returns:
      The password.
    • getClientCertificate

      public String getClientCertificate()
      The HTTPS client certificate to access the endpoint.
      Returns:
      The client certificate.
    • getClientCertificatePassword

      public String getClientCertificatePassword()
      The password of the HTTPS client certificate to access the endpoint.
      Returns:
      The client certificate password
    • getHttpHeaders

      public HttpHeaders getHttpHeaders()
      Gets the HTTP headers to send while sending alert to the endpoint.
      Returns:
      The HTTP headers.
    • setEndPoint

      public WebNotificationHook setEndPoint(String endpoint)
      The web endpoint to notify incident alerts.
      Parameters:
      endpoint - The endpoint
      Returns:
      The WebNotificationHook object itself.
    • setName

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

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

      public WebNotificationHook setExternalLink(String externalLink)
      Sets the customized external link, it will be included in the notification sent to the users, this is usually a reference to any troubleshooting guide.
      Parameters:
      externalLink - The customized link.
      Returns:
      The WebNotificationHook object itself.
    • setUserCredentials

      public WebNotificationHook setUserCredentials(String username, String password)
      Sets the credential to access the endpoint.
      Parameters:
      username - The user name.
      password - The password.
      Returns:
      The WebNotificationHook object itself.
    • setClientCertificate

      public WebNotificationHook setClientCertificate(String certificate, String password)
      Sets the HTTPS certificate to use to access the endpoint.
      Parameters:
      certificate - The certificate.
      password - The certificate password.
      Returns:
      The WebNotificationHook object itself.
    • setHttpHeaders

      public WebNotificationHook setHttpHeaders(HttpHeaders httpHeaders)
      Sets the HTTP headers to send while sending alert to the endpoint.
      Parameters:
      httpHeaders - The HTTP headers.
      Returns:
      The WebNotificationHook object itself.
    • setAdmins

      public WebNotificationHook 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 as either user email address or clientId uniquely identifying the user service principal.

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