{-# 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.ListDistributionsByWebACLId
(
listDistributionsByWebACLId
, ListDistributionsByWebACLId
, ldbwaiMarker
, ldbwaiMaxItems
, ldbwaiWebACLId
, listDistributionsByWebACLIdResponse
, ListDistributionsByWebACLIdResponse
, ldbwairsDistributionList
, ldbwairsResponseStatus
) 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
data ListDistributionsByWebACLId = ListDistributionsByWebACLId'
{ _ldbwaiMarker :: !(Maybe Text)
, _ldbwaiMaxItems :: !(Maybe Text)
, _ldbwaiWebACLId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listDistributionsByWebACLId
:: Text
-> ListDistributionsByWebACLId
listDistributionsByWebACLId pWebACLId_ =
ListDistributionsByWebACLId'
{ _ldbwaiMarker = Nothing
, _ldbwaiMaxItems = Nothing
, _ldbwaiWebACLId = pWebACLId_
}
ldbwaiMarker :: Lens' ListDistributionsByWebACLId (Maybe Text)
ldbwaiMarker = lens _ldbwaiMarker (\ s a -> s{_ldbwaiMarker = a});
ldbwaiMaxItems :: Lens' ListDistributionsByWebACLId (Maybe Text)
ldbwaiMaxItems = lens _ldbwaiMaxItems (\ s a -> s{_ldbwaiMaxItems = a});
ldbwaiWebACLId :: Lens' ListDistributionsByWebACLId Text
ldbwaiWebACLId = lens _ldbwaiWebACLId (\ s a -> s{_ldbwaiWebACLId = a});
instance AWSRequest ListDistributionsByWebACLId where
type Rs ListDistributionsByWebACLId =
ListDistributionsByWebACLIdResponse
request = get cloudFront
response
= receiveXML
(\ s h x ->
ListDistributionsByWebACLIdResponse' <$>
(parseXML x) <*> (pure (fromEnum s)))
instance Hashable ListDistributionsByWebACLId
instance NFData ListDistributionsByWebACLId
instance ToHeaders ListDistributionsByWebACLId where
toHeaders = const mempty
instance ToPath ListDistributionsByWebACLId where
toPath ListDistributionsByWebACLId'{..}
= mconcat
["/2016-09-29/distributionsByWebACLId/",
toBS _ldbwaiWebACLId]
instance ToQuery ListDistributionsByWebACLId where
toQuery ListDistributionsByWebACLId'{..}
= mconcat
["Marker" =: _ldbwaiMarker,
"MaxItems" =: _ldbwaiMaxItems]
data ListDistributionsByWebACLIdResponse = ListDistributionsByWebACLIdResponse'
{ _ldbwairsDistributionList :: !(Maybe DistributionList)
, _ldbwairsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
listDistributionsByWebACLIdResponse
:: Int
-> ListDistributionsByWebACLIdResponse
listDistributionsByWebACLIdResponse pResponseStatus_ =
ListDistributionsByWebACLIdResponse'
{ _ldbwairsDistributionList = Nothing
, _ldbwairsResponseStatus = pResponseStatus_
}
ldbwairsDistributionList :: Lens' ListDistributionsByWebACLIdResponse (Maybe DistributionList)
ldbwairsDistributionList = lens _ldbwairsDistributionList (\ s a -> s{_ldbwairsDistributionList = a});
ldbwairsResponseStatus :: Lens' ListDistributionsByWebACLIdResponse Int
ldbwairsResponseStatus = lens _ldbwairsResponseStatus (\ s a -> s{_ldbwairsResponseStatus = a});
instance NFData ListDistributionsByWebACLIdResponse