{-# 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.CloudWatchLogs.DeleteDestination
(
deleteDestination
, DeleteDestination
, ddDestinationName
, deleteDestinationResponse
, DeleteDestinationResponse
) where
import Network.AWS.CloudWatchLogs.Types
import Network.AWS.CloudWatchLogs.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteDestination = DeleteDestination'
{ _ddDestinationName :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteDestination
:: Text
-> DeleteDestination
deleteDestination pDestinationName_ =
DeleteDestination'
{ _ddDestinationName = pDestinationName_
}
ddDestinationName :: Lens' DeleteDestination Text
ddDestinationName = lens _ddDestinationName (\ s a -> s{_ddDestinationName = a});
instance AWSRequest DeleteDestination where
type Rs DeleteDestination = DeleteDestinationResponse
request = postJSON cloudWatchLogs
response = receiveNull DeleteDestinationResponse'
instance Hashable DeleteDestination
instance NFData DeleteDestination
instance ToHeaders DeleteDestination where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Logs_20140328.DeleteDestination" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteDestination where
toJSON DeleteDestination'{..}
= object
(catMaybes
[Just ("destinationName" .= _ddDestinationName)])
instance ToPath DeleteDestination where
toPath = const "/"
instance ToQuery DeleteDestination where
toQuery = const mempty
data DeleteDestinationResponse =
DeleteDestinationResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteDestinationResponse
:: DeleteDestinationResponse
deleteDestinationResponse = DeleteDestinationResponse'
instance NFData DeleteDestinationResponse