module Network.AWS.IAM.GenerateCredentialReport
(
generateCredentialReport
, GenerateCredentialReport
, generateCredentialReportResponse
, GenerateCredentialReportResponse
, gcrrsState
, gcrrsDescription
, gcrrsResponseStatus
) 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 GenerateCredentialReport =
GenerateCredentialReport'
deriving (Eq,Read,Show,Data,Typeable,Generic)
generateCredentialReport
:: GenerateCredentialReport
generateCredentialReport = GenerateCredentialReport'
instance AWSRequest GenerateCredentialReport where
type Rs GenerateCredentialReport =
GenerateCredentialReportResponse
request = postQuery iam
response
= receiveXMLWrapper "GenerateCredentialReportResult"
(\ s h x ->
GenerateCredentialReportResponse' <$>
(x .@? "State") <*> (x .@? "Description") <*>
(pure (fromEnum s)))
instance Hashable GenerateCredentialReport
instance NFData GenerateCredentialReport
instance ToHeaders GenerateCredentialReport where
toHeaders = const mempty
instance ToPath GenerateCredentialReport where
toPath = const "/"
instance ToQuery GenerateCredentialReport where
toQuery
= const
(mconcat
["Action" =:
("GenerateCredentialReport" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString)])
data GenerateCredentialReportResponse = GenerateCredentialReportResponse'
{ _gcrrsState :: !(Maybe ReportStateType)
, _gcrrsDescription :: !(Maybe Text)
, _gcrrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
generateCredentialReportResponse
:: Int
-> GenerateCredentialReportResponse
generateCredentialReportResponse pResponseStatus_ =
GenerateCredentialReportResponse'
{ _gcrrsState = Nothing
, _gcrrsDescription = Nothing
, _gcrrsResponseStatus = pResponseStatus_
}
gcrrsState :: Lens' GenerateCredentialReportResponse (Maybe ReportStateType)
gcrrsState = lens _gcrrsState (\ s a -> s{_gcrrsState = a});
gcrrsDescription :: Lens' GenerateCredentialReportResponse (Maybe Text)
gcrrsDescription = lens _gcrrsDescription (\ s a -> s{_gcrrsDescription = a});
gcrrsResponseStatus :: Lens' GenerateCredentialReportResponse Int
gcrrsResponseStatus = lens _gcrrsResponseStatus (\ s a -> s{_gcrrsResponseStatus = a});
instance NFData GenerateCredentialReportResponse