{-# 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.DynamoDB.UntagResource
(
untagResource
, UntagResource
, urResourceARN
, urTagKeys
, untagResourceResponse
, UntagResourceResponse
) where
import Network.AWS.DynamoDB.Types
import Network.AWS.DynamoDB.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UntagResource = UntagResource'
{ _urResourceARN :: !Text
, _urTagKeys :: ![Text]
} deriving (Eq, Read, Show, Data, Typeable, Generic)
untagResource
:: Text
-> UntagResource
untagResource pResourceARN_ =
UntagResource' {_urResourceARN = pResourceARN_, _urTagKeys = mempty}
urResourceARN :: Lens' UntagResource Text
urResourceARN = lens _urResourceARN (\ s a -> s{_urResourceARN = a})
urTagKeys :: Lens' UntagResource [Text]
urTagKeys = lens _urTagKeys (\ s a -> s{_urTagKeys = a}) . _Coerce
instance AWSRequest UntagResource where
type Rs UntagResource = UntagResourceResponse
request = postJSON dynamoDB
response = receiveNull UntagResourceResponse'
instance Hashable UntagResource where
instance NFData UntagResource where
instance ToHeaders UntagResource where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DynamoDB_20120810.UntagResource" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.0" :: ByteString)])
instance ToJSON UntagResource where
toJSON UntagResource'{..}
= object
(catMaybes
[Just ("ResourceArn" .= _urResourceARN),
Just ("TagKeys" .= _urTagKeys)])
instance ToPath UntagResource where
toPath = const "/"
instance ToQuery UntagResource where
toQuery = const mempty
data UntagResourceResponse =
UntagResourceResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
untagResourceResponse
:: UntagResourceResponse
untagResourceResponse = UntagResourceResponse'
instance NFData UntagResourceResponse where