module Network.AWS.CloudDirectory.UntagResource
(
untagResource
, UntagResource
, urResourceARN
, urTagKeys
, untagResourceResponse
, UntagResourceResponse
, urrsResponseStatus
) where
import Network.AWS.CloudDirectory.Types
import Network.AWS.CloudDirectory.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 = putJSON cloudDirectory
response
= receiveEmpty
(\ s h x ->
UntagResourceResponse' <$> (pure (fromEnum s)))
instance Hashable UntagResource where
instance NFData UntagResource where
instance ToHeaders UntagResource where
toHeaders = const mempty
instance ToJSON UntagResource where
toJSON UntagResource'{..}
= object
(catMaybes
[Just ("ResourceArn" .= _urResourceARN),
Just ("TagKeys" .= _urTagKeys)])
instance ToPath UntagResource where
toPath
= const
"/amazonclouddirectory/2017-01-11/tags/remove"
instance ToQuery UntagResource where
toQuery = const mempty
newtype UntagResourceResponse = UntagResourceResponse'
{ _urrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
untagResourceResponse
:: Int
-> UntagResourceResponse
untagResourceResponse pResponseStatus_ =
UntagResourceResponse' {_urrsResponseStatus = pResponseStatus_}
urrsResponseStatus :: Lens' UntagResourceResponse Int
urrsResponseStatus = lens _urrsResponseStatus (\ s a -> s{_urrsResponseStatus = a});
instance NFData UntagResourceResponse where