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.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 Sv DeleteDestination = CloudWatchLogs
type Rs DeleteDestination = DeleteDestinationResponse
request = postJSON
response = receiveNull DeleteDestinationResponse'
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 ["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'