module Network.AWS.IAM.GetCredentialReport
(
GetCredentialReport
, getCredentialReport
, GetCredentialReportResponse
, getCredentialReportResponse
, gcrrContent
, gcrrGeneratedTime
, gcrrReportFormat
) where
import Network.AWS.Prelude
import Network.AWS.Request.Query
import Network.AWS.IAM.Types
import qualified GHC.Exts
data GetCredentialReport = GetCredentialReport
deriving (Eq, Ord, Read, Show, Generic)
getCredentialReport :: GetCredentialReport
getCredentialReport = GetCredentialReport
data GetCredentialReportResponse = GetCredentialReportResponse
{ _gcrrContent :: Maybe Base64
, _gcrrGeneratedTime :: Maybe ISO8601
, _gcrrReportFormat :: Maybe ReportFormatType
} deriving (Eq, Read, Show)
getCredentialReportResponse :: GetCredentialReportResponse
getCredentialReportResponse = GetCredentialReportResponse
{ _gcrrContent = Nothing
, _gcrrReportFormat = Nothing
, _gcrrGeneratedTime = Nothing
}
gcrrContent :: Lens' GetCredentialReportResponse (Maybe Base64)
gcrrContent = lens _gcrrContent (\s a -> s { _gcrrContent = a })
gcrrGeneratedTime :: Lens' GetCredentialReportResponse (Maybe UTCTime)
gcrrGeneratedTime =
lens _gcrrGeneratedTime (\s a -> s { _gcrrGeneratedTime = a })
. mapping _Time
gcrrReportFormat :: Lens' GetCredentialReportResponse (Maybe ReportFormatType)
gcrrReportFormat = lens _gcrrReportFormat (\s a -> s { _gcrrReportFormat = a })
instance ToPath GetCredentialReport where
toPath = const "/"
instance ToQuery GetCredentialReport where
toQuery = const mempty
instance ToHeaders GetCredentialReport
instance AWSRequest GetCredentialReport where
type Sv GetCredentialReport = IAM
type Rs GetCredentialReport = GetCredentialReportResponse
request = post "GetCredentialReport"
response = xmlResponse
instance FromXML GetCredentialReportResponse where
parseXML = withElement "GetCredentialReportResult" $ \x -> GetCredentialReportResponse
<$> x .@? "Content"
<*> x .@? "GeneratedTime"
<*> x .@? "ReportFormat"