{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.OpsWorks.UpdateMyUserProfile
(
updateMyUserProfile
, UpdateMyUserProfile
, umupSSHPublicKey
, updateMyUserProfileResponse
, UpdateMyUserProfileResponse
) where
import Network.AWS.Lens
import Network.AWS.OpsWorks.Types
import Network.AWS.OpsWorks.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype UpdateMyUserProfile = UpdateMyUserProfile'
{ _umupSSHPublicKey :: Maybe Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateMyUserProfile
:: UpdateMyUserProfile
updateMyUserProfile =
UpdateMyUserProfile'
{ _umupSSHPublicKey = Nothing
}
umupSSHPublicKey :: Lens' UpdateMyUserProfile (Maybe Text)
umupSSHPublicKey = lens _umupSSHPublicKey (\ s a -> s{_umupSSHPublicKey = a});
instance AWSRequest UpdateMyUserProfile where
type Rs UpdateMyUserProfile =
UpdateMyUserProfileResponse
request = postJSON opsWorks
response = receiveNull UpdateMyUserProfileResponse'
instance Hashable UpdateMyUserProfile
instance NFData UpdateMyUserProfile
instance ToHeaders UpdateMyUserProfile where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("OpsWorks_20130218.UpdateMyUserProfile" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UpdateMyUserProfile where
toJSON UpdateMyUserProfile'{..}
= object
(catMaybes
[("SshPublicKey" .=) <$> _umupSSHPublicKey])
instance ToPath UpdateMyUserProfile where
toPath = const "/"
instance ToQuery UpdateMyUserProfile where
toQuery = const mempty
data UpdateMyUserProfileResponse =
UpdateMyUserProfileResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
updateMyUserProfileResponse
:: UpdateMyUserProfileResponse
updateMyUserProfileResponse = UpdateMyUserProfileResponse'
instance NFData UpdateMyUserProfileResponse