Package com.influxdb.client
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 Summary
Modifier and TypeMethodDescriptionaddLabel(Label label, NotificationRule notificationRule) Add a label to a notification rule.Add a label to a notification rule.createHTTPRule(String name, String every, RuleStatusLevel status, List<TagRule> tagRules, HTTPNotificationEndpoint endpoint, String orgID) Add a HTTP notification rule.createPagerDutyRule(String name, String every, String messageTemplate, RuleStatusLevel status, List<TagRule> tagRules, PagerDutyNotificationEndpoint endpoint, String orgID) Add a PagerDuty notification rule.createRule(NotificationRule rule) Add a notification rule.createSlackRule(String name, String every, String messageTemplate, RuleStatusLevel status, SlackNotificationEndpoint endpoint, String orgID) Add a Slack notification rule.createSlackRule(String name, String every, String messageTemplate, RuleStatusLevel status, List<TagRule> tagRules, SlackNotificationEndpoint endpoint, String orgID) Add a Slack notification rule.voiddeleteLabel(Label label, NotificationRule notificationRule) Delete label from a notification rule.voiddeleteLabel(String labelID, String ruleID) Delete label from a notification rule.voiddeleteNotificationRule(NotificationRule notificationRule) Delete a notification rule.voiddeleteNotificationRule(String ruleID) Delete a notification rule.findNotificationRuleByID(String ruleID) Get a notification rule.findNotificationRules(String orgID) Get notification rules.findNotificationRules(String orgID, FindOptions findOptions) Get all notification rules.getLabels(NotificationRule notificationRule) List all labels for a notification rule.List all labels for a notification rule.updateNotificationRule(NotificationRule notificationRule) Update a notification rule.updateNotificationRule(String ruleID, NotificationRuleUpdate update) Update a notification rule.
-
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
Add a notification rule.- Parameters:
rule- Notification rule to create- Returns:
- Notification rule created
-
updateNotificationRule
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
Delete a notification rule.- Parameters:
notificationRule- The notification rule
-
deleteNotificationRule
Delete a notification rule.- Parameters:
ruleID- The notification rule ID
-
findNotificationRuleByID
Get a notification rule.- Parameters:
ruleID- The notification rule ID- Returns:
- The notification rule requested
-
findNotificationRules
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
List all labels for a notification rule.- Parameters:
notificationRule- The notification rule.- Returns:
- A list of all labels for a notification rule
-
getLabels
List all labels for a notification rule.- Parameters:
ruleID- The notification rule ID.- Returns:
- A list of all labels for a notification rule
-
addLabel
Add a label to a notification rule.- Parameters:
label- Label to addnotificationRule- The notification rule.- Returns:
- The label was added to the notification rule
-
addLabel
Add a label to a notification rule.- Parameters:
labelID- Label to addruleID- The notification rule ID.- Returns:
- The label was added to the notification rule
-
deleteLabel
Delete label from a notification rule.- Parameters:
label- The label to delete.notificationRule- The notification rule.
-
deleteLabel
Delete label from a notification rule.- Parameters:
labelID- The ID of the label to delete.ruleID- The notification rule ID.
-