Interface NotificationRulesApi


@ThreadSafe public interface NotificationRulesApi
The client of the InfluxDB 2.x that implement NotificationRules HTTP API endpoint.
Author:
Jakub Bednar (23/09/2019 10:43)
  • Method Details

    • createSlackRule

      @Nonnull SlackNotificationRule createSlackRule(@Nonnull String name, @Nonnull String every, @Nonnull String messageTemplate, @Nonnull RuleStatusLevel status, @Nonnull SlackNotificationEndpoint endpoint, @Nonnull String orgID)
      Add a Slack notification rule.
      Parameters:
      name - Human-readable name describing the notification rule.
      every - The notification repetition interval.
      messageTemplate - The template used to generate notification.
      status - Status rule the notification rule attempts to match.
      endpoint - The endpoint to use for notification.
      orgID - The ID of the organization that owns this notification rule.
      Returns:
      Notification rule created
    • createSlackRule

      @Nonnull SlackNotificationRule createSlackRule(@Nonnull String name, @Nonnull String every, @Nonnull String messageTemplate, @Nonnull RuleStatusLevel status, @Nonnull List<TagRule> tagRules, @Nonnull SlackNotificationEndpoint endpoint, @Nonnull String orgID)
      Add a Slack notification rule.
      Parameters:
      name - Human-readable name describing the notification rule.
      every - The notification repetition interval.
      messageTemplate - The template used to generate notification.
      status - Status rule the notification rule attempts to match.
      tagRules - List of tag rules the notification rule attempts to match.
      endpoint - The endpoint to use for notification.
      orgID - The ID of the organization that owns this notification rule.
      Returns:
      Notification rule created
    • createPagerDutyRule

      @Nonnull PagerDutyNotificationRule createPagerDutyRule(@Nonnull String name, @Nonnull String every, @Nonnull String messageTemplate, @Nonnull RuleStatusLevel status, @Nonnull List<TagRule> tagRules, @Nonnull PagerDutyNotificationEndpoint endpoint, @Nonnull String orgID)
      Add a PagerDuty notification rule.
      Parameters:
      name - Human-readable name describing the notification rule.
      every - The notification repetition interval.
      messageTemplate - The template used to generate notification.
      status - Status rule the notification rule attempts to match.
      tagRules - List of tag rules the notification rule attempts to match.
      endpoint - The endpoint to use for notification.
      orgID - The ID of the organization that owns this notification rule.
      Returns:
      Notification rule created
    • createHTTPRule

      @Nonnull HTTPNotificationRule createHTTPRule(@Nonnull String name, @Nonnull String every, @Nonnull RuleStatusLevel status, @Nonnull List<TagRule> tagRules, @Nonnull HTTPNotificationEndpoint endpoint, @Nonnull String orgID)
      Add a HTTP notification rule.
      Parameters:
      name - Human-readable name describing the notification rule.
      every - The notification repetition interval.
      status - Status rule the notification rule attempts to match.
      tagRules - List of tag rules the notification rule attempts to match.
      endpoint - The endpoint to use for notification.
      orgID - The ID of the organization that owns this notification rule.
      Returns:
      Notification rule created
    • createRule

      @Nonnull NotificationRule createRule(@Nonnull NotificationRule rule)
      Add a notification rule.
      Parameters:
      rule - Notification rule to create
      Returns:
      Notification rule created
    • updateNotificationRule

      @Nonnull NotificationRule updateNotificationRule(@Nonnull NotificationRule notificationRule)
      Update a notification rule.
      Parameters:
      notificationRule - Notification rule update to apply
      Returns:
      An updated notification rule
    • updateNotificationRule

      @Nonnull NotificationRule updateNotificationRule(@Nonnull String ruleID, @Nonnull NotificationRuleUpdate update)
      Update a notification rule.
      Parameters:
      ruleID - The notification rule ID.
      update - Notification rule update to apply
      Returns:
      An updated notification rule
    • deleteNotificationRule

      void deleteNotificationRule(@Nonnull NotificationRule notificationRule)
      Delete a notification rule.
      Parameters:
      notificationRule - The notification rule
    • deleteNotificationRule

      void deleteNotificationRule(@Nonnull String ruleID)
      Delete a notification rule.
      Parameters:
      ruleID - The notification rule ID
    • findNotificationRuleByID

      @Nonnull NotificationRule findNotificationRuleByID(@Nonnull String ruleID)
      Get a notification rule.
      Parameters:
      ruleID - The notification rule ID
      Returns:
      The notification rule requested
    • findNotificationRules

      @Nonnull List<NotificationRule> findNotificationRules(@Nonnull String orgID)
      Get notification rules.
      Parameters:
      orgID - Only show notification rules that belong to a specific organization ID.
      Returns:
      A list of notification rules
    • findNotificationRules

      @Nonnull NotificationRules findNotificationRules(@Nonnull String orgID, @Nonnull FindOptions findOptions)
      Get all notification rules.
      Parameters:
      orgID - Only show notification rules that belong to a specific organization ID.
      findOptions - find options
      Returns:
      A list of notification rules
    • getLabels

      @Nonnull List<Label> getLabels(@Nonnull NotificationRule notificationRule)
      List all labels for a notification rule.
      Parameters:
      notificationRule - The notification rule.
      Returns:
      A list of all labels for a notification rule
    • getLabels

      @Nonnull List<Label> getLabels(@Nonnull String ruleID)
      List all labels for a notification rule.
      Parameters:
      ruleID - The notification rule ID.
      Returns:
      A list of all labels for a notification rule
    • addLabel

      @Nonnull LabelResponse addLabel(@Nonnull Label label, @Nonnull NotificationRule notificationRule)
      Add a label to a notification rule.
      Parameters:
      label - Label to add
      notificationRule - The notification rule.
      Returns:
      The label was added to the notification rule
    • addLabel

      @Nonnull LabelResponse addLabel(@Nonnull String labelID, @Nonnull String ruleID)
      Add a label to a notification rule.
      Parameters:
      labelID - Label to add
      ruleID - The notification rule ID.
      Returns:
      The label was added to the notification rule
    • deleteLabel

      void deleteLabel(@Nonnull Label label, @Nonnull NotificationRule notificationRule)
      Delete label from a notification rule.
      Parameters:
      label - The label to delete.
      notificationRule - The notification rule.
    • deleteLabel

      void deleteLabel(@Nonnull String labelID, @Nonnull String ruleID)
      Delete label from a notification rule.
      Parameters:
      labelID - The ID of the label to delete.
      ruleID - The notification rule ID.