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