module Network.AWS.DirectoryService.GetDirectoryLimits
(
getDirectoryLimits
, GetDirectoryLimits
, getDirectoryLimitsResponse
, GetDirectoryLimitsResponse
, gdlrsDirectoryLimits
, gdlrsResponseStatus
) where
import Network.AWS.DirectoryService.Types
import Network.AWS.DirectoryService.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
data GetDirectoryLimits =
GetDirectoryLimits'
deriving (Eq,Read,Show,Data,Typeable,Generic)
getDirectoryLimits
:: GetDirectoryLimits
getDirectoryLimits = GetDirectoryLimits'
instance AWSRequest GetDirectoryLimits where
type Rs GetDirectoryLimits =
GetDirectoryLimitsResponse
request = postJSON directoryService
response
= receiveJSON
(\ s h x ->
GetDirectoryLimitsResponse' <$>
(x .?> "DirectoryLimits") <*> (pure (fromEnum s)))
instance ToHeaders GetDirectoryLimits where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DirectoryService_20150416.GetDirectoryLimits" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetDirectoryLimits where
toJSON = const (Object mempty)
instance ToPath GetDirectoryLimits where
toPath = const "/"
instance ToQuery GetDirectoryLimits where
toQuery = const mempty
data GetDirectoryLimitsResponse = GetDirectoryLimitsResponse'
{ _gdlrsDirectoryLimits :: !(Maybe DirectoryLimits)
, _gdlrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getDirectoryLimitsResponse
:: Int
-> GetDirectoryLimitsResponse
getDirectoryLimitsResponse pResponseStatus_ =
GetDirectoryLimitsResponse'
{ _gdlrsDirectoryLimits = Nothing
, _gdlrsResponseStatus = pResponseStatus_
}
gdlrsDirectoryLimits :: Lens' GetDirectoryLimitsResponse (Maybe DirectoryLimits)
gdlrsDirectoryLimits = lens _gdlrsDirectoryLimits (\ s a -> s{_gdlrsDirectoryLimits = a});
gdlrsResponseStatus :: Lens' GetDirectoryLimitsResponse Int
gdlrsResponseStatus = lens _gdlrsResponseStatus (\ s a -> s{_gdlrsResponseStatus = a});