module Network.AWS.Inspector.StopAssessmentRun
(
stopAssessmentRun
, StopAssessmentRun
, sarAssessmentRunARN
, stopAssessmentRunResponse
, StopAssessmentRunResponse
) where
import Network.AWS.Inspector.Types
import Network.AWS.Inspector.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype StopAssessmentRun = StopAssessmentRun'
{ _sarAssessmentRunARN :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
stopAssessmentRun
:: Text
-> StopAssessmentRun
stopAssessmentRun pAssessmentRunARN_ =
StopAssessmentRun'
{ _sarAssessmentRunARN = pAssessmentRunARN_
}
sarAssessmentRunARN :: Lens' StopAssessmentRun Text
sarAssessmentRunARN = lens _sarAssessmentRunARN (\ s a -> s{_sarAssessmentRunARN = a});
instance AWSRequest StopAssessmentRun where
type Rs StopAssessmentRun = StopAssessmentRunResponse
request = postJSON inspector
response = receiveNull StopAssessmentRunResponse'
instance Hashable StopAssessmentRun
instance NFData StopAssessmentRun
instance ToHeaders StopAssessmentRun where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("InspectorService.StopAssessmentRun" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StopAssessmentRun where
toJSON StopAssessmentRun'{..}
= object
(catMaybes
[Just ("assessmentRunArn" .= _sarAssessmentRunARN)])
instance ToPath StopAssessmentRun where
toPath = const "/"
instance ToQuery StopAssessmentRun where
toQuery = const mempty
data StopAssessmentRunResponse =
StopAssessmentRunResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
stopAssessmentRunResponse
:: StopAssessmentRunResponse
stopAssessmentRunResponse = StopAssessmentRunResponse'
instance NFData StopAssessmentRunResponse