pagerduty-0.0.1.1: Client library for PagerDuty Integration and REST APIs.

Safe HaskellNone
LanguageHaskell2010

Network.PagerDuty.REST.MaintenanceWindows

Contents

Description

Maintenance windows allow you to schedule service maintenance periods, during which no incidents will be created.

See: http://developer.pagerduty.com/documentation/rest/maintenance_windows

Synopsis

List Windows

data ListWindows

Instances

ToJSON ListWindows 
HasDatatypeInfo ListWindows 
Generic ListWindows 
QueryLike ListWindows 
type Code ListWindows 

listWindows :: Request ListWindows s ListWindowsResponse

List existing maintenance windows, optionally filtered by service, or whether they are from the past, present or future.

GET /maintenance_windows

See: http://developer.pagerduty.com/documentation/rest/maintenance_windows/list

lwQuery :: Lens' (Request ListWindows s b) (Maybe Text)

Filters the results, showing only the maintenance windows whose descriptions contain the query.

lwServiceIds :: Lens' (Request ListWindows s b) [ServiceId]

An list of service IDs, specifying services whose maintenance windows shall be returned.

lwFilter :: Lens' (Request ListWindows s b) (Maybe Text)

Only return maintenance windows that are of this type. Possible values are past, future, ongoing. If this parameter is omitted, all maintenance windows will be returned.

Create Window

data CreateWindow

Instances

createWindow

Create a new maintenance window for the specified services. No new incidents will be created for a service that is currently in maintenance.

POST /maintenance_windows

See: http://developer.pagerduty.com/documentation/rest/maintenance_windows/create

createWindowBasic

A version of createWindow which uses HTTP Basic authentication and doesn't require a RequesterId.

cwStartTime :: Lens' (Request CreateWindow s b) UTCTime

This maintenance window's start time. This is when the services will stop creating incidents. If this date is in the past, it will be updated to be the current time.

cwEndTime :: Lens' (Request CreateWindow s b) UTCTime

This maintenance window's end time. This is when the services will start creating incidents again. This date must be in the future and after the start_time.

cwDescription :: Lens' (Request CreateWindow s b) (Maybe Text)

A description for this maintenance window.

cwServiceIds :: Lens' (Request CreateWindow s b) [ServiceId]

The ids of the services that are affected by this maintenance window.

Get Window

getWindow :: WindowId -> Request Empty s MaintenanceWindow

Get details about an existing maintenance window.

GET /maintenance_windows/:id

See: http://developer.pagerduty.com/documentation/rest/maintenance_windows/show

Update Window

data UpdateWindow

Instances

uwStartTime :: Lens' (Request UpdateWindow s b) (Maybe Date)

The maintenance window's start time. Can only be updated on future maintenance windows. If the start_time is set to a date in the past, it will be updated to the current date.

uwEndTime :: Lens' (Request UpdateWindow s b) (Maybe Date)

The maintenance window's end time. Can only be updated on ongoing and future maintenance windows, and cannot be set to a value before start_time.

uwDescription :: Lens' (Request UpdateWindow s b) (Maybe Text)

Description for this maintenance window. Can only be updated on ongoing and future maintenance windows.

uwServiceIds :: Lens' (Request UpdateWindow s b) (Maybe [ServiceId])

Services that are affected by this maintenance window. Can only be updated on future maintenance windows.

Delete Window

deleteWindow :: WindowId -> Request Empty s Empty

Cancel or delete an existing maintenance window.

DELETE /maintenance_windows/:id

See: http://developer.pagerduty.com/documentation/rest/maintenance_windows/delete

Types

siName :: Lens' ServiceInfo Text

siUrl :: Lens' ServiceInfo Text

data Counts

Instances

Eq Counts 
Show Counts 
ToJSON Counts 
FromJSON Counts 

cFuture :: Lens' Counts Int

cPast :: Lens' Counts Int

cAll :: Lens' Counts Int