{-# 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.Config.DeleteConfigRule
(
deleteConfigRule
, DeleteConfigRule
, dcrConfigRuleName
, deleteConfigRuleResponse
, DeleteConfigRuleResponse
) where
import Network.AWS.Config.Types
import Network.AWS.Config.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype DeleteConfigRule = DeleteConfigRule'
{ _dcrConfigRuleName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteConfigRule
:: Text
-> DeleteConfigRule
deleteConfigRule pConfigRuleName_ =
DeleteConfigRule' {_dcrConfigRuleName = pConfigRuleName_}
dcrConfigRuleName :: Lens' DeleteConfigRule Text
dcrConfigRuleName = lens _dcrConfigRuleName (\ s a -> s{_dcrConfigRuleName = a})
instance AWSRequest DeleteConfigRule where
type Rs DeleteConfigRule = DeleteConfigRuleResponse
request = postJSON config
response = receiveNull DeleteConfigRuleResponse'
instance Hashable DeleteConfigRule where
instance NFData DeleteConfigRule where
instance ToHeaders DeleteConfigRule where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("StarlingDoveService.DeleteConfigRule" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON DeleteConfigRule where
toJSON DeleteConfigRule'{..}
= object
(catMaybes
[Just ("ConfigRuleName" .= _dcrConfigRuleName)])
instance ToPath DeleteConfigRule where
toPath = const "/"
instance ToQuery DeleteConfigRule where
toQuery = const mempty
data DeleteConfigRuleResponse =
DeleteConfigRuleResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
deleteConfigRuleResponse
:: DeleteConfigRuleResponse
deleteConfigRuleResponse = DeleteConfigRuleResponse'
instance NFData DeleteConfigRuleResponse where