module Network.AWS.CloudFront.ListStreamingDistributions
(
listStreamingDistributions
, ListStreamingDistributions
, lsdMaxItems
, lsdMarker
, listStreamingDistributionsResponse
, ListStreamingDistributionsResponse
, lsdrsStatus
, lsdrsStreamingDistributionList
) where
import Network.AWS.CloudFront.Types
import Network.AWS.CloudFront.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data ListStreamingDistributions = ListStreamingDistributions'
{ _lsdMaxItems :: !(Maybe Text)
, _lsdMarker :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listStreamingDistributions
:: ListStreamingDistributions
listStreamingDistributions =
ListStreamingDistributions'
{ _lsdMaxItems = Nothing
, _lsdMarker = Nothing
}
lsdMaxItems :: Lens' ListStreamingDistributions (Maybe Text)
lsdMaxItems = lens _lsdMaxItems (\ s a -> s{_lsdMaxItems = a});
lsdMarker :: Lens' ListStreamingDistributions (Maybe Text)
lsdMarker = lens _lsdMarker (\ s a -> s{_lsdMarker = a});
instance AWSRequest ListStreamingDistributions where
type Rs ListStreamingDistributions =
ListStreamingDistributionsResponse
request = get cloudFront
response
= receiveXML
(\ s h x ->
ListStreamingDistributionsResponse' <$>
(pure (fromEnum s)) <*> (parseXML x))
instance ToHeaders ListStreamingDistributions where
toHeaders = const mempty
instance ToPath ListStreamingDistributions where
toPath = const "/2015-04-17/streaming-distribution"
instance ToQuery ListStreamingDistributions where
toQuery ListStreamingDistributions'{..}
= mconcat
["MaxItems" =: _lsdMaxItems, "Marker" =: _lsdMarker]
data ListStreamingDistributionsResponse = ListStreamingDistributionsResponse'
{ _lsdrsStatus :: !Int
, _lsdrsStreamingDistributionList :: !StreamingDistributionList
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listStreamingDistributionsResponse
:: Int
-> StreamingDistributionList
-> ListStreamingDistributionsResponse
listStreamingDistributionsResponse pStatus_ pStreamingDistributionList_ =
ListStreamingDistributionsResponse'
{ _lsdrsStatus = pStatus_
, _lsdrsStreamingDistributionList = pStreamingDistributionList_
}
lsdrsStatus :: Lens' ListStreamingDistributionsResponse Int
lsdrsStatus = lens _lsdrsStatus (\ s a -> s{_lsdrsStatus = a});
lsdrsStreamingDistributionList :: Lens' ListStreamingDistributionsResponse StreamingDistributionList
lsdrsStreamingDistributionList = lens _lsdrsStreamingDistributionList (\ s a -> s{_lsdrsStreamingDistributionList = a});