{-# 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.ListPublicKeys
(
listPublicKeys
, ListPublicKeys
, lpkMarker
, lpkMaxItems
, listPublicKeysResponse
, ListPublicKeysResponse
, lpkrsPublicKeyList
, lpkrsResponseStatus
) 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 ListPublicKeys = ListPublicKeys'
{ _lpkMarker :: !(Maybe Text)
, _lpkMaxItems :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listPublicKeys
:: ListPublicKeys
listPublicKeys = ListPublicKeys' {_lpkMarker = Nothing, _lpkMaxItems = Nothing}
lpkMarker :: Lens' ListPublicKeys (Maybe Text)
lpkMarker = lens _lpkMarker (\ s a -> s{_lpkMarker = a})
lpkMaxItems :: Lens' ListPublicKeys (Maybe Text)
lpkMaxItems = lens _lpkMaxItems (\ s a -> s{_lpkMaxItems = a})
instance AWSRequest ListPublicKeys where
type Rs ListPublicKeys = ListPublicKeysResponse
request = get cloudFront
response
= receiveXML
(\ s h x ->
ListPublicKeysResponse' <$>
(parseXML x) <*> (pure (fromEnum s)))
instance Hashable ListPublicKeys where
instance NFData ListPublicKeys where
instance ToHeaders ListPublicKeys where
toHeaders = const mempty
instance ToPath ListPublicKeys where
toPath = const "/2017-10-30/public-key"
instance ToQuery ListPublicKeys where
toQuery ListPublicKeys'{..}
= mconcat
["Marker" =: _lpkMarker, "MaxItems" =: _lpkMaxItems]
data ListPublicKeysResponse = ListPublicKeysResponse'
{ _lpkrsPublicKeyList :: !(Maybe PublicKeyList)
, _lpkrsResponseStatus :: !Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listPublicKeysResponse
:: Int
-> ListPublicKeysResponse
listPublicKeysResponse pResponseStatus_ =
ListPublicKeysResponse'
{_lpkrsPublicKeyList = Nothing, _lpkrsResponseStatus = pResponseStatus_}
lpkrsPublicKeyList :: Lens' ListPublicKeysResponse (Maybe PublicKeyList)
lpkrsPublicKeyList = lens _lpkrsPublicKeyList (\ s a -> s{_lpkrsPublicKeyList = a})
lpkrsResponseStatus :: Lens' ListPublicKeysResponse Int
lpkrsResponseStatus = lens _lpkrsResponseStatus (\ s a -> s{_lpkrsResponseStatus = a})
instance NFData ListPublicKeysResponse where