module Network.AWS.IAM.EnableMFADevice
(
EnableMFADevice
, enableMFADevice
, emfadAuthenticationCode1
, emfadAuthenticationCode2
, emfadSerialNumber
, emfadUserName
, EnableMFADeviceResponse
, enableMFADeviceResponse
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.IAM.Types
import qualified GHC.Exts
data EnableMFADevice = EnableMFADevice
{ _emfadAuthenticationCode1 :: Text
, _emfadAuthenticationCode2 :: Text
, _emfadSerialNumber :: Text
, _emfadUserName :: Text
} deriving (Eq, Ord, Show)
enableMFADevice :: Text
-> Text
-> Text
-> Text
-> EnableMFADevice
enableMFADevice p1 p2 p3 p4 = EnableMFADevice
{ _emfadUserName = p1
, _emfadSerialNumber = p2
, _emfadAuthenticationCode1 = p3
, _emfadAuthenticationCode2 = p4
}
emfadAuthenticationCode1 :: Lens' EnableMFADevice Text
emfadAuthenticationCode1 =
lens _emfadAuthenticationCode1
(\s a -> s { _emfadAuthenticationCode1 = a })
emfadAuthenticationCode2 :: Lens' EnableMFADevice Text
emfadAuthenticationCode2 =
lens _emfadAuthenticationCode2
(\s a -> s { _emfadAuthenticationCode2 = a })
emfadSerialNumber :: Lens' EnableMFADevice Text
emfadSerialNumber =
lens _emfadSerialNumber (\s a -> s { _emfadSerialNumber = a })
emfadUserName :: Lens' EnableMFADevice Text
emfadUserName = lens _emfadUserName (\s a -> s { _emfadUserName = a })
data EnableMFADeviceResponse = EnableMFADeviceResponse
deriving (Eq, Ord, Show, Generic)
enableMFADeviceResponse :: EnableMFADeviceResponse
enableMFADeviceResponse = EnableMFADeviceResponse
instance ToPath EnableMFADevice where
toPath = const "/"
instance ToQuery EnableMFADevice where
toQuery EnableMFADevice{..} = mconcat
[ "AuthenticationCode1" =? _emfadAuthenticationCode1
, "AuthenticationCode2" =? _emfadAuthenticationCode2
, "SerialNumber" =? _emfadSerialNumber
, "UserName" =? _emfadUserName
]
instance ToHeaders EnableMFADevice
instance AWSRequest EnableMFADevice where
type Sv EnableMFADevice = IAM
type Rs EnableMFADevice = EnableMFADeviceResponse
request = post "EnableMFADevice"
response = nullResponse EnableMFADeviceResponse