module Network.AWS.ElasticBeanstalk.UpdateTagsForResource
(
updateTagsForResource
, UpdateTagsForResource
, utfrTagsToRemove
, utfrTagsToAdd
, utfrResourceARN
, updateTagsForResourceResponse
, UpdateTagsForResourceResponse
) where
import Network.AWS.ElasticBeanstalk.Types
import Network.AWS.ElasticBeanstalk.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data UpdateTagsForResource = UpdateTagsForResource'
{ _utfrTagsToRemove :: !(Maybe [Text])
, _utfrTagsToAdd :: !(Maybe [Tag])
, _utfrResourceARN :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
updateTagsForResource
:: Text
-> UpdateTagsForResource
updateTagsForResource pResourceARN_ =
UpdateTagsForResource'
{ _utfrTagsToRemove = Nothing
, _utfrTagsToAdd = Nothing
, _utfrResourceARN = pResourceARN_
}
utfrTagsToRemove :: Lens' UpdateTagsForResource [Text]
utfrTagsToRemove = lens _utfrTagsToRemove (\ s a -> s{_utfrTagsToRemove = a}) . _Default . _Coerce;
utfrTagsToAdd :: Lens' UpdateTagsForResource [Tag]
utfrTagsToAdd = lens _utfrTagsToAdd (\ s a -> s{_utfrTagsToAdd = a}) . _Default . _Coerce;
utfrResourceARN :: Lens' UpdateTagsForResource Text
utfrResourceARN = lens _utfrResourceARN (\ s a -> s{_utfrResourceARN = a});
instance AWSRequest UpdateTagsForResource where
type Rs UpdateTagsForResource =
UpdateTagsForResourceResponse
request = postQuery elasticBeanstalk
response = receiveNull UpdateTagsForResourceResponse'
instance Hashable UpdateTagsForResource where
instance NFData UpdateTagsForResource where
instance ToHeaders UpdateTagsForResource where
toHeaders = const mempty
instance ToPath UpdateTagsForResource where
toPath = const "/"
instance ToQuery UpdateTagsForResource where
toQuery UpdateTagsForResource'{..}
= mconcat
["Action" =: ("UpdateTagsForResource" :: ByteString),
"Version" =: ("2010-12-01" :: ByteString),
"TagsToRemove" =:
toQuery (toQueryList "member" <$> _utfrTagsToRemove),
"TagsToAdd" =:
toQuery (toQueryList "member" <$> _utfrTagsToAdd),
"ResourceArn" =: _utfrResourceARN]
data UpdateTagsForResourceResponse =
UpdateTagsForResourceResponse'
deriving (Eq, Read, Show, Data, Typeable, Generic)
updateTagsForResourceResponse
:: UpdateTagsForResourceResponse
updateTagsForResourceResponse = UpdateTagsForResourceResponse'
instance NFData UpdateTagsForResourceResponse where