module Network.AWS.CloudHSM.RemoveTagsFromResource
(
removeTagsFromResource
, RemoveTagsFromResource
, rtfrResourceARN
, rtfrTagKeyList
, removeTagsFromResourceResponse
, RemoveTagsFromResourceResponse
, rtfrrsResponseStatus
, rtfrrsStatus
) where
import Network.AWS.CloudHSM.Types
import Network.AWS.CloudHSM.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data RemoveTagsFromResource = RemoveTagsFromResource'
{ _rtfrResourceARN :: !Text
, _rtfrTagKeyList :: ![Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
removeTagsFromResource
:: Text
-> RemoveTagsFromResource
removeTagsFromResource pResourceARN_ =
RemoveTagsFromResource'
{ _rtfrResourceARN = pResourceARN_
, _rtfrTagKeyList = mempty
}
rtfrResourceARN :: Lens' RemoveTagsFromResource Text
rtfrResourceARN = lens _rtfrResourceARN (\ s a -> s{_rtfrResourceARN = a});
rtfrTagKeyList :: Lens' RemoveTagsFromResource [Text]
rtfrTagKeyList = lens _rtfrTagKeyList (\ s a -> s{_rtfrTagKeyList = a}) . _Coerce;
instance AWSRequest RemoveTagsFromResource where
type Rs RemoveTagsFromResource =
RemoveTagsFromResourceResponse
request = postJSON cloudHSM
response
= receiveJSON
(\ s h x ->
RemoveTagsFromResourceResponse' <$>
(pure (fromEnum s)) <*> (x .:> "Status"))
instance Hashable RemoveTagsFromResource
instance NFData RemoveTagsFromResource
instance ToHeaders RemoveTagsFromResource where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("CloudHsmFrontendService.RemoveTagsFromResource" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON RemoveTagsFromResource where
toJSON RemoveTagsFromResource'{..}
= object
(catMaybes
[Just ("ResourceArn" .= _rtfrResourceARN),
Just ("TagKeyList" .= _rtfrTagKeyList)])
instance ToPath RemoveTagsFromResource where
toPath = const "/"
instance ToQuery RemoveTagsFromResource where
toQuery = const mempty
data RemoveTagsFromResourceResponse = RemoveTagsFromResourceResponse'
{ _rtfrrsResponseStatus :: !Int
, _rtfrrsStatus :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
removeTagsFromResourceResponse
:: Int
-> Text
-> RemoveTagsFromResourceResponse
removeTagsFromResourceResponse pResponseStatus_ pStatus_ =
RemoveTagsFromResourceResponse'
{ _rtfrrsResponseStatus = pResponseStatus_
, _rtfrrsStatus = pStatus_
}
rtfrrsResponseStatus :: Lens' RemoveTagsFromResourceResponse Int
rtfrrsResponseStatus = lens _rtfrrsResponseStatus (\ s a -> s{_rtfrrsResponseStatus = a});
rtfrrsStatus :: Lens' RemoveTagsFromResourceResponse Text
rtfrrsStatus = lens _rtfrrsStatus (\ s a -> s{_rtfrrsStatus = a});
instance NFData RemoveTagsFromResourceResponse