{-# 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.APIGateway.DeleteResource
(
deleteResource
, DeleteResource
, drRestAPIId
, drResourceId
, deleteResourceResponse
, DeleteResourceResponse
) where
import Network.AWS.APIGateway.Types
import Network.AWS.APIGateway.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data DeleteResource = DeleteResource'
{ _drRestAPIId :: !Text
, _drResourceId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteResource
:: Text
-> Text
-> DeleteResource
deleteResource pRestAPIId_ pResourceId_ =
DeleteResource'
{ _drRestAPIId = pRestAPIId_
, _drResourceId = pResourceId_
}
drRestAPIId :: Lens' DeleteResource Text
drRestAPIId = lens _drRestAPIId (\ s a -> s{_drRestAPIId = a});
drResourceId :: Lens' DeleteResource Text
drResourceId = lens _drResourceId (\ s a -> s{_drResourceId = a});
instance AWSRequest DeleteResource where
type Rs DeleteResource = DeleteResourceResponse
request = delete apiGateway
response = receiveNull DeleteResourceResponse'
instance Hashable DeleteResource
instance NFData DeleteResource
instance ToHeaders DeleteResource where
toHeaders
= const
(mconcat
["Accept" =# ("application/json" :: ByteString)])
instance ToPath DeleteResource where
toPath DeleteResource'{..}
= mconcat
["/restapis/", toBS _drRestAPIId, "/resources/",
toBS _drResourceId]
instance ToQuery DeleteResource where
toQuery = const mempty
data DeleteResourceResponse =
DeleteResourceResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteResourceResponse
:: DeleteResourceResponse
deleteResourceResponse = DeleteResourceResponse'
instance NFData DeleteResourceResponse