wysknd-aws-cf-generator
Advanced tools
Comparing version 2.7.0 to 2.7.2
@@ -20,2 +20,7 @@ 'use strict'; | ||
/** | ||
* Reference to the IOT formation template abstraction. | ||
*/ | ||
IoT: require('./templates/iot'), | ||
/** | ||
* Reference to the cloud formation template abstraction. | ||
@@ -26,2 +31,7 @@ */ | ||
/** | ||
* Reference to the kinesis formation template abstraction. | ||
*/ | ||
Kinesis: require('./templates/kinesis'), | ||
/** | ||
* Reference to a sub library of api gateway specific templates. | ||
@@ -57,2 +67,2 @@ */ | ||
module.exports = index; | ||
module.exports = index; |
@@ -173,2 +173,13 @@ 'use strict'; | ||
/** | ||
* Use AWS IAM authorizer. | ||
* | ||
* @return {Object} A reference to the template. | ||
*/ | ||
useIAMAuthorizer() { | ||
this.properties.AuthorizationType = 'AWS_IAM'; | ||
this.properties.AuthorizerId = undefined; | ||
return this; | ||
} | ||
/** | ||
* Assigns a back end lambda function to the template. | ||
@@ -175,0 +186,0 @@ * |
@@ -47,2 +47,20 @@ 'use strict'; | ||
/** | ||
* Sets the runtime of the lambda functions. | ||
* | ||
* @param {String} name of the lambda runtime. It has to be one of the following: 'python2.7', 'nodejs', 'nodejs4.3', 'nodejs6.10', or 'nodejs4.3-edge'. | ||
* | ||
* @return {Object} A reference to the template. Can be used to | ||
* chain multiple calls. | ||
*/ | ||
setRuntime(runtime) { | ||
const permittedRuntimes = ['python2.7', 'nodejs', 'nodejs4.3', 'nodejs6.10', 'nodejs4.3-edge']; | ||
if (permittedRuntimes.indexOf(runtime) === -1) { | ||
throw new Error('Invalid runtime (arg #1). Runtime must be one of the following: python2.7, nodejs, nodejs4.3, nodejs6.10, or nodejs4.3-edge'); | ||
} | ||
this.properties.Runtime = runtime; | ||
return this; | ||
} | ||
/** | ||
* Sets the memory size allocation for the lambda function. The input must | ||
@@ -49,0 +67,0 @@ * be a multiple of 64 that is > 128 and < 1536, |
{ | ||
"name": "wysknd-aws-cf-generator", | ||
"version": "2.7.0", | ||
"version": "2.7.2", | ||
"description": "Code driven AWS cloudformation template generator", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
152954
46
4064