module Network.AWS.IAM.UpdateSAMLProvider
(
updateSAMLProvider
, UpdateSAMLProvider
, usamlpSAMLMetadataDocument
, usamlpSAMLProviderARN
, updateSAMLProviderResponse
, UpdateSAMLProviderResponse
, usamlprsSAMLProviderARN
, usamlprsResponseStatus
) where
import Network.AWS.IAM.Types
import Network.AWS.IAM.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateSAMLProvider = UpdateSAMLProvider'
{ _usamlpSAMLMetadataDocument :: !Text
, _usamlpSAMLProviderARN :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateSAMLProvider
:: Text
-> Text
-> UpdateSAMLProvider
updateSAMLProvider pSAMLMetadataDocument_ pSAMLProviderARN_ =
UpdateSAMLProvider'
{ _usamlpSAMLMetadataDocument = pSAMLMetadataDocument_
, _usamlpSAMLProviderARN = pSAMLProviderARN_
}
usamlpSAMLMetadataDocument :: Lens' UpdateSAMLProvider Text
usamlpSAMLMetadataDocument = lens _usamlpSAMLMetadataDocument (\ s a -> s{_usamlpSAMLMetadataDocument = a});
usamlpSAMLProviderARN :: Lens' UpdateSAMLProvider Text
usamlpSAMLProviderARN = lens _usamlpSAMLProviderARN (\ s a -> s{_usamlpSAMLProviderARN = a});
instance AWSRequest UpdateSAMLProvider where
type Rs UpdateSAMLProvider =
UpdateSAMLProviderResponse
request = postQuery iAM
response
= receiveXMLWrapper "UpdateSAMLProviderResult"
(\ s h x ->
UpdateSAMLProviderResponse' <$>
(x .@? "SAMLProviderArn") <*> (pure (fromEnum s)))
instance ToHeaders UpdateSAMLProvider where
toHeaders = const mempty
instance ToPath UpdateSAMLProvider where
toPath = const "/"
instance ToQuery UpdateSAMLProvider where
toQuery UpdateSAMLProvider'{..}
= mconcat
["Action" =: ("UpdateSAMLProvider" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString),
"SAMLMetadataDocument" =:
_usamlpSAMLMetadataDocument,
"SAMLProviderArn" =: _usamlpSAMLProviderARN]
data UpdateSAMLProviderResponse = UpdateSAMLProviderResponse'
{ _usamlprsSAMLProviderARN :: !(Maybe Text)
, _usamlprsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
updateSAMLProviderResponse
:: Int
-> UpdateSAMLProviderResponse
updateSAMLProviderResponse pResponseStatus_ =
UpdateSAMLProviderResponse'
{ _usamlprsSAMLProviderARN = Nothing
, _usamlprsResponseStatus = pResponseStatus_
}
usamlprsSAMLProviderARN :: Lens' UpdateSAMLProviderResponse (Maybe Text)
usamlprsSAMLProviderARN = lens _usamlprsSAMLProviderARN (\ s a -> s{_usamlprsSAMLProviderARN = a});
usamlprsResponseStatus :: Lens' UpdateSAMLProviderResponse Int
usamlprsResponseStatus = lens _usamlprsResponseStatus (\ s a -> s{_usamlprsResponseStatus = a});