Safe Haskell | None |
---|---|
Language | Haskell2010 |
This API lets you access and manipulate the services across your account.
A service is an endpoint (like Nagios, email, or an API call) that generates events, which Pagerduty normalizes and dedupes, creating incidents.
When a service is shown inlined in other resources, a deleted service will
have its html_url
attribute set to Nothing
.
See: http://developer.pagerduty.com/documentation/rest/services
- data ListServices
- listServices :: Request ListServices s [Service]
- lsTimeZone :: Lens' (Request ListServices s r) (Maybe TimeZone)
- data CreateService
- createService :: Text -> EscalationPolicyId -> ServiceType -> Request CreateService s Service
- csName :: Lens' (Request CreateService s r) Text
- csDescription :: Lens' (Request CreateService s r) (Maybe Text)
- csType :: Lens' (Request CreateService s r) ServiceType
- csVendorId :: Lens' (Request CreateService s r) (Maybe VendorId)
- csEscalationPolicyId :: Lens' (Request CreateService s r) EscalationPolicyId
- csAcknowledgementTimeout :: Lens' (Request CreateService s r) (Maybe Int)
- csAutoResolveTimeout :: Lens' (Request CreateService s r) (Maybe Int)
- csSeverityFilter :: Lens' (Request CreateService s r) (Maybe SeverityFilter)
- getService :: ServiceId -> Request Empty s Service
- data UpdateService
- updateService :: ServiceId -> Request UpdateService s Service
- usName :: Lens' (Request UpdateService s r) (Maybe Text)
- usEscalationPolicyId :: Lens' (Request UpdateService s r) (Maybe EscalationPolicyId)
- usDescription :: Lens' (Request UpdateService s r) (Maybe Text)
- usAcknowledgementTimeout :: Lens' (Request UpdateService s r) (Maybe Int)
- usAutoResolveTimeout :: Lens' (Request UpdateService s r) (Maybe Int)
- usSeverityFilter :: Lens' (Request UpdateService s r) (Maybe SeverityFilter)
- deleteService :: ServiceId -> Request Empty s Empty
- enableService :: RequesterId -> ServiceId -> Request Empty s Empty
- disableService :: RequesterId -> ServiceId -> Request Empty s Empty
- regenerateKey :: ServiceId -> Request Empty s Service
- data EmailFilterMode
- data EmailIncidentCreation
- data ServiceStatus
- = Active
- | Warning
- | Critical
- | Maintenance
- | Disabled
- data ServiceType
- data SeverityFilter
- data IncidentCounts
- cntTriggered :: Lens' IncidentCounts Int
- cntAcknowledged :: Lens' IncidentCounts Int
- cntResolved :: Lens' IncidentCounts Int
- cntTotal :: Lens' IncidentCounts Int
- data PolicyInfo
- pinfoId :: Lens' PolicyInfo EscalationPolicyId
- pinfoName :: Lens' PolicyInfo Text
- data Service
- svcId :: Lens' Service ServiceId
- svcName :: Lens' Service Text
- svcDescription :: Lens' Service Text
- svcServiceUrl :: Lens' Service Text
- svcServiceKey :: Lens' Service ServiceKey
- svcAutoResolveTimeout :: Lens' Service (Maybe Int)
- svcAcknowledgementTimeout :: Lens' Service (Maybe Int)
- svcCreatedAt :: Lens' Service UTCTime
- svcStatus :: Lens' Service ServiceStatus
- svcLastIncidentTimestamp :: Lens' Service (Maybe UTCTime)
- svcEmailIncidentCreation :: Lens' Service (Maybe EmailIncidentCreation)
- svcIncidentCounts :: Lens' Service IncidentCounts
- svcEmailFilterMode :: Lens' Service EmailFilterMode
- svcType :: Lens' Service ServiceType
- svcEscalationPolicy :: Lens' Service (Maybe PolicyInfo)
- svcEmailFilters :: Lens' Service (Maybe [EmailFilterInfo])
- svcSeverityFilter :: Lens' Service (Maybe SeverityFilter)
List Services
data ListServices Source #
listServices :: Request ListServices s [Service] Source #
List existing services.
GET /services
See: http://developer.pagerduty.com/documentation/rest/services/list
lsTimeZone :: Lens' (Request ListServices s r) (Maybe TimeZone) Source #
Time zone in which dates in the result will be rendered.
Default: account default time zone.
Create Service
data CreateService Source #
createService :: Text -> EscalationPolicyId -> ServiceType -> Request CreateService s Service Source #
Creates a new service.
POST /services
See: http://developer.pagerduty.com/documentation/rest/services/create
csDescription :: Lens' (Request CreateService s r) (Maybe Text) Source #
A description for your service. 1024 character maximum.
csType :: Lens' (Request CreateService s r) ServiceType Source #
The type of service to create.
csVendorId :: Lens' (Request CreateService s r) (Maybe VendorId) Source #
PagerDuty's internal vendor identifier for this service. For more information about a specific vendor, please contact PagerDuty Support.
csEscalationPolicyId :: Lens' (Request CreateService s r) EscalationPolicyId Source #
The id of the escalation policy to be used by this service.
csAcknowledgementTimeout :: Lens' (Request CreateService s r) (Maybe Int) Source #
The duration in seconds before an incidents acknowledged in this service become triggered again.
Default: 30 minutes.
csAutoResolveTimeout :: Lens' (Request CreateService s r) (Maybe Int) Source #
The duration in seconds before a triggered incident auto-resolves itself.
Default: 4 hours.
csSeverityFilter :: Lens' (Request CreateService s r) (Maybe SeverityFilter) Source #
Specifies what severity levels will create a new open incident.
Get Service
getService :: ServiceId -> Request Empty s Service Source #
Get details about an existing service.
GET services/:id
See: http://developer.pagerduty.com/documentation/rest/services/show
Update Service
data UpdateService Source #
updateService :: ServiceId -> Request UpdateService s Service Source #
Update an existing service.
PUT services/:id
See: http://developer.pagerduty.com/documentation/rest/services/update
usEscalationPolicyId :: Lens' (Request UpdateService s r) (Maybe EscalationPolicyId) Source #
The id of the escalation policy to be used by this service.
usDescription :: Lens' (Request UpdateService s r) (Maybe Text) Source #
A description for your service. 1024 character maximum.
usAcknowledgementTimeout :: Lens' (Request UpdateService s r) (Maybe Int) Source #
The duration in seconds before an incidents acknowledged in this service become triggered again.
Default: 30 minutes.
usAutoResolveTimeout :: Lens' (Request UpdateService s r) (Maybe Int) Source #
The duration in seconds before a triggered incident auto-resolves itself.
Default: 4 hours.
usSeverityFilter :: Lens' (Request UpdateService s r) (Maybe SeverityFilter) Source #
Specifies what severity levels will create a new open incident.
Delete Service
deleteService :: ServiceId -> Request Empty s Empty Source #
Delete an existing service. Once the service is deleted, it will not be accessible from the web UI and new incidents won't be able to be created for this service.
DELETE /services/:id
See: http://developer.pagerduty.com/documentation/rest/services/delete
Enable Service
enableService :: RequesterId -> ServiceId -> Request Empty s Empty Source #
Enable a previously disabled service.
PUT services/:id/enable
See: http://developer.pagerduty.com/documentation/rest/services/enable
Disable Service
disableService :: RequesterId -> ServiceId -> Request Empty s Empty Source #
Disable a service. Once a service is disabled, it will not be able to create incidents until it is enabled again.
PUT services/:id/disable
See: http://developer.pagerduty.com/documentation/rest/services/disable
Regenerate Key
regenerateKey :: ServiceId -> Request Empty s Service Source #
Regenerate a new service key for an existing service.
_Warning! The service's previous key will be invalidated, and existing monitoring integrations will need to be modified to use the new key!_
POST services/:id/regenerate_key
See: http://developer.pagerduty.com/documentation/rest/services/regenerate_key
Types
data EmailFilterMode Source #
AllEmail | Accept all incoming email |
OrRulesEmail | Accept email only if it matches ONE OR MORE rules below |
AndRulesEmail | Accept email only if it matches ALL of the rules below |
data EmailIncidentCreation Source #
OnNewEmail | Open a new incident for each trigger email. |
OnNewEmailSubject | Open a new incident for each new trigger email subject. |
OnlyIfNoOpenIncidents | Open a new incident only if an open incident does not already exist. |
data ServiceStatus Source #
Active | The service is enabled and has no open incidents. |
Warning | The service is enabled and has one or more acknowledged incidents. |
Critical | The service is enabled and has one or more triggered incidents. |
Maintenance | The service is under maintenance, no new incidents will be triggered during maintenance mode. |
Disabled | The service is disabled and will not have any new triggered incidents. |
data ServiceType Source #
data SeverityFilter Source #
SevCritical | Incidents are created when an alarm enters the Critical state. |
SevCriticalOrWarning | Incidents are created when an alarm enters the Critical OR Warning states |
SevOnAny | SQL Monitor: Incidents are created for alerts of any severity. |
SevOnHigh | SQL Monitor: Incidents are created for alerts with high severity. |
SevOnMediumHigh | SQL Monitor: Incidents are created for with high or medium severity |
data IncidentCounts Source #
data PolicyInfo Source #
svcServiceKey :: Lens' Service ServiceKey Source #
For Email services, the serviceKey is the associated email address for the service. For all other service types, this is the unique key used for API calls.
svcAutoResolveTimeout :: Lens' Service (Maybe Int) Source #
Time in seconds that an incident changes to the Triggered State after
being Acknowledged. Value is Nothing
if the feature is disabled.
svcAcknowledgementTimeout :: Lens' Service (Maybe Int) Source #
Time in seconds that an incident is automatically resolved if left open for
that long. Value is Nothing
is the feature is disabled.
svcLastIncidentTimestamp :: Lens' Service (Maybe UTCTime) Source #
The date/time when the most recent incident was created for this service.
svcEmailIncidentCreation :: Lens' Service (Maybe EmailIncidentCreation) Source #
If the service is a Generic Email service, this describes what kind of emails create an incident.
svcIncidentCounts :: Lens' Service IncidentCounts Source #
An object with the number of incidents corresponding to these states.
svcEmailFilterMode :: Lens' Service EmailFilterMode Source #
If the service is a Generic Email service, this describes which types of email will generate an incident.
svcEscalationPolicy :: Lens' Service (Maybe PolicyInfo) Source #
An object containing the ID and name of the escalation policy used by this service.
svcEmailFilters :: Lens' Service (Maybe [EmailFilterInfo]) Source #
An object containing inline Email Filters. Note that only genericEmail services have filters.
svcSeverityFilter :: Lens' Service (Maybe SeverityFilter) Source #
Specifies what severity levels will create a new open incident.