{-# 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.WAF.DeletePermissionPolicy
(
deletePermissionPolicy
, DeletePermissionPolicy
, dppResourceARN
, deletePermissionPolicyResponse
, DeletePermissionPolicyResponse
, dpprsResponseStatus
) where
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
import Network.AWS.WAF.Types
import Network.AWS.WAF.Types.Product
newtype DeletePermissionPolicy = DeletePermissionPolicy'
{ _dppResourceARN :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deletePermissionPolicy
:: Text
-> DeletePermissionPolicy
deletePermissionPolicy pResourceARN_ =
DeletePermissionPolicy' {_dppResourceARN = pResourceARN_}
dppResourceARN :: Lens' DeletePermissionPolicy Text
dppResourceARN = lens _dppResourceARN (\ s a -> s{_dppResourceARN = a})
instance AWSRequest DeletePermissionPolicy where
type Rs DeletePermissionPolicy =
DeletePermissionPolicyResponse
request = postJSON waf
response
= receiveEmpty
(\ s h x ->
DeletePermissionPolicyResponse' <$>
(pure (fromEnum s)))
instance Hashable DeletePermissionPolicy where
instance NFData DeletePermissionPolicy where
instance ToHeaders DeletePermissionPolicy where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSWAF_20150824.DeletePermissionPolicy" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeletePermissionPolicy where
toJSON DeletePermissionPolicy'{..}
= object
(catMaybes [Just ("ResourceArn" .= _dppResourceARN)])
instance ToPath DeletePermissionPolicy where
toPath = const "/"
instance ToQuery DeletePermissionPolicy where
toQuery = const mempty
newtype DeletePermissionPolicyResponse = DeletePermissionPolicyResponse'
{ _dpprsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deletePermissionPolicyResponse
:: Int
-> DeletePermissionPolicyResponse
deletePermissionPolicyResponse pResponseStatus_ =
DeletePermissionPolicyResponse' {_dpprsResponseStatus = pResponseStatus_}
dpprsResponseStatus :: Lens' DeletePermissionPolicyResponse Int
dpprsResponseStatus = lens _dpprsResponseStatus (\ s a -> s{_dpprsResponseStatus = a})
instance NFData DeletePermissionPolicyResponse where