{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Network.AWS.CloudFront.ListTagsForResource
(
listTagsForResource
, ListTagsForResource
, ltfrResource
, listTagsForResourceResponse
, ListTagsForResourceResponse
, ltfrrsResponseStatus
, ltfrrsTags
) where
import Network.AWS.CloudFront.Types
import Network.AWS.CloudFront.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype ListTagsForResource = ListTagsForResource'
{ _ltfrResource :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listTagsForResource
:: Text
-> ListTagsForResource
listTagsForResource pResource_ =
ListTagsForResource'
{ _ltfrResource = pResource_
}
ltfrResource :: Lens' ListTagsForResource Text
ltfrResource = lens _ltfrResource (\ s a -> s{_ltfrResource = a});
instance AWSRequest ListTagsForResource where
type Rs ListTagsForResource =
ListTagsForResourceResponse
request = get cloudFront
response
= receiveXML
(\ s h x ->
ListTagsForResourceResponse' <$>
(pure (fromEnum s)) <*> (parseXML x))
instance Hashable ListTagsForResource
instance NFData ListTagsForResource
instance ToHeaders ListTagsForResource where
toHeaders = const mempty
instance ToPath ListTagsForResource where
toPath = const "/2016-09-29/tagging"
instance ToQuery ListTagsForResource where
toQuery ListTagsForResource'{..}
= mconcat ["Resource" =: _ltfrResource]
data ListTagsForResourceResponse = ListTagsForResourceResponse'
{ _ltfrrsResponseStatus :: !Int
, _ltfrrsTags :: !Tags
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listTagsForResourceResponse
:: Int
-> Tags
-> ListTagsForResourceResponse
listTagsForResourceResponse pResponseStatus_ pTags_ =
ListTagsForResourceResponse'
{ _ltfrrsResponseStatus = pResponseStatus_
, _ltfrrsTags = pTags_
}
ltfrrsResponseStatus :: Lens' ListTagsForResourceResponse Int
ltfrrsResponseStatus = lens _ltfrrsResponseStatus (\ s a -> s{_ltfrrsResponseStatus = a});
ltfrrsTags :: Lens' ListTagsForResourceResponse Tags
ltfrrsTags = lens _ltfrrsTags (\ s a -> s{_ltfrrsTags = a});
instance NFData ListTagsForResourceResponse