{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.WAFRegional.DisassociateWebACL
(
disassociateWebACL
, DisassociateWebACL
, dwaResourceARN
, disassociateWebACLResponse
, DisassociateWebACLResponse
, dwaclrsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.WAFRegional.Types
import Network.AWS.WAFRegional.Types.Product
newtype DisassociateWebACL = DisassociateWebACL'
{ _dwaResourceARN :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateWebACL
:: Text
-> DisassociateWebACL
disassociateWebACL pResourceARN_ =
DisassociateWebACL' {_dwaResourceARN = pResourceARN_}
dwaResourceARN :: Lens' DisassociateWebACL Text
dwaResourceARN = lens _dwaResourceARN (\ s a -> s{_dwaResourceARN = a})
instance AWSRequest DisassociateWebACL where
type Rs DisassociateWebACL =
DisassociateWebACLResponse
request = postJSON wAFRegional
response
= receiveEmpty
(\ s h x ->
DisassociateWebACLResponse' <$> (pure (fromEnum s)))
instance Hashable DisassociateWebACL where
instance NFData DisassociateWebACL where
instance ToHeaders DisassociateWebACL where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSWAF_Regional_20161128.DisassociateWebACL" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DisassociateWebACL where
toJSON DisassociateWebACL'{..}
= object
(catMaybes [Just ("ResourceArn" .= _dwaResourceARN)])
instance ToPath DisassociateWebACL where
toPath = const "/"
instance ToQuery DisassociateWebACL where
toQuery = const mempty
newtype DisassociateWebACLResponse = DisassociateWebACLResponse'
{ _dwaclrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
disassociateWebACLResponse
:: Int
-> DisassociateWebACLResponse
disassociateWebACLResponse pResponseStatus_ =
DisassociateWebACLResponse' {_dwaclrsResponseStatus = pResponseStatus_}
dwaclrsResponseStatus :: Lens' DisassociateWebACLResponse Int
dwaclrsResponseStatus = lens _dwaclrsResponseStatus (\ s a -> s{_dwaclrsResponseStatus = a})
instance NFData DisassociateWebACLResponse where