Safe Haskell | None |
---|---|
Language | Haskell2010 |
When a user is assigned an incident, the user's notification rules are used to determine which contact method will be used to alert the user and how long after the incident to do so.
Access and manipulate the notification rules for a user.
See: http://developer.pagerduty.com/documentation/rest/users/notification_rules
- listRules :: UserId -> Request Empty s Rule
- data CreateRule
- createRule :: UserId -> ContactId -> Int -> Request CreateRule s Rule
- crStartDelayInMinutes :: Lens' (Request CreateRule s b) Int
- crContactMethodId :: Lens' (Request CreateRule s b) ContactId
- getRule :: UserId -> NotificationRuleId -> Request Empty s Rule
- data UpdateRule
- updateRule :: UserId -> NotificationRuleId -> Request UpdateRule s Rule
- urStartDelayInMinutes :: Lens' (Request UpdateRule s b) (Maybe Int)
- urContactMethodId :: Lens' (Request UpdateRule s b) (Maybe ContactId)
- deleteRule :: UserId -> NotificationRuleId -> Request Empty s Empty
- data Rule
- rId :: Lens' Rule NotificationRuleId
- rStartDelayInMinutes :: Lens' Rule Int
- rContactMethod :: Lens' Rule Contact
List Rules
listRules :: UserId -> Request Empty s Rule
List existing notification rules for the specified user.
GET /users/:user_id/notification_rules
See: http://developer.pagerduty.com/documentation/rest/users/notification_rules/list
Create Rule
data CreateRule
Eq CreateRule | |
Show CreateRule | |
ToJSON CreateRule | |
FromJSON CreateRule | |
QueryLike CreateRule |
createRule :: UserId -> ContactId -> Int -> Request CreateRule s Rule
Create a new notification rule for the specified user.
POST /users/:user_id/notification_rules
See: http://developer.pagerduty.com/documentation/rest/users/notification_rules/create
crStartDelayInMinutes :: Lens' (Request CreateRule s b) Int
Number of minutes it will take for the notification rule to be activated (from the time the incident is assigned to the owning user) and an alert be fired.
crContactMethodId :: Lens' (Request CreateRule s b) ContactId
The id of the contact method.
Get Rule
getRule :: UserId -> NotificationRuleId -> Request Empty s Rule
Get details for a notification rule.
GET /users/:user_id/notification_rules/:id
See: http://developer.pagerduty.com/documentation/rest/users/notification_rules/show
Update Rule
data UpdateRule
Eq UpdateRule | |
Show UpdateRule | |
ToJSON UpdateRule | |
FromJSON UpdateRule | |
QueryLike UpdateRule |
updateRule :: UserId -> NotificationRuleId -> Request UpdateRule s Rule
Update an existing notification rule.
PUT /users/:user_id/notification_rules/:id
See: http://developer.pagerduty.com/documentation/rest/users/notification_rules/update
urStartDelayInMinutes :: Lens' (Request UpdateRule s b) (Maybe Int)
Number of minutes it will take for the notification rule to be activated (from the time the incident is assigned to the owning user) and an alert be fired.
urContactMethodId :: Lens' (Request UpdateRule s b) (Maybe ContactId)
The id of the contact method.
Delete Rule
deleteRule :: UserId -> NotificationRuleId -> Request Empty s Empty
Remove a notification rule.
DELETE /users/:user_id/notification_rules/:id
See: http://developer.pagerduty.com/documentation/rest/users/notification_rules/delete
Types
rId :: Lens' Rule NotificationRuleId
rStartDelayInMinutes :: Lens' Rule Int
rContactMethod :: Lens' Rule Contact