{-# 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.Lambda.GetEventSourceMapping
(
getEventSourceMapping
, GetEventSourceMapping
, gesmUUId
, eventSourceMappingConfiguration
, EventSourceMappingConfiguration
, esmcEventSourceARN
, esmcState
, esmcFunctionARN
, esmcUUId
, esmcLastProcessingResult
, esmcBatchSize
, esmcStateTransitionReason
, esmcLastModified
) where
import Network.AWS.Lambda.Types
import Network.AWS.Lambda.Types.Product
import Network.AWS.Lens
import Network.AWS.Prelude
import Network.AWS.Request
import Network.AWS.Response
newtype GetEventSourceMapping = GetEventSourceMapping'
{ _gesmUUId :: Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
getEventSourceMapping
:: Text
-> GetEventSourceMapping
getEventSourceMapping pUUId_ = GetEventSourceMapping' {_gesmUUId = pUUId_}
gesmUUId :: Lens' GetEventSourceMapping Text
gesmUUId = lens _gesmUUId (\ s a -> s{_gesmUUId = a})
instance AWSRequest GetEventSourceMapping where
type Rs GetEventSourceMapping =
EventSourceMappingConfiguration
request = get lambda
response = receiveJSON (\ s h x -> eitherParseJSON x)
instance Hashable GetEventSourceMapping where
instance NFData GetEventSourceMapping where
instance ToHeaders GetEventSourceMapping where
toHeaders = const mempty
instance ToPath GetEventSourceMapping where
toPath GetEventSourceMapping'{..}
= mconcat
["/2015-03-31/event-source-mappings/",
toBS _gesmUUId]
instance ToQuery GetEventSourceMapping where
toQuery = const mempty