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
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
Eq CreatePolicy | |
Show CreatePolicy | |
ToJSON CreatePolicy | |
FromJSON CreatePolicy | |
QueryLike CreatePolicy |
:: 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
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
Eq UpdatePolicy | |
Show UpdatePolicy | |
ToJSON UpdatePolicy | |
FromJSON UpdatePolicy | |
QueryLike UpdatePolicy |
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
pId :: Lens' Policy EscalationPolicyId
The ID of the escalation policy.
The number of times the escalation policy will repeat after reaching the end of its escalation.