{-# 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.DeleteLogStream
(
deleteLogStream
, DeleteLogStream
, dlsLogGroupName
, dlsLogStreamName
, deleteLogStreamResponse
, DeleteLogStreamResponse
) 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
data DeleteLogStream = DeleteLogStream'
{ _dlsLogGroupName :: !Text
, _dlsLogStreamName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteLogStream
:: Text
-> Text
-> DeleteLogStream
deleteLogStream pLogGroupName_ pLogStreamName_ =
DeleteLogStream'
{ _dlsLogGroupName = pLogGroupName_
, _dlsLogStreamName = pLogStreamName_
}
dlsLogGroupName :: Lens' DeleteLogStream Text
dlsLogGroupName = lens _dlsLogGroupName (\ s a -> s{_dlsLogGroupName = a});
dlsLogStreamName :: Lens' DeleteLogStream Text
dlsLogStreamName = lens _dlsLogStreamName (\ s a -> s{_dlsLogStreamName = a});
instance AWSRequest DeleteLogStream where
type Rs DeleteLogStream = DeleteLogStreamResponse
request = postJSON cloudWatchLogs
response = receiveNull DeleteLogStreamResponse'
instance Hashable DeleteLogStream
instance NFData DeleteLogStream
instance ToHeaders DeleteLogStream where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Logs_20140328.DeleteLogStream" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteLogStream where
toJSON DeleteLogStream'{..}
= object
(catMaybes
[Just ("logGroupName" .= _dlsLogGroupName),
Just ("logStreamName" .= _dlsLogStreamName)])
instance ToPath DeleteLogStream where
toPath = const "/"
instance ToQuery DeleteLogStream where
toQuery = const mempty
data DeleteLogStreamResponse =
DeleteLogStreamResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
deleteLogStreamResponse
:: DeleteLogStreamResponse
deleteLogStreamResponse = DeleteLogStreamResponse'
instance NFData DeleteLogStreamResponse