Copyright | (c) Dustin Sallings 2021 |
---|---|
License | BSD3 |
Maintainer | dustin@spy.net |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
PagerDuty Event V1 interface.
Synopsis
- data TriggerEvent a = TriggerEvent {
- _teServiceKey :: Text
- _teIncidentKey :: Maybe Text
- _teDescription :: Text
- _teDetails :: Maybe a
- _teClient :: Text
- _teClientURL :: Text
- _teContexts :: [Context]
- type TriggerEvent' = TriggerEvent ()
- data Context
- data UpdateEvent a = UpdateEvent {}
- type UpdateEvent' = UpdateEvent ()
- data UpdateType
- deliver :: (EventRequest r, MonadCatch m, MonadIO m) => r -> m Response
- data Response
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.
TriggerEvent | |
|
Instances
Eq a => Eq (TriggerEvent a) Source # | |
Defined in Network.API.PagerDuty.EventV1 (==) :: TriggerEvent a -> TriggerEvent a -> Bool # (/=) :: TriggerEvent a -> TriggerEvent a -> Bool # | |
Show a => Show (TriggerEvent a) Source # | |
Defined in Network.API.PagerDuty.EventV1 showsPrec :: Int -> TriggerEvent a -> ShowS # show :: TriggerEvent a -> String # showList :: [TriggerEvent a] -> ShowS # | |
ToJSON a => ToJSON (TriggerEvent a) Source # | |
Defined in Network.API.PagerDuty.EventV1 toJSON :: TriggerEvent a -> Value # toEncoding :: TriggerEvent a -> Encoding # toJSONList :: [TriggerEvent a] -> Value # toEncodingList :: [TriggerEvent a] -> Encoding # |
type TriggerEvent' = TriggerEvent () Source #
A TriggerEvent
type that doesn't have details.
Context that may be added when creating an event.
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. |
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
Eq a => Eq (UpdateEvent a) Source # | |
Defined in Network.API.PagerDuty.EventV1 (==) :: UpdateEvent a -> UpdateEvent a -> Bool # (/=) :: UpdateEvent a -> UpdateEvent a -> Bool # | |
Show a => Show (UpdateEvent a) Source # | |
Defined in Network.API.PagerDuty.EventV1 showsPrec :: Int -> UpdateEvent a -> ShowS # show :: UpdateEvent a -> String # showList :: [UpdateEvent a] -> ShowS # | |
ToJSON a => ToJSON (UpdateEvent a) Source # | |
Defined in Network.API.PagerDuty.EventV1 toJSON :: UpdateEvent a -> Value # toEncoding :: UpdateEvent a -> Encoding # toJSONList :: [UpdateEvent a] -> Value # toEncodingList :: [UpdateEvent a] -> Encoding # |
type UpdateEvent' = UpdateEvent () Source #
A UpdateEvent
type that doesn't have details.
data UpdateType Source #
An event update will either acknowledge or resolve an incident.
Instances
Bounded UpdateType Source # | |
Defined in Network.API.PagerDuty.EventV1 minBound :: UpdateType # maxBound :: UpdateType # | |
Enum UpdateType Source # | |
Defined in Network.API.PagerDuty.EventV1 succ :: UpdateType -> UpdateType # pred :: UpdateType -> UpdateType # toEnum :: Int -> UpdateType # fromEnum :: UpdateType -> Int # enumFrom :: UpdateType -> [UpdateType] # enumFromThen :: UpdateType -> UpdateType -> [UpdateType] # enumFromTo :: UpdateType -> UpdateType -> [UpdateType] # enumFromThenTo :: UpdateType -> UpdateType -> UpdateType -> [UpdateType] # | |
Eq UpdateType Source # | |
Defined in Network.API.PagerDuty.EventV1 (==) :: UpdateType -> UpdateType -> Bool # (/=) :: UpdateType -> UpdateType -> Bool # | |
Show UpdateType Source # | |
Defined in Network.API.PagerDuty.EventV1 showsPrec :: Int -> UpdateType -> ShowS # show :: UpdateType -> String # showList :: [UpdateType] -> ShowS # |
Delivering Events to PagerDuty
deliver :: (EventRequest r, MonadCatch m, MonadIO m) => r -> m Response Source #
Deliver a TriggerEvent
or UpdateEvent
.