pagerduty-0.0.8: 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

listPolicies :: Request ListPolicies s [Policy] Source #

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

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

List On Call Policies

listOnCallPolicies :: Request ListPolicies s [Policy] Source #

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

createPolicy Source #

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

The name of the escalation policy.

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

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

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

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

The escalation rules for this policy.

Get Policy

getPolicy :: EscalationPolicyId -> Request Empty s Policy Source #

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

updatePolicy :: EscalationPolicyId -> Request UpdatePolicy s Policy Source #

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

The name of the escalation policy.

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

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

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

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

The escalation rules for this policy.

Delete Policy

deletePolicy :: EscalationPolicyId -> Request Empty s Empty Source #

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

pId :: Lens' Policy EscalationPolicyId Source #

The ID of the escalation policy.

pName :: Lens' Policy Text Source #

The name of the escalation policy.

pNumLoops :: Lens' Policy Int Source #

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

pRules :: Lens' Policy [Rule] Source #

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

pServices :: Lens' Policy [Service] Source #

A list of services using this escalation policy.