module Network.AWS.IAM.GetServiceLinkedRoleDeletionStatus
(
getServiceLinkedRoleDeletionStatus
, GetServiceLinkedRoleDeletionStatus
, gslrdsDeletionTaskId
, getServiceLinkedRoleDeletionStatusResponse
, GetServiceLinkedRoleDeletionStatusResponse
, gslrdsrsReason
, gslrdsrsResponseStatus
, gslrdsrsStatus
) 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
newtype GetServiceLinkedRoleDeletionStatus = GetServiceLinkedRoleDeletionStatus'
{ _gslrdsDeletionTaskId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getServiceLinkedRoleDeletionStatus
:: Text
-> GetServiceLinkedRoleDeletionStatus
getServiceLinkedRoleDeletionStatus pDeletionTaskId_ =
GetServiceLinkedRoleDeletionStatus' {_gslrdsDeletionTaskId = pDeletionTaskId_}
gslrdsDeletionTaskId :: Lens' GetServiceLinkedRoleDeletionStatus Text
gslrdsDeletionTaskId = lens _gslrdsDeletionTaskId (\ s a -> s{_gslrdsDeletionTaskId = a});
instance AWSRequest
GetServiceLinkedRoleDeletionStatus
where
type Rs GetServiceLinkedRoleDeletionStatus =
GetServiceLinkedRoleDeletionStatusResponse
request = postQuery iam
response
= receiveXMLWrapper
"GetServiceLinkedRoleDeletionStatusResult"
(\ s h x ->
GetServiceLinkedRoleDeletionStatusResponse' <$>
(x .@? "Reason") <*> (pure (fromEnum s)) <*>
(x .@ "Status"))
instance Hashable GetServiceLinkedRoleDeletionStatus
where
instance NFData GetServiceLinkedRoleDeletionStatus
where
instance ToHeaders GetServiceLinkedRoleDeletionStatus
where
toHeaders = const mempty
instance ToPath GetServiceLinkedRoleDeletionStatus
where
toPath = const "/"
instance ToQuery GetServiceLinkedRoleDeletionStatus
where
toQuery GetServiceLinkedRoleDeletionStatus'{..}
= mconcat
["Action" =:
("GetServiceLinkedRoleDeletionStatus" :: ByteString),
"Version" =: ("2010-05-08" :: ByteString),
"DeletionTaskId" =: _gslrdsDeletionTaskId]
data GetServiceLinkedRoleDeletionStatusResponse = GetServiceLinkedRoleDeletionStatusResponse'
{ _gslrdsrsReason :: !(Maybe DeletionTaskFailureReasonType)
, _gslrdsrsResponseStatus :: !Int
, _gslrdsrsStatus :: !DeletionTaskStatusType
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getServiceLinkedRoleDeletionStatusResponse
:: Int
-> DeletionTaskStatusType
-> GetServiceLinkedRoleDeletionStatusResponse
getServiceLinkedRoleDeletionStatusResponse pResponseStatus_ pStatus_ =
GetServiceLinkedRoleDeletionStatusResponse'
{ _gslrdsrsReason = Nothing
, _gslrdsrsResponseStatus = pResponseStatus_
, _gslrdsrsStatus = pStatus_
}
gslrdsrsReason :: Lens' GetServiceLinkedRoleDeletionStatusResponse (Maybe DeletionTaskFailureReasonType)
gslrdsrsReason = lens _gslrdsrsReason (\ s a -> s{_gslrdsrsReason = a});
gslrdsrsResponseStatus :: Lens' GetServiceLinkedRoleDeletionStatusResponse Int
gslrdsrsResponseStatus = lens _gslrdsrsResponseStatus (\ s a -> s{_gslrdsrsResponseStatus = a});
gslrdsrsStatus :: Lens' GetServiceLinkedRoleDeletionStatusResponse DeletionTaskStatusType
gslrdsrsStatus = lens _gslrdsrsStatus (\ s a -> s{_gslrdsrsStatus = a});
instance NFData
GetServiceLinkedRoleDeletionStatusResponse
where