module Network.AWS.Kinesis.AddTagsToStream
(
addTagsToStream
, AddTagsToStream
, attsStreamName
, attsTags
, addTagsToStreamResponse
, AddTagsToStreamResponse
) where
import Network.AWS.Kinesis.Types
import Network.AWS.Kinesis.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data AddTagsToStream = AddTagsToStream'
{ _attsStreamName :: !Text
, _attsTags :: !(Map Text Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
addTagsToStream
:: Text
-> AddTagsToStream
addTagsToStream pStreamName_ =
AddTagsToStream'
{ _attsStreamName = pStreamName_
, _attsTags = mempty
}
attsStreamName :: Lens' AddTagsToStream Text
attsStreamName = lens _attsStreamName (\ s a -> s{_attsStreamName = a});
attsTags :: Lens' AddTagsToStream (HashMap Text Text)
attsTags = lens _attsTags (\ s a -> s{_attsTags = a}) . _Map;
instance AWSRequest AddTagsToStream where
type Rs AddTagsToStream = AddTagsToStreamResponse
request = postJSON kinesis
response = receiveNull AddTagsToStreamResponse'
instance ToHeaders AddTagsToStream where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("Kinesis_20131202.AddTagsToStream" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON AddTagsToStream where
toJSON AddTagsToStream'{..}
= object
(catMaybes
[Just ("StreamName" .= _attsStreamName),
Just ("Tags" .= _attsTags)])
instance ToPath AddTagsToStream where
toPath = const "/"
instance ToQuery AddTagsToStream where
toQuery = const mempty
data AddTagsToStreamResponse =
AddTagsToStreamResponse'
deriving (Eq,Read,Show,Data,Typeable,Generic)
addTagsToStreamResponse
:: AddTagsToStreamResponse
addTagsToStreamResponse = AddTagsToStreamResponse'