pagerduty-hs-0.2.0.0: An interface to the PagerDuty API.
Copyright(c) Dustin Sallings 2021
LicenseBSD3
Maintainerdustin@spy.net
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Network.API.PagerDuty.EventV1

Description

PagerDuty Event V1 interface.

Synopsis

Triggering an Event

data TriggerEvent a Source #

Request object to create an event. Any value that may be serialized to JSON maybe attached as details.

This may be delivered with the deliver function.

Instances

Instances details
Eq a => Eq (TriggerEvent a) Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

Show a => Show (TriggerEvent a) Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

ToJSON a => ToJSON (TriggerEvent a) Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

type TriggerEvent' = TriggerEvent () Source #

A TriggerEvent type that doesn't have details.

data Context Source #

Context that may be added when creating an event.

Constructors

Link Text (Maybe Text)

Link to a URL with an optional link description.

Image Text (Maybe Text) (Maybe Text)

Image URL, optional link ref, and optional alt text.

Instances

Instances details
Eq Context Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

Methods

(==) :: Context -> Context -> Bool #

(/=) :: Context -> Context -> Bool #

Show Context Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

ToJSON Context Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

Updating an Event

data UpdateEvent a Source #

UpdateEvent is the message for both acknowledging and resolving incidents. This may be delivered using the deliver function.

Instances

Instances details
Eq a => Eq (UpdateEvent a) Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

Show a => Show (UpdateEvent a) Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

ToJSON a => ToJSON (UpdateEvent a) Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

type UpdateEvent' = UpdateEvent () Source #

A UpdateEvent type that doesn't have details.

Delivering Events to PagerDuty

deliver :: (EventRequest r, MonadCatch m, MonadIO m) => r -> m Response Source #

data Response Source #

Response to a delivered message.

Constructors

Failure Text Text

Failure status and message

Success Text

Success and incident key for further updates

Instances

Instances details
Eq Response Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

Show Response Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1

FromJSON Response Source # 
Instance details

Defined in Network.API.PagerDuty.EventV1