module Network.AWS.Glue.StartCrawlerSchedule
(
startCrawlerSchedule
, StartCrawlerSchedule
, scsCrawlerName
, startCrawlerScheduleResponse
, StartCrawlerScheduleResponse
, scsrsResponseStatus
) where
import Network.AWS.Glue.Types
import Network.AWS.Glue.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype StartCrawlerSchedule = StartCrawlerSchedule'
{ _scsCrawlerName :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
startCrawlerSchedule
:: Text
-> StartCrawlerSchedule
startCrawlerSchedule pCrawlerName_ =
StartCrawlerSchedule' {_scsCrawlerName = pCrawlerName_}
scsCrawlerName :: Lens' StartCrawlerSchedule Text
scsCrawlerName = lens _scsCrawlerName (\ s a -> s{_scsCrawlerName = a});
instance AWSRequest StartCrawlerSchedule where
type Rs StartCrawlerSchedule =
StartCrawlerScheduleResponse
request = postJSON glue
response
= receiveEmpty
(\ s h x ->
StartCrawlerScheduleResponse' <$>
(pure (fromEnum s)))
instance Hashable StartCrawlerSchedule where
instance NFData StartCrawlerSchedule where
instance ToHeaders StartCrawlerSchedule where
toHeaders
= const
(mconcat
["X-Amz-Target" =#
("AWSGlue.StartCrawlerSchedule" :: ByteString),
"Content-Type" =#
("application/x-amz-json-1.1" :: ByteString)])
instance ToJSON StartCrawlerSchedule where
toJSON StartCrawlerSchedule'{..}
= object
(catMaybes [Just ("CrawlerName" .= _scsCrawlerName)])
instance ToPath StartCrawlerSchedule where
toPath = const "/"
instance ToQuery StartCrawlerSchedule where
toQuery = const mempty
newtype StartCrawlerScheduleResponse = StartCrawlerScheduleResponse'
{ _scsrsResponseStatus :: Int
} deriving (Eq, Read, Show, Data, Typeable, Generic)
startCrawlerScheduleResponse
:: Int
-> StartCrawlerScheduleResponse
startCrawlerScheduleResponse pResponseStatus_ =
StartCrawlerScheduleResponse' {_scsrsResponseStatus = pResponseStatus_}
scsrsResponseStatus :: Lens' StartCrawlerScheduleResponse Int
scsrsResponseStatus = lens _scsrsResponseStatus (\ s a -> s{_scsrsResponseStatus = a});
instance NFData StartCrawlerScheduleResponse where