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

Safe HaskellNone
LanguageHaskell2010

Network.PagerDuty.REST.EscalationPolicies.EscalationRules

Contents

Description

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

Synopsis

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

createRule Source #

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

updateRules Source #

Arguments

:: EscalationPolicyId 
-> [TargetId]

urEscalationRules

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

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 #

Minimal complete definition

userInfo

Methods

userInfo :: Lens' a UserInfo Source #

uId :: Lens' a UserId Source #

The id of the user.

uName :: Lens' a Text Source #

The name of the user.

uEmail :: Lens' a Address Source #

The user's email address.

uColor :: Lens' a Text Source #

The color used to represent the user in schedules.

uTimeZone :: Lens' a TimeZone Source #

The user's personal time zone.

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.

rTargets :: Lens' Rule [Target] Source #

A list of targets which an incident will be assigned to upon reaching this rule.