{-# 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.CloudWatchEvents.RemovePermission
(
removePermission
, RemovePermission
, rpStatementId
, removePermissionResponse
, RemovePermissionResponse
) where
import Network.AWS.CloudWatchEvents.Types
import Network.AWS.CloudWatchEvents.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype RemovePermission = RemovePermission'
{ _rpStatementId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
removePermission
:: Text
-> RemovePermission
removePermission pStatementId_ =
RemovePermission' {_rpStatementId = pStatementId_}
rpStatementId :: Lens' RemovePermission Text
rpStatementId = lens _rpStatementId (\ s a -> s{_rpStatementId = a})
instance AWSRequest RemovePermission where
type Rs RemovePermission = RemovePermissionResponse
request = postJSON cloudWatchEvents
response = receiveNull RemovePermissionResponse'
instance Hashable RemovePermission where
instance NFData RemovePermission where
instance ToHeaders RemovePermission where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSEvents.RemovePermission" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON RemovePermission where
toJSON RemovePermission'{..}
= object
(catMaybes [Just ("StatementId" .= _rpStatementId)])
instance ToPath RemovePermission where
toPath = const "/"
instance ToQuery RemovePermission where
toQuery = const mempty
data RemovePermissionResponse =
RemovePermissionResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
removePermissionResponse
:: RemovePermissionResponse
removePermissionResponse = RemovePermissionResponse'
instance NFData RemovePermissionResponse where