module Network.AWS.SES.VerifyDomainIdentity
(
verifyDomainIdentity
, VerifyDomainIdentity
, vdiDomain
, verifyDomainIdentityResponse
, VerifyDomainIdentityResponse
, vdirsStatus
, vdirsVerificationToken
) where
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.SES.Types
import Network.AWS.SES.Types.Product
newtype VerifyDomainIdentity = VerifyDomainIdentity'
{ _vdiDomain :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
verifyDomainIdentity
:: Text
-> VerifyDomainIdentity
verifyDomainIdentity pDomain_ =
VerifyDomainIdentity'
{ _vdiDomain = pDomain_
}
vdiDomain :: Lens' VerifyDomainIdentity Text
vdiDomain = lens _vdiDomain (\ s a -> s{_vdiDomain = a});
instance AWSRequest VerifyDomainIdentity where
type Rs VerifyDomainIdentity =
VerifyDomainIdentityResponse
request = postQuery sES
response
= receiveXMLWrapper "VerifyDomainIdentityResult"
(\ s h x ->
VerifyDomainIdentityResponse' <$>
(pure (fromEnum s)) <*> (x .@ "VerificationToken"))
instance ToHeaders VerifyDomainIdentity where
toHeaders = const mempty
instance ToPath VerifyDomainIdentity where
toPath = const "/"
instance ToQuery VerifyDomainIdentity where
toQuery VerifyDomainIdentity'{..}
= mconcat
["Action" =: ("VerifyDomainIdentity" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"Domain" =: _vdiDomain]
data VerifyDomainIdentityResponse = VerifyDomainIdentityResponse'
{ _vdirsStatus :: !Int
, _vdirsVerificationToken :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
verifyDomainIdentityResponse
:: Int
-> Text
-> VerifyDomainIdentityResponse
verifyDomainIdentityResponse pStatus_ pVerificationToken_ =
VerifyDomainIdentityResponse'
{ _vdirsStatus = pStatus_
, _vdirsVerificationToken = pVerificationToken_
}
vdirsStatus :: Lens' VerifyDomainIdentityResponse Int
vdirsStatus = lens _vdirsStatus (\ s a -> s{_vdirsStatus = a});
vdirsVerificationToken :: Lens' VerifyDomainIdentityResponse Text
vdirsVerificationToken = lens _vdirsVerificationToken (\ s a -> s{_vdirsVerificationToken = a});