module Network.AWS.IAM.GenerateCredentialReport
(
GenerateCredentialReport
, generateCredentialReport
, GenerateCredentialReportResponse
, generateCredentialReportResponse
, gcrrDescription
, gcrrState
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.IAM.Types
import qualified GHC.Exts
data GenerateCredentialReport = GenerateCredentialReport
deriving (Eq, Ord, Show, Generic)
generateCredentialReport :: GenerateCredentialReport
generateCredentialReport = GenerateCredentialReport
data GenerateCredentialReportResponse = GenerateCredentialReportResponse
{ _gcrrDescription :: Maybe Text
, _gcrrState :: Maybe ReportStateType
} deriving (Eq, Show)
generateCredentialReportResponse :: GenerateCredentialReportResponse
generateCredentialReportResponse = GenerateCredentialReportResponse
{ _gcrrState = Nothing
, _gcrrDescription = Nothing
}
gcrrDescription :: Lens' GenerateCredentialReportResponse (Maybe Text)
gcrrDescription = lens _gcrrDescription (\s a -> s { _gcrrDescription = a })
gcrrState :: Lens' GenerateCredentialReportResponse (Maybe ReportStateType)
gcrrState = lens _gcrrState (\s a -> s { _gcrrState = a })
instance ToPath GenerateCredentialReport where
toPath = const "/"
instance ToQuery GenerateCredentialReport where
toQuery = const mempty
instance ToHeaders GenerateCredentialReport
instance AWSRequest GenerateCredentialReport where
type Sv GenerateCredentialReport = IAM
type Rs GenerateCredentialReport = GenerateCredentialReportResponse
request = post "GenerateCredentialReport"
response = xmlResponse
instance FromXML GenerateCredentialReportResponse where
parseXML = withElement "GenerateCredentialReportResult" $ \x -> GenerateCredentialReportResponse
<$> x .@? "Description"
<*> x .@? "State"