{-# 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.ElasticSearch.RemoveTags
(
removeTags
, RemoveTags
, rtARN
, rtTagKeys
, removeTagsResponse
, RemoveTagsResponse
) where
import Network.AWS.ElasticSearch.Types
import Network.AWS.ElasticSearch.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data RemoveTags = RemoveTags'
{ _rtARN :: !Text
, _rtTagKeys :: ![Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
removeTags
:: Text
-> RemoveTags
removeTags pARN_ =
RemoveTags'
{ _rtARN = pARN_
, _rtTagKeys = mempty
}
rtARN :: Lens' RemoveTags Text
rtARN = lens _rtARN (\ s a -> s{_rtARN = a});
rtTagKeys :: Lens' RemoveTags [Text]
rtTagKeys = lens _rtTagKeys (\ s a -> s{_rtTagKeys = a}) . _Coerce;
instance AWSRequest RemoveTags where
type Rs RemoveTags = RemoveTagsResponse
request = postJSON elasticSearch
response = receiveNull RemoveTagsResponse'
instance Hashable RemoveTags
instance NFData RemoveTags
instance ToHeaders RemoveTags where
toHeaders = const mempty
instance ToJSON RemoveTags where
toJSON RemoveTags'{..}
= object
(catMaybes
[Just ("ARN" .= _rtARN),
Just ("TagKeys" .= _rtTagKeys)])
instance ToPath RemoveTags where
toPath = const "/2015-01-01/tags-removal"
instance ToQuery RemoveTags where
toQuery = const mempty
data RemoveTagsResponse =
RemoveTagsResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
removeTagsResponse
:: RemoveTagsResponse
removeTagsResponse = RemoveTagsResponse'
instance NFData RemoveTagsResponse