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

Safe HaskellNone
LanguageHaskell2010

Network.PagerDuty.REST.EscalationPolicies

Contents

Description

This API lets you access and manipulate escalation policies and rules.

See: http://developer.pagerduty.com/documentation/rest/escalation_policies

Synopsis

List Policies

data ListPolicies

Instances

Eq ListPolicies 
Show ListPolicies 
ToJSON ListPolicies 
HasDatatypeInfo ListPolicies 
Generic ListPolicies 
QueryLike ListPolicies 
Paginate ListPolicies 
type Code ListPolicies = (:) [*] ((:) * (Maybe Text) ([] *)) ([] [*]) 

listPolicies :: Request ListPolicies s [Policy]

List all the existing escalation policies.

GET /escalation_policies

See: http://developer.pagerduty.com/documentation/rest/escalation_policies/list

lpQuery :: Lens' (Request ListPolicies s b) (Maybe Text)

Filters the result, showing only the escalation policies whose names match the query.

List On Call Policies

listOnCallPolicies :: Request ListPolicies s [Policy]

List all the existing escalation policies with currently on-call users.

If the start and end of an on-call object are null, then the user is always on-call for an escalation policy level.

GET /escalation_policies/on_call

See: http://developer.pagerduty.com/documentation/rest/escalation_policies/on_call

Create Policy

data CreatePolicy

Instances

createPolicy

Arguments

:: EscalationPolicyId 
-> Text

creName

-> [Rule]

creEscalationRules

-> Request CreatePolicy s Policy 

Creates an existing escalation policy and rules.

POST /escalation_policies

See: http://developer.pagerduty.com/documentation/rest/escalation_policies/create

cpName :: Lens' (Request CreatePolicy s b) Text

The name of the escalation policy.

cpRepeatEnabled :: Lens' (Request CreatePolicy s b) Bool

Whether or not to allow this policy to repeat its escalation rules after the last rule is finished.

Default: false.

cpNumLoops :: Lens' (Request CreatePolicy s b) (Maybe Int)

The number of times to loop over the set of rules in this escalation policy.

cpEscalationRules :: Lens' (Request CreatePolicy s b) [Rule]

The escalation rules for this policy.

Get Policy

getPolicy :: EscalationPolicyId -> Request Empty s Policy

Get information about an existing escalation policy and its rules.

GET /escalation_policies/:id

See: http://developer.pagerduty.com/documentation/rest/escalation_policies/show

Update Policy

data UpdatePolicy

Instances

updatePolicy :: EscalationPolicyId -> Request UpdatePolicy s Policy

Updates an existing escalation policy and rules.

PUT /escalation_policies/:id

See: http://developer.pagerduty.com/documentation/rest/escalation_policies/update

upName :: Lens' (Request UpdatePolicy s b) (Maybe Text)

The name of the escalation policy.

upRepeatEnabled :: Lens' (Request UpdatePolicy s b) (Maybe Bool)

Whether or not to allow this policy to repeat its escalation rules after the last rule is finished.

upNumLoops :: Lens' (Request UpdatePolicy s b) (Maybe Int)

The number of times to loop over the set of rules in this escalation policy.

upEscalationRules :: Lens' (Request UpdatePolicy s b) [Rule]

The escalation rules for this policy.

Delete Policy

deletePolicy :: EscalationPolicyId -> Request Empty s Empty

Deletes an existing escalation policy and rules. The escalation policy must not be in use by any services.

DELETE /escalation_policies/:id

See: http://developer.pagerduty.com/documentation/rest/escalation_policies/delete

Types

data Policy

Instances

Eq Policy 
Show Policy 
ToJSON Policy 
FromJSON Policy 

pId :: Lens' Policy EscalationPolicyId

The ID of the escalation policy.

pName :: Lens' Policy Text

The name of the escalation policy.

pNumLoops :: Lens' Policy Int

The number of times the escalation policy will repeat after reaching the end of its escalation.

pRules :: Lens' Policy [Rule]

A list of the policy's escalation rules in order of escalation.

pServices :: Lens' Policy [Service]

A list of services using this escalation policy.