Safe Haskell | None |
---|---|
Language | Haskell2010 |
This API lets you access and manipulate escalation policies and rules.
See: http://developer.pagerduty.com/documentation/rest/escalation_policies
- data ListPolicies
- listPolicies :: Request ListPolicies s [Policy]
- lpQuery :: Lens' (Request ListPolicies s b) (Maybe Text)
- listOnCallPolicies :: Request ListPolicies s [Policy]
- data CreatePolicy
- createPolicy :: EscalationPolicyId -> Text -> [Rule] -> Request CreatePolicy s Policy
- cpName :: Lens' (Request CreatePolicy s b) Text
- cpRepeatEnabled :: Lens' (Request CreatePolicy s b) Bool
- cpNumLoops :: Lens' (Request CreatePolicy s b) (Maybe Int)
- cpEscalationRules :: Lens' (Request CreatePolicy s b) [Rule]
- getPolicy :: EscalationPolicyId -> Request Empty s Policy
- data UpdatePolicy
- updatePolicy :: EscalationPolicyId -> Request UpdatePolicy s Policy
- upName :: Lens' (Request UpdatePolicy s b) (Maybe Text)
- upRepeatEnabled :: Lens' (Request UpdatePolicy s b) (Maybe Bool)
- upNumLoops :: Lens' (Request UpdatePolicy s b) (Maybe Int)
- upEscalationRules :: Lens' (Request UpdatePolicy s b) [Rule]
- deletePolicy :: EscalationPolicyId -> Request Empty s Empty
- data Policy
- pId :: Lens' Policy EscalationPolicyId
- pName :: Lens' Policy Text
- pNumLoops :: Lens' Policy Int
- pRules :: Lens' Policy [Rule]
- pServices :: Lens' Policy [Service]
List Policies
data ListPolicies Source
Eq ListPolicies Source | |
Show ListPolicies Source | |
ToJSON ListPolicies Source | |
Generic ListPolicies Source | |
HasDatatypeInfo ListPolicies Source | |
QueryLike ListPolicies Source | |
Paginate ListPolicies Source | |
type Code ListPolicies = (:) [*] ((:) * (Maybe Text) ([] *)) ([] [*]) Source |
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
data CreatePolicy Source
:: EscalationPolicyId | |
-> Text |
|
-> [Rule] |
|
-> Request CreatePolicy s Policy |
Creates an existing escalation policy and rules.
POST /escalation_policies
See: http://developer.pagerduty.com/documentation/rest/escalation_policies/create
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
data UpdatePolicy Source
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
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.