Skip to content

Commit 3a1841b

Browse files
author
Otto Pecz
committed
Updating jsDoc
1 parent e5b756f commit 3a1841b

File tree

2 files changed

+45
-27
lines changed

2 files changed

+45
-27
lines changed

README.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Modules
22

33
<dl>
4-
<dt><a href="#module_index">index</a></dt>
4+
<dt><a href="#index.module_js">js</a></dt>
55
<dd><p>The plugin can register triggers (events) for a lambda function dynamically. At deployment time</p>
66
<ol>
77
<li>It fetches the value of a parameter in the Parameters. The value must be a list ARNs sepearted by comma.</li>
@@ -20,7 +20,32 @@ while on <em>prod</em> foo lambda function is triggered by</li>
2020
<li>arn:aws:sns:eu-west-2:123456654321:topic2
2121
This way we can switch features on and off on different stages.</li>
2222
</ul>
23-
<p>The dynamic triger sets needs to ne stored in the Parameter Store of the Systems Manager (SSM) and it should look somewhat like this:</p>
23+
<p>The dynamic trigger sets needs to ne stored in the Parameter Store of the Systems Manager (SSM) and it should look somewhat like this:
24+
Name: /dev/dynamic-trigger
25+
Value: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2,arn:aws:sns:eu-west-2:123456654321:topic3
26+
or
27+
Name: /prod/dynamic-trigger
28+
Value: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2</p>
29+
<p>The config parameters:</p>
30+
<ul>
31+
<li>region: the region of the Systems Manager -&gt; Parameter Store</li>
32+
<li>functions:<ul>
33+
<li>name: The name of the function</li>
34+
</ul>
35+
</li>
36+
</ul>
37+
<p>plugins:</p>
38+
<ul>
39+
<li>@kakkuk/serverless-aws-lambda-dynamic-trigger
40+
custom:
41+
dynamicTrigger:
42+
region: &quot;eu-west-2&quot; // !!! Optional !!! It&#39;ll fall back to AWS_DEFAULT_REGION if it&#39;s not set
43+
functions:<ul>
44+
<li>name: &quot;handler&quot;
45+
ssmPath: &quot;{/path/to/triggers}&quot;</li>
46+
</ul>
47+
</li>
48+
</ul>
2449
</dd>
2550
</dl>
2651

@@ -32,9 +57,9 @@ This way we can switch features on and off on different stages.</li>
3257
</dd>
3358
</dl>
3459

35-
<a name="module_index"></a>
60+
<a name="index.module_js"></a>
3661

37-
## index
62+
## js
3863
The plugin can register triggers (events) for a lambda function dynamically. At deployment time
3964
1. It fetches the value of a parameter in the Parameters. The value must be a list ARNs sepearted by comma.
4065
2. Parses the individual ARNs.
@@ -52,23 +77,18 @@ while on *prod* foo lambda function is triggered by
5277
- arn:aws:sns:eu-west-2:123456654321:topic2
5378
This way we can switch features on and off on different stages.
5479

55-
The dynamic triger sets needs to ne stored in the Parameter Store of the Systems Manager (SSM) and it should look somewhat like this:
56-
57-
**Example**
58-
```js
59-
*Name*: /dev/dynamic-trigger
60-
*Value*: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2,arn:aws:sns:eu-west-2:123456654321:topic3
80+
The dynamic trigger sets needs to ne stored in the Parameter Store of the Systems Manager (SSM) and it should look somewhat like this:
81+
Name: /dev/dynamic-trigger
82+
Value: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2,arn:aws:sns:eu-west-2:123456654321:topic3
6183
or
62-
*Name*: /prod/dynamic-trigger
63-
*Value*: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2
84+
Name: /prod/dynamic-trigger
85+
Value: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2
6486

6587
The config parameters:
88+
- region: the region of the Systems Manager -> Parameter Store
6689
- functions:
6790
- name: The name of the function
68-
- ssmPath: Path to ssm which stores the triggers for the function. The value of the parameter should be a list of aws arns.
69-
```
70-
**Example**
71-
```js
91+
7292
plugins:
7393
- @kakkuk/serverless-aws-lambda-dynamic-trigger
7494
custom:
@@ -77,7 +97,7 @@ custom:
7797
functions:
7898
- name: "handler"
7999
ssmPath: "{/path/to/triggers}"
80-
```
100+
81101
<a name="Package @kakkuk/serverless-aws-lambda-dynamic-trigger"></a>
82102

83103
## Package @kakkuk/serverless-aws-lambda-dynamic-trigger

src/index.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
*/
55

66
/**
7-
* @module index
7+
* @module index.js
88
* @description
9-
*
109
* The plugin can register triggers (events) for a lambda function dynamically. At deployment time
1110
* 1. It fetches the value of a parameter in the Parameters. The value must be a list ARNs sepearted by comma.
1211
* 2. Parses the individual ARNs.
@@ -24,19 +23,18 @@
2423
* - arn:aws:sns:eu-west-2:123456654321:topic2
2524
* This way we can switch features on and off on different stages.
2625
*
27-
* The dynamic triger sets needs to ne stored in the Parameter Store of the Systems Manager (SSM) and it should look somewhat like this:
28-
* @example
29-
* *Name*: /dev/dynamic-trigger
30-
* *Value*: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2,arn:aws:sns:eu-west-2:123456654321:topic3
26+
* The dynamic trigger sets needs to ne stored in the Parameter Store of the Systems Manager (SSM) and it should look somewhat like this:
27+
* Name: /dev/dynamic-trigger
28+
* Value: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2,arn:aws:sns:eu-west-2:123456654321:topic3
3129
* or
32-
* *Name*: /prod/dynamic-trigger
33-
* *Value*: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2
30+
* Name: /prod/dynamic-trigger
31+
* Value: arn:aws:sns:eu-west-2:123456654321:topic1,arn:aws:sns:eu-west-2:123456654321:topic2
3432
*
3533
* The config parameters:
34+
* - region: the region of the Systems Manager -> Parameter Store
3635
* - functions:
3736
* - name: The name of the function
38-
* - ssmPath: Path to ssm which stores the triggers for the function. The value of the parameter should be a list of aws arns.
39-
* @example
37+
*
4038
* plugins:
4139
* - @kakkuk/serverless-aws-lambda-dynamic-trigger
4240
* custom:

0 commit comments

Comments
 (0)