module Network.AWS.IAM.EnableMFADevice
(
enableMFADevice
, EnableMFADevice
, emdUserName
, emdSerialNumber
, emdAuthenticationCode1
, emdAuthenticationCode2
, enableMFADeviceResponse
, EnableMFADeviceResponse
) where
import Network.AWS.IAM.Types
import Network.AWS.IAM.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data EnableMFADevice = EnableMFADevice'
{ _emdUserName :: !Text
, _emdSerialNumber :: !Text
, _emdAuthenticationCode1 :: !Text
, _emdAuthenticationCode2 :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
enableMFADevice
:: Text
-> Text
-> Text
-> Text
-> EnableMFADevice
enableMFADevice pUserName_ pSerialNumber_ pAuthenticationCode1_ pAuthenticationCode2_ =
EnableMFADevice'
{ _emdUserName = pUserName_
, _emdSerialNumber = pSerialNumber_
, _emdAuthenticationCode1 = pAuthenticationCode1_
, _emdAuthenticationCode2 = pAuthenticationCode2_
}
emdUserName :: Lens' EnableMFADevice Text
emdUserName = lens _emdUserName (\ s a -> s{_emdUserName = a});
emdSerialNumber :: Lens' EnableMFADevice Text
emdSerialNumber = lens _emdSerialNumber (\ s a -> s{_emdSerialNumber = a});
emdAuthenticationCode1 :: Lens' EnableMFADevice Text
emdAuthenticationCode1 = lens _emdAuthenticationCode1 (\ s a -> s{_emdAuthenticationCode1 = a});
emdAuthenticationCode2 :: Lens' EnableMFADevice Text
emdAuthenticationCode2 = lens _emdAuthenticationCode2 (\ s a -> s{_emdAuthenticationCode2 = a});
instance AWSRequest EnableMFADevice where
type Rs EnableMFADevice = EnableMFADeviceResponse
request = postQuery iam
response = receiveNull EnableMFADeviceResponse'
instance Hashable EnableMFADevice
instance NFData EnableMFADevice
instance ToHeaders EnableMFADevice where
toHeaders = const mempty
instance ToPath EnableMFADevice where
toPath = const "/"
instance ToQuery EnableMFADevice where
toQuery EnableMFADevice'{..}
= mconcat
["Action" =: ("EnableMFADevice" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString),
"UserName" =: _emdUserName,
"SerialNumber" =: _emdSerialNumber,
"AuthenticationCode1" =: _emdAuthenticationCode1,
"AuthenticationCode2" =: _emdAuthenticationCode2]
data EnableMFADeviceResponse =
EnableMFADeviceResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
enableMFADeviceResponse
:: EnableMFADeviceResponse
enableMFADeviceResponse = EnableMFADeviceResponse'
instance NFData EnableMFADeviceResponse