{-# 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.CancelExportTask
(
cancelExportTask
, CancelExportTask
, cetTaskId
, cancelExportTaskResponse
, CancelExportTaskResponse
) 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 CancelExportTask = CancelExportTask'
{ _cetTaskId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cancelExportTask
:: Text
-> CancelExportTask
cancelExportTask pTaskId_ =
CancelExportTask'
{ _cetTaskId = pTaskId_
}
cetTaskId :: Lens' CancelExportTask Text
cetTaskId = lens _cetTaskId (\ s a -> s{_cetTaskId = a});
instance AWSRequest CancelExportTask where
type Rs CancelExportTask = CancelExportTaskResponse
request = postJSON cloudWatchLogs
response = receiveNull CancelExportTaskResponse'
instance Hashable CancelExportTask
instance NFData CancelExportTask
instance ToHeaders CancelExportTask where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Logs_20140328.CancelExportTask" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON CancelExportTask where
toJSON CancelExportTask'{..}
= object (catMaybes [Just ("taskId" .= _cetTaskId)])
instance ToPath CancelExportTask where
toPath = const "/"
instance ToQuery CancelExportTask where
toQuery = const mempty
data CancelExportTaskResponse =
CancelExportTaskResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
cancelExportTaskResponse
:: CancelExportTaskResponse
cancelExportTaskResponse = CancelExportTaskResponse'
instance NFData CancelExportTaskResponse