Safe Haskell | None |
---|---|
Language | Haskell2010 |
This API lets you access and manipulate escalation rules of an existing escalation policy.
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules
- listRules :: EscalationPolicyId -> Request Empty s [Rule]
- data CreateRule
- createRule :: EscalationPolicyId -> Int -> [TargetId] -> Request CreateRule s Rule
- crEscalationDelayInMinutes :: Lens' CreateRule Int
- crTargets :: Lens' CreateRule [TargetId]
- getRule :: EscalationPolicyId -> EscalationRuleId -> Request Empty s Rule
- data UpdateRules
- updateRules :: EscalationPolicyId -> [TargetId] -> Request UpdateRules s [Rule]
- urEscalationRules :: Iso' UpdateRules [TargetId]
- data UpdateRule
- updateRule :: EscalationPolicyId -> EscalationRuleId -> Request UpdateRule s Rule
- urEscalationDelayInMinutes :: Lens' UpdateRule (Maybe Int)
- urTargets :: Lens' UpdateRule [TargetId]
- deleteRule :: EscalationPolicyId -> EscalationRuleId -> Request Empty s Empty
- class HasUserInfo a where
- data Target
- _TSchedule :: Prism' Target ScheduleTarget
- _TUser :: Prism' Target UserInfo
- data ScheduleTarget
- stId :: Lens' ScheduleTarget ScheduleId
- stName :: Lens' ScheduleTarget Text
- data Rule
- rId :: Lens' Rule EscalationRuleId
- rEscalationDelayInMinutes :: Lens' Rule Int
- rTargets :: Lens' Rule [Target]
List Rules
listRules :: EscalationPolicyId -> Request Empty s [Rule] Source
List all the escalation rules for an existing escalation policy.
GET /escalation_policies/:escalation_policy_id/escalation_rules
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/list
Create Rule
data CreateRule Source
:: EscalationPolicyId | |
-> Int | |
-> [TargetId] | |
-> Request CreateRule s Rule |
Creates a new escalation rule for an escalation policy and appends it to the end of the existing escalation rules.
POST /escalation_policies/:escalation_policy_id/escalation_rules
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/create
crEscalationDelayInMinutes :: Lens' CreateRule Int Source
The escalation timeout in minutes. Must be at least 5 if the rule has multiple targets, and at least 1 if not. If an incident is not acknowledged within this timeout then it will escalate onto the next escalation rule.
crTargets :: Lens' CreateRule [TargetId] Source
The list of the targets an incident should be assigned to upon reaching this rule.
Get Rule
getRule :: EscalationPolicyId -> EscalationRuleId -> Request Empty s Rule Source
Show the escalation rule for an existing escalation policy.
GET /escalation_policies/:escalation_policy_id/escalation_rules/:id
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/show
Update Rules
data UpdateRules Source
:: EscalationPolicyId | |
-> [TargetId] | |
-> Request UpdateRules s [Rule] |
Updates the entire collection of escalation rules for an existing escalation policy. The ordering is determined by the positions of each rule in the list. To create a new rule, add it to the list without an id. To remove a rule, do not include it in the list.
PUT /escalation_policies/:escalation_policy_id/escalation_rules
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/multi_update
urEscalationRules :: Iso' UpdateRules [TargetId] Source
An ordered array of escalation rules.
Update Rule
data UpdateRule Source
updateRule :: EscalationPolicyId -> EscalationRuleId -> Request UpdateRule s Rule Source
Updates an escalation rule.
PUT /escalation_policies/:escalation_policy_id/escalation_rules/:id
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/update
urEscalationDelayInMinutes :: Lens' UpdateRule (Maybe Int) Source
The escalation timeout in minutes. Must be at least 5 if the rule has multiple targets, and at least 1 if not. If an incident is not acknowledged within this timeout then it will escalate onto the next escalation rule.
urTargets :: Lens' UpdateRule [TargetId] Source
The list of the targets an incident should be assigned to upon reaching this rule.
Delete Rule
deleteRule :: EscalationPolicyId -> EscalationRuleId -> Request Empty s Empty Source
Deletes an existing escalation rule that belongs to an escalation policy. There must be a matching rule.
DELETE /escalation_policies/:escalation_policy_id/escalation_rules/:id
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/escalation_rules/delete
Types
class HasUserInfo a where Source
userInfo :: Lens' a UserInfo Source
The id of the user.
The name of the user.
uEmail :: Lens' a Address Source
The user's email address.
The color used to represent the user in schedules.
uTimeZone :: Lens' a TimeZone Source
The user's personal time zone.
HasUserInfo UserInfo Source | |
HasUserInfo User Source | |
HasUserInfo Override Source | |
(QueryLike a, ToJSON a, HasUserInfo a) => HasUserInfo (Request a s b) Source |
data ScheduleTarget Source
stId :: Lens' ScheduleTarget ScheduleId Source
The id of the target.
stName :: Lens' ScheduleTarget Text Source
The name of the target.
rId :: Lens' Rule EscalationRuleId Source
The ID of the escalation rule.
rEscalationDelayInMinutes :: Lens' Rule Int Source
The amount of time before an incident escalates away from this rule.