amazonka-lambda 0.3.4 → 0.3.5
raw patch · 7 files changed
+107/−35 lines, 7 filesdep ~amazonka-corePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: amazonka-core
API changes (from Hackage documentation)
- Network.AWS.Lambda.Types: Jvm :: Runtime
- Network.AWS.Lambda.Types: Python :: Runtime
- Network.AWS.Lambda.Types: instance Constructor C1_1Runtime
- Network.AWS.Lambda.Types: instance Constructor C1_2Runtime
+ Network.AWS.Lambda.Types: fcS3Bucket :: Lens' FunctionCode (Maybe Text)
+ Network.AWS.Lambda.Types: fcS3Key :: Lens' FunctionCode (Maybe Text)
+ Network.AWS.Lambda.Types: fcS3ObjectVersion :: Lens' FunctionCode (Maybe Text)
+ Network.AWS.Lambda.UpdateFunctionCode: ufc1S3Bucket :: Lens' UpdateFunctionCode (Maybe Text)
+ Network.AWS.Lambda.UpdateFunctionCode: ufc1S3Key :: Lens' UpdateFunctionCode (Maybe Text)
+ Network.AWS.Lambda.UpdateFunctionCode: ufc1S3ObjectVersion :: Lens' UpdateFunctionCode (Maybe Text)
- Network.AWS.Lambda.UpdateFunctionCode: ufc1ZipFile :: Lens' UpdateFunctionCode Base64
+ Network.AWS.Lambda.UpdateFunctionCode: ufc1ZipFile :: Lens' UpdateFunctionCode (Maybe Base64)
- Network.AWS.Lambda.UpdateFunctionCode: updateFunctionCode :: Text -> Base64 -> UpdateFunctionCode
+ Network.AWS.Lambda.UpdateFunctionCode: updateFunctionCode :: Text -> UpdateFunctionCode
Files
- amazonka-lambda.cabal +2/−2
- gen/Network/AWS/Lambda/CreateEventSourceMapping.hs +5/−4
- gen/Network/AWS/Lambda/Invoke.hs +1/−1
- gen/Network/AWS/Lambda/InvokeAsync.hs +11/−1
- gen/Network/AWS/Lambda/ListEventSourceMappings.hs +1/−1
- gen/Network/AWS/Lambda/Types.hs +45/−16
- gen/Network/AWS/Lambda/UpdateFunctionCode.hs +42/−10
amazonka-lambda.cabal view
@@ -1,5 +1,5 @@ name: amazonka-lambda-version: 0.3.4+version: 0.3.5 synopsis: Amazon Lambda SDK. homepage: https://github.com/brendanhay/amazonka license: OtherLicense@@ -65,5 +65,5 @@ other-modules: build-depends:- amazonka-core == 0.3.4.*+ amazonka-core == 0.3.5.* , base >= 4.7 && < 5
gen/Network/AWS/Lambda/CreateEventSourceMapping.hs view
@@ -120,10 +120,11 @@ cesmEnabled :: Lens' CreateEventSourceMapping (Maybe Bool) cesmEnabled = lens _cesmEnabled (\s a -> s { _cesmEnabled = a }) --- | The Amazon Resource Name (ARN) of the Amazon Kinesis stream that is the event--- source. Any record added to this stream could cause AWS Lambda to invoke your--- Lambda function, it depends on the 'BatchSize'. AWS Lambda POSTs the Amazon--- Kinesis event, containing records, to your Lambda function as JSON.+-- | The Amazon Resource Name (ARN) of the Amazon Kinesis or the Amazon DynamoDB+-- stream that is the event source. Any record added to this stream could cause+-- AWS Lambda to invoke your Lambda function, it depends on the 'BatchSize'. AWS+-- Lambda POSTs the Amazon Kinesis event, containing records, to your Lambda+-- function as JSON. cesmEventSourceArn :: Lens' CreateEventSourceMapping Text cesmEventSourceArn = lens _cesmEventSourceArn (\s a -> s { _cesmEventSourceArn = a })
gen/Network/AWS/Lambda/Invoke.hs view
@@ -24,7 +24,7 @@ -- | Invokes a specified Lambda function. ----- This operation requires permission for the 'lambda:Invoke' action.+-- This operation requires permission for the 'lambda:InvokeFunction' action. -- -- <http://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html> module Network.AWS.Lambda.Invoke
gen/Network/AWS/Lambda/InvokeAsync.hs view
@@ -22,7 +22,14 @@ -- -- Derived from AWS service descriptions, licensed under Apache 2.0. --- | <http://docs.aws.amazon.com/lambda/latest/dg/API_InvokeAsync.html>+-- | This API is deprecated. We recommend you use 'Invoke' API (see 'Invoke'). Submits+-- an invocation request to AWS Lambda. Upon receiving the request, Lambda+-- executes the specified function asynchronously. To see the logs generated by+-- the Lambda function execution, see the CloudWatch logs console.+--+-- This operation requires permission for the 'lambda:InvokeFunction' action.+--+-- <http://docs.aws.amazon.com/lambda/latest/dg/API_InvokeAsync.html> module Network.AWS.Lambda.InvokeAsync ( -- * Request@@ -68,9 +75,11 @@ , _iaInvokeArgs = p2 } +-- | The Lambda function name. iaFunctionName :: Lens' InvokeAsync Text iaFunctionName = lens _iaFunctionName (\s a -> s { _iaFunctionName = a }) +-- | JSON that you want to provide to your Lambda function as input. iaInvokeArgs :: Lens' InvokeAsync RqBody iaInvokeArgs = lens _iaInvokeArgs (\s a -> s { _iaInvokeArgs = a }) @@ -90,6 +99,7 @@ { _iarStatus = p1 } +-- | It will be 202 upon success. iarStatus :: Lens' InvokeAsyncResponse Int iarStatus = lens _iarStatus (\s a -> s { _iarStatus = a })
gen/Network/AWS/Lambda/ListEventSourceMappings.hs view
@@ -132,7 +132,7 @@ , _lesmrEventSourceMappings = mempty } --- | An arrary of 'EventSourceMappingConfiguration' objects.+-- | An array of 'EventSourceMappingConfiguration' objects. lesmrEventSourceMappings :: Lens' ListEventSourceMappingsResponse [EventSourceMappingConfiguration] lesmrEventSourceMappings = lens _lesmrEventSourceMappings
gen/Network/AWS/Lambda/Types.hs view
@@ -45,6 +45,9 @@ -- * FunctionCode , FunctionCode , functionCode+ , fcS3Bucket+ , fcS3Key+ , fcS3ObjectVersion , fcZipFile -- * FunctionCodeLocation@@ -126,26 +129,19 @@ | otherwise = False data Runtime- = Jvm -- ^ jvm- | Nodejs -- ^ nodejs- | Python -- ^ python+ = Nodejs -- ^ nodejs deriving (Eq, Ord, Read, Show, Generic, Enum) instance Hashable Runtime instance FromText Runtime where parser = takeLowerText >>= \case- "jvm" -> pure Jvm "nodejs" -> pure Nodejs- "python" -> pure Python e -> fail $ "Failure parsing Runtime from " ++ show e instance ToText Runtime where- toText = \case- Jvm -> "jvm"- Nodejs -> "nodejs"- Python -> "python"+ toText Nodejs = "nodejs" instance ToByteString Runtime instance ToHeader Runtime@@ -247,33 +243,66 @@ instance ToJSON LogType where toJSON = toJSONText -newtype FunctionCode = FunctionCode- { _fcZipFile :: Maybe Base64+data FunctionCode = FunctionCode+ { _fcS3Bucket :: Maybe Text+ , _fcS3Key :: Maybe Text+ , _fcS3ObjectVersion :: Maybe Text+ , _fcZipFile :: Maybe Base64 } deriving (Eq, Read, Show) -- | 'FunctionCode' constructor. -- -- The fields accessible through corresponding lenses are: --+-- * 'fcS3Bucket' @::@ 'Maybe' 'Text'+--+-- * 'fcS3Key' @::@ 'Maybe' 'Text'+--+-- * 'fcS3ObjectVersion' @::@ 'Maybe' 'Text'+-- -- * 'fcZipFile' @::@ 'Maybe' 'Base64' -- functionCode :: FunctionCode functionCode = FunctionCode- { _fcZipFile = Nothing+ { _fcZipFile = Nothing+ , _fcS3Bucket = Nothing+ , _fcS3Key = Nothing+ , _fcS3ObjectVersion = Nothing } --- | A base64-encoded .zip file containing your packaged source code. For more--- information about creating a .zip file, go to <http://http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html Execution Permissions> in the /AWS Lambda Developer Guide/.+-- | Amazon S3 bucket name where the .zip file containing your deployment package+-- is stored. This bucket must reside in the same AWS region where you are+-- creating the Lambda function.+fcS3Bucket :: Lens' FunctionCode (Maybe Text)+fcS3Bucket = lens _fcS3Bucket (\s a -> s { _fcS3Bucket = a })++-- | The Amazon S3 object (the deployment package) key name you want to upload.+fcS3Key :: Lens' FunctionCode (Maybe Text)+fcS3Key = lens _fcS3Key (\s a -> s { _fcS3Key = a })++-- | The Amazon S3 object (the deployment package) version you want to upload.+fcS3ObjectVersion :: Lens' FunctionCode (Maybe Text)+fcS3ObjectVersion =+ lens _fcS3ObjectVersion (\s a -> s { _fcS3ObjectVersion = a })++-- | A base64-encoded .zip file containing your deployment package. For more+-- information about creating a .zip file, go to <http://docs.aws.amazon.com/lambda/latest/dg/intro-permission-model.html#lambda-intro-execution-role.html Execution Permissions> in the /AWS Lambda Developer Guide/. fcZipFile :: Lens' FunctionCode (Maybe Base64) fcZipFile = lens _fcZipFile (\s a -> s { _fcZipFile = a }) instance FromJSON FunctionCode where parseJSON = withObject "FunctionCode" $ \o -> FunctionCode- <$> o .:? "ZipFile"+ <$> o .:? "S3Bucket"+ <*> o .:? "S3Key"+ <*> o .:? "S3ObjectVersion"+ <*> o .:? "ZipFile" instance ToJSON FunctionCode where toJSON FunctionCode{..} = object- [ "ZipFile" .= _fcZipFile+ [ "ZipFile" .= _fcZipFile+ , "S3Bucket" .= _fcS3Bucket+ , "S3Key" .= _fcS3Key+ , "S3ObjectVersion" .= _fcS3ObjectVersion ] data FunctionCodeLocation = FunctionCodeLocation
gen/Network/AWS/Lambda/UpdateFunctionCode.hs view
@@ -26,7 +26,7 @@ -- be used on an existing Lambda function and cannot be used to update the -- function configuration. ----- This operation requires permision for the 'lambda:UpdateFunctionCode' action.+-- This operation requires permission for the 'lambda:UpdateFunctionCode' action. -- -- <http://docs.aws.amazon.com/lambda/latest/dg/API_UpdateFunctionCode.html> module Network.AWS.Lambda.UpdateFunctionCode@@ -37,6 +37,9 @@ , updateFunctionCode -- ** Request lenses , ufc1FunctionName+ , ufc1S3Bucket+ , ufc1S3Key+ , ufc1S3ObjectVersion , ufc1ZipFile -- * Response@@ -63,8 +66,11 @@ import qualified GHC.Exts data UpdateFunctionCode = UpdateFunctionCode- { _ufc1FunctionName :: Text- , _ufc1ZipFile :: Base64+ { _ufc1FunctionName :: Text+ , _ufc1S3Bucket :: Maybe Text+ , _ufc1S3Key :: Maybe Text+ , _ufc1S3ObjectVersion :: Maybe Text+ , _ufc1ZipFile :: Maybe Base64 } deriving (Eq, Read, Show) -- | 'UpdateFunctionCode' constructor.@@ -73,14 +79,22 @@ -- -- * 'ufc1FunctionName' @::@ 'Text' ----- * 'ufc1ZipFile' @::@ 'Base64'+-- * 'ufc1S3Bucket' @::@ 'Maybe' 'Text' --+-- * 'ufc1S3Key' @::@ 'Maybe' 'Text'+--+-- * 'ufc1S3ObjectVersion' @::@ 'Maybe' 'Text'+--+-- * 'ufc1ZipFile' @::@ 'Maybe' 'Base64'+-- updateFunctionCode :: Text -- ^ 'ufc1FunctionName'- -> Base64 -- ^ 'ufc1ZipFile' -> UpdateFunctionCode-updateFunctionCode p1 p2 = UpdateFunctionCode- { _ufc1FunctionName = p1- , _ufc1ZipFile = p2+updateFunctionCode p1 = UpdateFunctionCode+ { _ufc1FunctionName = p1+ , _ufc1ZipFile = Nothing+ , _ufc1S3Bucket = Nothing+ , _ufc1S3Key = Nothing+ , _ufc1S3ObjectVersion = Nothing } -- | The existing Lambda function name whose code you want to replace.@@ -95,8 +109,23 @@ ufc1FunctionName :: Lens' UpdateFunctionCode Text ufc1FunctionName = lens _ufc1FunctionName (\s a -> s { _ufc1FunctionName = a }) +-- | Amazon S3 bucket name where the .zip file containing your deployment package+-- is stored. This bucket must reside in the same AWS region where you are+-- creating the Lambda function.+ufc1S3Bucket :: Lens' UpdateFunctionCode (Maybe Text)+ufc1S3Bucket = lens _ufc1S3Bucket (\s a -> s { _ufc1S3Bucket = a })++-- | The Amazon S3 object (the deployment package) key name you want to upload.+ufc1S3Key :: Lens' UpdateFunctionCode (Maybe Text)+ufc1S3Key = lens _ufc1S3Key (\s a -> s { _ufc1S3Key = a })++-- | The Amazon S3 object (the deployment package) version you want to upload.+ufc1S3ObjectVersion :: Lens' UpdateFunctionCode (Maybe Text)+ufc1S3ObjectVersion =+ lens _ufc1S3ObjectVersion (\s a -> s { _ufc1S3ObjectVersion = a })+ -- | Based64-encoded .zip file containing your packaged source code.-ufc1ZipFile :: Lens' UpdateFunctionCode Base64+ufc1ZipFile :: Lens' UpdateFunctionCode (Maybe Base64) ufc1ZipFile = lens _ufc1ZipFile (\s a -> s { _ufc1ZipFile = a }) data UpdateFunctionCodeResponse = UpdateFunctionCodeResponse@@ -209,7 +238,10 @@ instance ToJSON UpdateFunctionCode where toJSON UpdateFunctionCode{..} = object- [ "ZipFile" .= _ufc1ZipFile+ [ "ZipFile" .= _ufc1ZipFile+ , "S3Bucket" .= _ufc1S3Bucket+ , "S3Key" .= _ufc1S3Key+ , "S3ObjectVersion" .= _ufc1S3ObjectVersion ] instance AWSRequest UpdateFunctionCode where