module Network.AWS.DirectoryService.GetSnapshotLimits
(
getSnapshotLimits
, GetSnapshotLimits
, gslDirectoryId
, getSnapshotLimitsResponse
, GetSnapshotLimitsResponse
, gslrsSnapshotLimits
, gslrsResponseStatus
) where
import Network.AWS.DirectoryService.Types
import Network.AWS.DirectoryService.Types.Product
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype GetSnapshotLimits = GetSnapshotLimits'
{ _gslDirectoryId :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getSnapshotLimits
:: Text
-> GetSnapshotLimits
getSnapshotLimits pDirectoryId_ =
GetSnapshotLimits'
{ _gslDirectoryId = pDirectoryId_
}
gslDirectoryId :: Lens' GetSnapshotLimits Text
gslDirectoryId = lens _gslDirectoryId (\ s a -> s{_gslDirectoryId = a});
instance AWSRequest GetSnapshotLimits where
type Rs GetSnapshotLimits = GetSnapshotLimitsResponse
request = postJSON directoryService
response
= receiveJSON
(\ s h x ->
GetSnapshotLimitsResponse' <$>
(x .?> "SnapshotLimits") <*> (pure (fromEnum s)))
instance ToHeaders GetSnapshotLimits where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("DirectoryService_20150416.GetSnapshotLimits" ::
ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON GetSnapshotLimits where
toJSON GetSnapshotLimits'{..}
= object
(catMaybes [Just ("DirectoryId" .= _gslDirectoryId)])
instance ToPath GetSnapshotLimits where
toPath = const "/"
instance ToQuery GetSnapshotLimits where
toQuery = const mempty
data GetSnapshotLimitsResponse = GetSnapshotLimitsResponse'
{ _gslrsSnapshotLimits :: !(Maybe SnapshotLimits)
, _gslrsResponseStatus :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
getSnapshotLimitsResponse
:: Int
-> GetSnapshotLimitsResponse
getSnapshotLimitsResponse pResponseStatus_ =
GetSnapshotLimitsResponse'
{ _gslrsSnapshotLimits = Nothing
, _gslrsResponseStatus = pResponseStatus_
}
gslrsSnapshotLimits :: Lens' GetSnapshotLimitsResponse (Maybe SnapshotLimits)
gslrsSnapshotLimits = lens _gslrsSnapshotLimits (\ s a -> s{_gslrsSnapshotLimits = a});
gslrsResponseStatus :: Lens' GetSnapshotLimitsResponse Int
gslrsResponseStatus = lens _gslrsResponseStatus (\ s a -> s{_gslrsResponseStatus = a});