module Network.AWS.Inspector.DescribeCrossAccountAccessRole
(
describeCrossAccountAccessRole
, DescribeCrossAccountAccessRole
, describeCrossAccountAccessRoleResponse
, DescribeCrossAccountAccessRoleResponse
, dcaarrsValid
, dcaarrsRoleARN
, dcaarrsResponseStatus
) where
import Network.AWS.Inspector.Types
import Network.AWS.Inspector.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DescribeCrossAccountAccessRole =
DescribeCrossAccountAccessRole'
deriving (Eq,Read,Show,Data,Typeable,Generic)
describeCrossAccountAccessRole
:: DescribeCrossAccountAccessRole
describeCrossAccountAccessRole = DescribeCrossAccountAccessRole'
instance AWSRequest DescribeCrossAccountAccessRole
where
type Rs DescribeCrossAccountAccessRole =
DescribeCrossAccountAccessRoleResponse
request = postJSON inspector
response
= receiveJSON
(\ s h x ->
DescribeCrossAccountAccessRoleResponse' <$>
(x .?> "valid") <*> (x .?> "roleArn") <*>
(pure (fromEnum s)))
instance ToHeaders DescribeCrossAccountAccessRole
where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("InspectorService.DescribeCrossAccountAccessRole" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DescribeCrossAccountAccessRole where
toJSON = const (Object mempty)
instance ToPath DescribeCrossAccountAccessRole where
toPath = const "/"
instance ToQuery DescribeCrossAccountAccessRole where
toQuery = const mempty
data DescribeCrossAccountAccessRoleResponse = DescribeCrossAccountAccessRoleResponse'
{ _dcaarrsValid :: !(Maybe Bool)
, _dcaarrsRoleARN :: !(Maybe Text)
, _dcaarrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
describeCrossAccountAccessRoleResponse
:: Int
-> DescribeCrossAccountAccessRoleResponse
describeCrossAccountAccessRoleResponse pResponseStatus_ =
DescribeCrossAccountAccessRoleResponse'
{ _dcaarrsValid = Nothing
, _dcaarrsRoleARN = Nothing
, _dcaarrsResponseStatus = pResponseStatus_
}
dcaarrsValid :: Lens' DescribeCrossAccountAccessRoleResponse (Maybe Bool)
dcaarrsValid = lens _dcaarrsValid (\ s a -> s{_dcaarrsValid = a});
dcaarrsRoleARN :: Lens' DescribeCrossAccountAccessRoleResponse (Maybe Text)
dcaarrsRoleARN = lens _dcaarrsRoleARN (\ s a -> s{_dcaarrsRoleARN = a});
dcaarrsResponseStatus :: Lens' DescribeCrossAccountAccessRoleResponse Int
dcaarrsResponseStatus = lens _dcaarrsResponseStatus (\ s a -> s{_dcaarrsResponseStatus = a});