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