module Network.AWS.IAM.UpdateLoginProfile
(
updateLoginProfile
, UpdateLoginProfile
, ulpPassword
, ulpPasswordResetRequired
, ulpUserName
, updateLoginProfileResponse
, UpdateLoginProfileResponse
) 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 UpdateLoginProfile = UpdateLoginProfile'
{ _ulpPassword :: !(Maybe (Sensitive Text))
, _ulpPasswordResetRequired :: !(Maybe Bool)
, _ulpUserName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateLoginProfile
:: Text
-> UpdateLoginProfile
updateLoginProfile pUserName_ =
UpdateLoginProfile'
{ _ulpPassword = Nothing
, _ulpPasswordResetRequired = Nothing
, _ulpUserName = pUserName_
}
ulpPassword :: Lens' UpdateLoginProfile (Maybe Text)
ulpPassword = lens _ulpPassword (\ s a -> s{_ulpPassword = a}) . mapping _Sensitive;
ulpPasswordResetRequired :: Lens' UpdateLoginProfile (Maybe Bool)
ulpPasswordResetRequired = lens _ulpPasswordResetRequired (\ s a -> s{_ulpPasswordResetRequired = a});
ulpUserName :: Lens' UpdateLoginProfile Text
ulpUserName = lens _ulpUserName (\ s a -> s{_ulpUserName = a});
instance AWSRequest UpdateLoginProfile where
type Rs UpdateLoginProfile =
UpdateLoginProfileResponse
request = postQuery iam
response = receiveNull UpdateLoginProfileResponse'
instance Hashable UpdateLoginProfile
instance NFData UpdateLoginProfile
instance ToHeaders UpdateLoginProfile where
toHeaders = const mempty
instance ToPath UpdateLoginProfile where
toPath = const "/"
instance ToQuery UpdateLoginProfile where
toQuery UpdateLoginProfile'{..}
= mconcat
["Action" =: ("UpdateLoginProfile" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString),
"Password" =: _ulpPassword,
"PasswordResetRequired" =: _ulpPasswordResetRequired,
"UserName" =: _ulpUserName]
data UpdateLoginProfileResponse =
UpdateLoginProfileResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
updateLoginProfileResponse
:: UpdateLoginProfileResponse
updateLoginProfileResponse = UpdateLoginProfileResponse'
instance NFData UpdateLoginProfileResponse