Safe Haskell | None |
---|---|
Language | Haskell2010 |
Email Filters are a set of rules that are applied to triggering email's body, subject and from address. It only applies to generic_email kind of Services. The way multiple filters are combined depends on the email_filter_mode attribute of the service.
See: http://developer.pagerduty.com/documentation/rest/services/email_filters
- createEmailFilter :: ServiceId -> Request EmailFilterInfo s EmailFilter
- updateEmailFilter :: ServiceId -> EmailFilterId -> Request EmailFilterInfo s Empty
- deleteEmailFilter :: ServiceId -> EmailFilterId -> Request Empty s Empty
- data MatchMode
- class HasEmailFilterInfo a where
- emailFilterInfo :: Lens' a EmailFilterInfo
- efSubjectMode :: Lens' a (Maybe MatchMode)
- efSubjectRegex :: Lens' a (Maybe Text)
- efBodyMode :: Lens' a (Maybe MatchMode)
- efBodyRegex :: Lens' a (Maybe Text)
- efFromEmailMode :: Lens' a (Maybe MatchMode)
- efFromEmailRegex :: Lens' a (Maybe Text)
- data EmailFilterInfo
- data EmailFilter
- efId :: Lens' EmailFilter EmailFilterId
Create Email Filter
createEmailFilter :: ServiceId -> Request EmailFilterInfo s EmailFilter
Create a new Email Filter for the specified service.
POST /services/:service_id/email_filters
See: http://developer.pagerduty.com/documentation/rest/services/email_filters/create
Update Email Filter
updateEmailFilter :: ServiceId -> EmailFilterId -> Request EmailFilterInfo s Empty
Update an existing Email Filter.
PUT /services/:service_id/email_filters/:id
See: http://developer.pagerduty.com/documentation/rest/services/email_filters/update
Delete Email Filter
deleteEmailFilter :: ServiceId -> EmailFilterId -> Request Empty s Empty
Delete an existing Email Filter.
DELETE /services/:service_id/email_filters/:id
See: http://developer.pagerduty.com/documentation/rest/services/email_filters/delete
Types
class HasEmailFilterInfo a where
emailFilterInfo :: Lens' a EmailFilterInfo
efSubjectMode :: Lens' a (Maybe MatchMode)
One of always, match, no-match, which, respectively, means to not filter the email trigger by subject, filter it if the email subject matches the given regex, or filter if it doesn't match the given regex.
Default: always.
efSubjectRegex :: Lens' a (Maybe Text)
The regex to be used when subject_mode is match or no-match. It is a required parameter on such cases.
efBodyMode :: Lens' a (Maybe MatchMode)
One of always, match, no-match, which, respectively, means to not filter the email trigger by body, filter it if the body email matches the given regex, or filter if it doesn't match the given regex.
Default: always.
efBodyRegex :: Lens' a (Maybe Text)
The regex to be used when body_mode is match or no-match. It is a required parameter on such cases.
efFromEmailMode :: Lens' a (Maybe MatchMode)
One of always, match, no-match, which, respectively, means to not filter the email trigger by its from address, filter it if the email from address matches the given regex, or filter if it doesn't match the given regex.
Default: always.
efFromEmailRegex :: Lens' a (Maybe Text)
The regex to be used when from_email_mode is match or no-match. It is a required parameter on such cases.
HasEmailFilterInfo EmailFilterInfo | |
HasEmailFilterInfo EmailFilter | |
(QueryLike a, ToJSON a, HasEmailFilterInfo a) => HasEmailFilterInfo (Request a s b) |
data EmailFilterInfo
Eq EmailFilterInfo | |
Show EmailFilterInfo | |
ToJSON EmailFilterInfo | |
FromJSON EmailFilterInfo | |
QueryLike EmailFilterInfo | |
Default EmailFilterInfo | |
HasEmailFilterInfo EmailFilterInfo |
data EmailFilter
Eq EmailFilter | |
Show EmailFilter | |
ToJSON EmailFilter | |
FromJSON EmailFilter | |
HasEmailFilterInfo EmailFilter |
efId :: Lens' EmailFilter EmailFilterId
The email filter ID.