module Aws.Ses.Commands.VerifyDomainDkim
( VerifyDomainDkim(..)
, VerifyDomainDkimResponse(..)
) where
import Data.Text (Text)
import Data.Text.Encoding as T (encodeUtf8)
import Data.Typeable
import Aws.Core
import Aws.Ses.Core
import Text.XML.Cursor (($//), laxElement, (&/))
data VerifyDomainDkim = VerifyDomainDkim Text
deriving (Eq, Ord, Show, Typeable)
instance SignQuery VerifyDomainDkim where
type ServiceConfiguration VerifyDomainDkim = SesConfiguration
signQuery (VerifyDomainDkim domain) =
sesSignQuery [ ("Action", "VerifyDomainDkim")
, ("Domain", T.encodeUtf8 domain)
]
data VerifyDomainDkimResponse = VerifyDomainDkimResponse [Text]
deriving (Eq, Ord, Show, Typeable)
instance ResponseConsumer VerifyDomainDkim VerifyDomainDkimResponse where
type ResponseMetadata VerifyDomainDkimResponse = SesMetadata
responseConsumer _ _ =
sesResponseConsumer $ \cursor -> do
let tokens = cursor $// laxElement "DkimTokens" &/ elContent "member"
return (VerifyDomainDkimResponse tokens)
instance Transaction VerifyDomainDkim VerifyDomainDkimResponse where
instance AsMemoryResponse VerifyDomainDkimResponse where
type MemoryResponse VerifyDomainDkimResponse = VerifyDomainDkimResponse
loadToMemory = return