module Network.AWS.DataPipeline.RemoveTags
(
removeTags
, RemoveTags
, rtPipelineId
, rtTagKeys
, removeTagsResponse
, RemoveTagsResponse
, rtrsStatus
) where
import Network.AWS.DataPipeline.Types
import Network.AWS.DataPipeline.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data RemoveTags = RemoveTags'
{ _rtPipelineId :: !Text
, _rtTagKeys :: ![Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
removeTags
:: Text
-> RemoveTags
removeTags pPipelineId_ =
RemoveTags'
{ _rtPipelineId = pPipelineId_
, _rtTagKeys = mempty
}
rtPipelineId :: Lens' RemoveTags Text
rtPipelineId = lens _rtPipelineId (\ s a -> s{_rtPipelineId = a});
rtTagKeys :: Lens' RemoveTags [Text]
rtTagKeys = lens _rtTagKeys (\ s a -> s{_rtTagKeys = a}) . _Coerce;
instance AWSRequest RemoveTags where
type Sv RemoveTags = DataPipeline
type Rs RemoveTags = RemoveTagsResponse
request = postJSON
response
= receiveEmpty
(\ s h x ->
RemoveTagsResponse' <$> (pure (fromEnum s)))
instance ToHeaders RemoveTags where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DataPipeline.RemoveTags" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON RemoveTags where
toJSON RemoveTags'{..}
= object
["pipelineId" .= _rtPipelineId,
"tagKeys" .= _rtTagKeys]
instance ToPath RemoveTags where
toPath = const "/"
instance ToQuery RemoveTags where
toQuery = const mempty
newtype RemoveTagsResponse = RemoveTagsResponse'
{ _rtrsStatus :: Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
removeTagsResponse
:: Int
-> RemoveTagsResponse
removeTagsResponse pStatus_ =
RemoveTagsResponse'
{ _rtrsStatus = pStatus_
}
rtrsStatus :: Lens' RemoveTagsResponse Int
rtrsStatus = lens _rtrsStatus (\ s a -> s{_rtrsStatus = a});