{-# 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.IAM.UpdateSSHPublicKey
(
updateSSHPublicKey
, UpdateSSHPublicKey
, uspkUserName
, uspkSSHPublicKeyId
, uspkStatus
, updateSSHPublicKeyResponse
, UpdateSSHPublicKeyResponse
) 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 UpdateSSHPublicKey = UpdateSSHPublicKey'
{ _uspkUserName :: !Text
, _uspkSSHPublicKeyId :: !Text
, _uspkStatus :: !StatusType
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateSSHPublicKey
:: Text
-> Text
-> StatusType
-> UpdateSSHPublicKey
updateSSHPublicKey pUserName_ pSSHPublicKeyId_ pStatus_ =
UpdateSSHPublicKey'
{ _uspkUserName = pUserName_
, _uspkSSHPublicKeyId = pSSHPublicKeyId_
, _uspkStatus = pStatus_
}
uspkUserName :: Lens' UpdateSSHPublicKey Text
uspkUserName = lens _uspkUserName (\ s a -> s{_uspkUserName = a});
uspkSSHPublicKeyId :: Lens' UpdateSSHPublicKey Text
uspkSSHPublicKeyId = lens _uspkSSHPublicKeyId (\ s a -> s{_uspkSSHPublicKeyId = a});
uspkStatus :: Lens' UpdateSSHPublicKey StatusType
uspkStatus = lens _uspkStatus (\ s a -> s{_uspkStatus = a});
instance AWSRequest UpdateSSHPublicKey where
type Rs UpdateSSHPublicKey =
UpdateSSHPublicKeyResponse
request = postQuery iam
response = receiveNull UpdateSSHPublicKeyResponse'
instance Hashable UpdateSSHPublicKey
instance NFData UpdateSSHPublicKey
instance ToHeaders UpdateSSHPublicKey where
toHeaders = const mempty
instance ToPath UpdateSSHPublicKey where
toPath = const "/"
instance ToQuery UpdateSSHPublicKey where
toQuery UpdateSSHPublicKey'{..}
= mconcat
["Action" =: ("UpdateSSHPublicKey" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString),
"UserName" =: _uspkUserName,
"SSHPublicKeyId" =: _uspkSSHPublicKeyId,
"Status" =: _uspkStatus]
data UpdateSSHPublicKeyResponse =
UpdateSSHPublicKeyResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
updateSSHPublicKeyResponse
:: UpdateSSHPublicKeyResponse
updateSSHPublicKeyResponse = UpdateSSHPublicKeyResponse'
instance NFData UpdateSSHPublicKeyResponse