{-# 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.UntagLogGroup
(
untagLogGroup
, UntagLogGroup
, ulgLogGroupName
, ulgTags
, untagLogGroupResponse
, UntagLogGroupResponse
) 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 UntagLogGroup = UntagLogGroup'
{ _ulgLogGroupName :: !Text
, _ulgTags :: !(List1 Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
untagLogGroup
:: Text
-> NonEmpty Text
-> UntagLogGroup
untagLogGroup pLogGroupName_ pTags_ =
UntagLogGroup' {_ulgLogGroupName = pLogGroupName_, _ulgTags = _List1 # pTags_}
ulgLogGroupName :: Lens' UntagLogGroup Text
ulgLogGroupName = lens _ulgLogGroupName (\ s a -> s{_ulgLogGroupName = a})
ulgTags :: Lens' UntagLogGroup (NonEmpty Text)
ulgTags = lens _ulgTags (\ s a -> s{_ulgTags = a}) . _List1
instance AWSRequest UntagLogGroup where
type Rs UntagLogGroup = UntagLogGroupResponse
request = postJSON cloudWatchLogs
response = receiveNull UntagLogGroupResponse'
instance Hashable UntagLogGroup where
instance NFData UntagLogGroup where
instance ToHeaders UntagLogGroup where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Logs_20140328.UntagLogGroup" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON UntagLogGroup where
toJSON UntagLogGroup'{..}
= object
(catMaybes
[Just ("logGroupName" .= _ulgLogGroupName),
Just ("tags" .= _ulgTags)])
instance ToPath UntagLogGroup where
toPath = const "/"
instance ToQuery UntagLogGroup where
toQuery = const mempty
data UntagLogGroupResponse =
UntagLogGroupResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
untagLogGroupResponse
:: UntagLogGroupResponse
untagLogGroupResponse = UntagLogGroupResponse'
instance NFData UntagLogGroupResponse where