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]
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
Eq CreateRule | |
Show CreateRule | |
ToJSON CreateRule | |
FromJSON CreateRule | |
QueryLike CreateRule |
:: 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
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]
The list of the targets an incident should be assigned to upon reaching this rule.
Get Rule
getRule :: EscalationPolicyId -> EscalationRuleId -> Request Empty s Rule
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
Eq UpdateRules | |
Show UpdateRules | |
ToJSON UpdateRules | |
FromJSON UpdateRules | |
QueryLike UpdateRules |
:: 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]
An ordered array of escalation rules.
Update Rule
data UpdateRule
Eq UpdateRule | |
Show UpdateRule | |
ToJSON UpdateRule | |
FromJSON UpdateRule | |
QueryLike UpdateRule |
updateRule :: EscalationPolicyId -> EscalationRuleId -> Request UpdateRule s Rule
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)
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]
The list of the targets an incident should be assigned to upon reaching this rule.
Delete Rule
deleteRule :: EscalationPolicyId -> EscalationRuleId -> Request Empty s Empty
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
The id of the user.
uName :: Lens' a Text
The name of the user.
The user's email address.
uColor :: Lens' a Text
The color used to represent the user in schedules.
uTimeZone :: Lens' a TimeZone
The user's personal time zone.
HasUserInfo UserInfo | |
HasUserInfo User | |
HasUserInfo Override | |
(QueryLike a, ToJSON a, HasUserInfo a) => HasUserInfo (Request a s b) |
data Target
_TSchedule :: Prism' Target ScheduleTarget
data ScheduleTarget
Eq ScheduleTarget | |
Show ScheduleTarget | |
ToJSON ScheduleTarget | |
FromJSON ScheduleTarget |
stId :: Lens' ScheduleTarget ScheduleId
The id of the target.
stName :: Lens' ScheduleTarget Text
The name of the target.
rId :: Lens' Rule EscalationRuleId
The ID of the escalation rule.
rEscalationDelayInMinutes :: Lens' Rule Int
The amount of time before an incident escalates away from this rule.