module Network.AWS.Inspector.RemoveAttributesFromFindings
(
removeAttributesFromFindings
, RemoveAttributesFromFindings
, raffFindingARNs
, raffAttributeKeys
, removeAttributesFromFindingsResponse
, RemoveAttributesFromFindingsResponse
, raffrsMessage
, raffrsResponseStatus
) 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 RemoveAttributesFromFindings = RemoveAttributesFromFindings'
{ _raffFindingARNs :: !(Maybe [Text])
, _raffAttributeKeys :: !(Maybe [Text])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
removeAttributesFromFindings
:: RemoveAttributesFromFindings
removeAttributesFromFindings =
RemoveAttributesFromFindings'
{ _raffFindingARNs = Nothing
, _raffAttributeKeys = Nothing
}
raffFindingARNs :: Lens' RemoveAttributesFromFindings [Text]
raffFindingARNs = lens _raffFindingARNs (\ s a -> s{_raffFindingARNs = a}) . _Default . _Coerce;
raffAttributeKeys :: Lens' RemoveAttributesFromFindings [Text]
raffAttributeKeys = lens _raffAttributeKeys (\ s a -> s{_raffAttributeKeys = a}) . _Default . _Coerce;
instance AWSRequest RemoveAttributesFromFindings
where
type Rs RemoveAttributesFromFindings =
RemoveAttributesFromFindingsResponse
request = postJSON inspector
response
= receiveJSON
(\ s h x ->
RemoveAttributesFromFindingsResponse' <$>
(x .?> "message") <*> (pure (fromEnum s)))
instance ToHeaders RemoveAttributesFromFindings where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("InspectorService.RemoveAttributesFromFindings" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON RemoveAttributesFromFindings where
toJSON RemoveAttributesFromFindings'{..}
= object
(catMaybes
[("findingArns" .=) <$> _raffFindingARNs,
("attributeKeys" .=) <$> _raffAttributeKeys])
instance ToPath RemoveAttributesFromFindings where
toPath = const "/"
instance ToQuery RemoveAttributesFromFindings where
toQuery = const mempty
data RemoveAttributesFromFindingsResponse = RemoveAttributesFromFindingsResponse'
{ _raffrsMessage :: !(Maybe Text)
, _raffrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
removeAttributesFromFindingsResponse
:: Int
-> RemoveAttributesFromFindingsResponse
removeAttributesFromFindingsResponse pResponseStatus_ =
RemoveAttributesFromFindingsResponse'
{ _raffrsMessage = Nothing
, _raffrsResponseStatus = pResponseStatus_
}
raffrsMessage :: Lens' RemoveAttributesFromFindingsResponse (Maybe Text)
raffrsMessage = lens _raffrsMessage (\ s a -> s{_raffrsMessage = a});
raffrsResponseStatus :: Lens' RemoveAttributesFromFindingsResponse Int
raffrsResponseStatus = lens _raffrsResponseStatus (\ s a -> s{_raffrsResponseStatus = a});