Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data LambdaConfiguration = LambdaConfiguration {}
- lcRegion :: Lens' LambdaConfiguration Region
- lcAccessKeyId :: Lens' LambdaConfiguration ByteString
- lcSecretAccessKey :: Lens' LambdaConfiguration ByteString
- data LambdaQuery body = LambdaQuery {}
- lambdaQuery :: Monoid body => StdMethod -> [Text] -> LambdaQuery body
- lambdaQuery' :: StdMethod -> [Text] -> body -> LambdaQuery body
- lqMethod :: forall body. Lens' (LambdaQuery body) StdMethod
- lqPath :: forall body. Lens' (LambdaQuery body) [Text]
- lqParams :: forall body. Lens' (LambdaQuery body) (Map Text Text)
- lqBody :: forall body body. Lens (LambdaQuery body) (LambdaQuery body) body body
- class (LambdaPayload body, FromJSON resp) => LambdaTransaction req body resp | req -> resp body, resp -> req where
- buildQuery :: req -> LambdaQuery body
- runLambda :: (MonadThrow m, MonadCatch m, MonadIO m) => LambdaConfiguration -> req -> m resp
- class LambdaPayload body where
- packagePayload :: body -> Σ (Postable ⊗ Putable)
- class (LambdaTransaction req body resp, Monoid acc) => PagedLambdaTransaction req body resp cur acc | req -> resp cur acc where
- requestCursor :: Setter' req (Maybe cur)
- responseCursor :: Getter resp (Maybe cur)
- responseAccum :: Getter resp acc
- pagedRunLambda :: (MonadThrow m, MonadCatch m, MonadIO m, Functor m) => LambdaConfiguration -> req -> m acc
- data InvalidHttpMethodException
- _InvalidHttpMethodException :: Iso' InvalidHttpMethodException StdMethod
- data InvalidRegionException
- _InvalidRegionException :: Iso' InvalidRegionException Region
- pattern InvalidParameterValueException ByteString :: HttpException
- pattern ResourceNotFoundException ByteString :: HttpException
- pattern ServiceException ByteString :: HttpException
Client configuration
Lenses
Client query
data LambdaQuery body Source
Eq body => Eq (LambdaQuery body) | |
Show body => Show (LambdaQuery body) |
lambdaQuery :: Monoid body => StdMethod -> [Text] -> LambdaQuery body Source
A convenience constructor for a basic query.
lambdaQuery' :: StdMethod -> [Text] -> body -> LambdaQuery body Source
A variant of lambdaQuery
that requires a body.
Lenses
lqMethod :: forall body. Lens' (LambdaQuery body) StdMethod Source
lqPath :: forall body. Lens' (LambdaQuery body) [Text] Source
lqBody :: forall body body. Lens (LambdaQuery body) (LambdaQuery body) body body Source
Transaction machinery
class (LambdaPayload body, FromJSON resp) => LambdaTransaction req body resp | req -> resp body, resp -> req where Source
A class for associating a request type with a response type.
buildQuery :: req -> LambdaQuery body Source
Construct a LambdaQuery
object from the request data.
runLambda :: (MonadThrow m, MonadCatch m, MonadIO m) => LambdaConfiguration -> req -> m resp Source
Send the request to AWS Lambda.
class LambdaPayload body where Source
class (LambdaTransaction req body resp, Monoid acc) => PagedLambdaTransaction req body resp cur acc | req -> resp cur acc where Source
requestCursor :: Setter' req (Maybe cur) Source
To set the cursor in subsequent requests.
responseCursor :: Getter resp (Maybe cur) Source
To get the cursor in respones.
responseAccum :: Getter resp acc Source
To get the accumulating portion of the response data.
pagedRunLambda :: (MonadThrow m, MonadCatch m, MonadIO m, Functor m) => LambdaConfiguration -> req -> m acc Source
Exhaustively iterates a request to AWS lambda and returns the accumulated results.
Exceptions
Exception Patterns
pattern ResourceNotFoundException ByteString :: HttpException Source
pattern ServiceException ByteString :: HttpException Source