pagerduty-0.0.0: Client library for PagerDuty Integration and REST APIs.

Safe HaskellNone
LanguageHaskell2010

Network.PagerDuty.REST.Users.NotificationRules

Contents

Description

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

Synopsis

List Rules

listRules :: UserId -> Request Empty s Rule Source

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 Source

Instances

Eq CreateRule 
Show CreateRule 
ToJSON CreateRule 
FromJSON CreateRule 
QueryLike CreateRule 

createRule :: UserId -> ContactId -> Int -> Request CreateRule s Rule Source

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 Source

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 Source

The id of the contact method.

Get Rule

getRule :: UserId -> NotificationRuleId -> Request Empty s Rule Source

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 Source

Instances

Eq UpdateRule 
Show UpdateRule 
ToJSON UpdateRule 
FromJSON UpdateRule 
QueryLike UpdateRule 

updateRule :: UserId -> NotificationRuleId -> Request UpdateRule s Rule Source

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) Source

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) Source

The id of the contact method.

Delete Rule

deleteRule :: UserId -> NotificationRuleId -> Request Empty s Empty Source

Remove a notification rule.

DELETE /users/:user_id/notification_rules/:id

See: http://developer.pagerduty.com/documentation/rest/users/notification_rules/delete

Types

data Rule Source

Instances

Eq Rule 
Show Rule 
ToJSON Rule 
FromJSON Rule 
HasContact Rule 

rId :: Lens' Rule NotificationRuleId Source