@aws-cdk/aws-iotevents-actions-alpha 2.16.0-alpha.0 → 2.17.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +101 -4
- package/.jsii.tabl.json +126 -3
- package/.warnings.jsii.js +3 -1
- package/README.md +29 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -1
- package/lib/lambda-invoke-action.js +1 -1
- package/lib/set-variable-action.d.ts +15 -0
- package/lib/set-variable-action.js +32 -0
- package/package.json +8 -8
package/.jsii
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@aws-cdk/aws-iotevents-alpha": "2.
|
|
12
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"@aws-cdk/aws-iotevents-alpha": "2.17.0-alpha.0",
|
|
12
|
+
"aws-cdk-lib": "^2.17.0",
|
|
13
13
|
"constructs": "^10.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencyClosure": {
|
|
@@ -2075,6 +2075,19 @@
|
|
|
2075
2075
|
}
|
|
2076
2076
|
}
|
|
2077
2077
|
},
|
|
2078
|
+
"aws-cdk-lib.aws_personalize": {
|
|
2079
|
+
"targets": {
|
|
2080
|
+
"dotnet": {
|
|
2081
|
+
"namespace": "Amazon.CDK.AWS.Personalize"
|
|
2082
|
+
},
|
|
2083
|
+
"java": {
|
|
2084
|
+
"package": "software.amazon.awscdk.services.personalize"
|
|
2085
|
+
},
|
|
2086
|
+
"python": {
|
|
2087
|
+
"module": "aws_cdk.aws_personalize"
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
},
|
|
2078
2091
|
"aws-cdk-lib.aws_pinpoint": {
|
|
2079
2092
|
"targets": {
|
|
2080
2093
|
"dotnet": {
|
|
@@ -2984,7 +2997,7 @@
|
|
|
2984
2997
|
},
|
|
2985
2998
|
"name": "@aws-cdk/aws-iotevents-actions-alpha",
|
|
2986
2999
|
"readme": {
|
|
2987
|
-
"markdown": "# Actions for AWS::IoTEvents Detector Model\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nThis library contains integration classes to specify actions of state events of Detector Model in `@aws-cdk/aws-iotevents`.\nInstances of these classes should be passed to `State` defined in `@aws-cdk/aws-iotevents`\nYou can define built-in actions to use a timer or set a variable, or send data to other AWS resources.\n\nThis library contains integration classes to use a timer or set a variable, or send data to other AWS resources.\nAWS IoT Events can trigger actions when it detects a specified event or transition event.\n\nCurrently supported are:\n\n- Invoke a Lambda function\n\n## Invoke a Lambda function\n\nThe code snippet below creates an Action that invoke a Lambda function\nwhen it is triggered.\n\n```ts\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const input: iotevents.IInput;\ndeclare const func: lambda.IFunction;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\n```\n"
|
|
3000
|
+
"markdown": "# Actions for AWS::IoTEvents Detector Model\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nThis library contains integration classes to specify actions of state events of Detector Model in `@aws-cdk/aws-iotevents`.\nInstances of these classes should be passed to `State` defined in `@aws-cdk/aws-iotevents`\nYou can define built-in actions to use a timer or set a variable, or send data to other AWS resources.\n\nThis library contains integration classes to use a timer or set a variable, or send data to other AWS resources.\nAWS IoT Events can trigger actions when it detects a specified event or transition event.\n\nCurrently supported are:\n\n- Set variable to detector instanse\n- Invoke a Lambda function\n\n## Set variable to detector instanse\n\nThe code snippet below creates an Action that set variable to detector instanse\nwhen it is triggered.\n\n```ts\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});\n```\n\n## Invoke a Lambda function\n\nThe code snippet below creates an Action that invoke a Lambda function\nwhen it is triggered.\n\n```ts\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const input: iotevents.IInput;\ndeclare const func: lambda.IFunction;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\n```\n"
|
|
2988
3001
|
},
|
|
2989
3002
|
"repository": {
|
|
2990
3003
|
"directory": "packages/individual-packages/aws-iotevents-actions",
|
|
@@ -3096,8 +3109,92 @@
|
|
|
3096
3109
|
],
|
|
3097
3110
|
"name": "LambdaInvokeAction",
|
|
3098
3111
|
"symbolId": "lib/lambda-invoke-action:LambdaInvokeAction"
|
|
3112
|
+
},
|
|
3113
|
+
"@aws-cdk/aws-iotevents-actions-alpha.SetVariableAction": {
|
|
3114
|
+
"assembly": "@aws-cdk/aws-iotevents-actions-alpha",
|
|
3115
|
+
"docs": {
|
|
3116
|
+
"custom": {
|
|
3117
|
+
"exampleMetadata": "infused"
|
|
3118
|
+
},
|
|
3119
|
+
"example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});",
|
|
3120
|
+
"stability": "experimental",
|
|
3121
|
+
"summary": "The action to create a variable with a specified value."
|
|
3122
|
+
},
|
|
3123
|
+
"fqn": "@aws-cdk/aws-iotevents-actions-alpha.SetVariableAction",
|
|
3124
|
+
"initializer": {
|
|
3125
|
+
"docs": {
|
|
3126
|
+
"stability": "experimental"
|
|
3127
|
+
},
|
|
3128
|
+
"locationInModule": {
|
|
3129
|
+
"filename": "lib/set-variable-action.ts",
|
|
3130
|
+
"line": 12
|
|
3131
|
+
},
|
|
3132
|
+
"parameters": [
|
|
3133
|
+
{
|
|
3134
|
+
"docs": {
|
|
3135
|
+
"summary": "the name of the variable."
|
|
3136
|
+
},
|
|
3137
|
+
"name": "variableName",
|
|
3138
|
+
"type": {
|
|
3139
|
+
"primitive": "string"
|
|
3140
|
+
}
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
"docs": {
|
|
3144
|
+
"summary": "the new value of the variable."
|
|
3145
|
+
},
|
|
3146
|
+
"name": "value",
|
|
3147
|
+
"type": {
|
|
3148
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
]
|
|
3152
|
+
},
|
|
3153
|
+
"interfaces": [
|
|
3154
|
+
"@aws-cdk/aws-iotevents-alpha.IAction"
|
|
3155
|
+
],
|
|
3156
|
+
"kind": "class",
|
|
3157
|
+
"locationInModule": {
|
|
3158
|
+
"filename": "lib/set-variable-action.ts",
|
|
3159
|
+
"line": 7
|
|
3160
|
+
},
|
|
3161
|
+
"methods": [
|
|
3162
|
+
{
|
|
3163
|
+
"docs": {
|
|
3164
|
+
"stability": "experimental",
|
|
3165
|
+
"summary": "Returns the AWS IoT Events action specification."
|
|
3166
|
+
},
|
|
3167
|
+
"locationInModule": {
|
|
3168
|
+
"filename": "lib/set-variable-action.ts",
|
|
3169
|
+
"line": 15
|
|
3170
|
+
},
|
|
3171
|
+
"name": "bind",
|
|
3172
|
+
"overrides": "@aws-cdk/aws-iotevents-alpha.IAction",
|
|
3173
|
+
"parameters": [
|
|
3174
|
+
{
|
|
3175
|
+
"name": "_scope",
|
|
3176
|
+
"type": {
|
|
3177
|
+
"fqn": "constructs.Construct"
|
|
3178
|
+
}
|
|
3179
|
+
},
|
|
3180
|
+
{
|
|
3181
|
+
"name": "_options",
|
|
3182
|
+
"type": {
|
|
3183
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.ActionBindOptions"
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
],
|
|
3187
|
+
"returns": {
|
|
3188
|
+
"type": {
|
|
3189
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.ActionConfig"
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
}
|
|
3193
|
+
],
|
|
3194
|
+
"name": "SetVariableAction",
|
|
3195
|
+
"symbolId": "lib/set-variable-action:SetVariableAction"
|
|
3099
3196
|
}
|
|
3100
3197
|
},
|
|
3101
|
-
"version": "2.
|
|
3198
|
+
"version": "2.17.0-alpha.0",
|
|
3102
3199
|
"fingerprint": "**********"
|
|
3103
3200
|
}
|
package/.jsii.tabl.json
CHANGED
|
@@ -2,6 +2,68 @@
|
|
|
2
2
|
"version": "2",
|
|
3
3
|
"toolVersion": "1.54.0",
|
|
4
4
|
"snippets": {
|
|
5
|
+
"3a50b79e103d87f35fbd05d11b302ae8f3e2ca6663bc42484fb79f2a17a1f117": {
|
|
6
|
+
"translations": {
|
|
7
|
+
"python": {
|
|
8
|
+
"source": "import aws_cdk.aws_iotevents_alpha as iotevents\nimport aws_cdk.aws_iotevents_actions_alpha as actions\n\n# input: iotevents.IInput\n\nstate = iotevents.State(\n state_name=\"MyState\",\n on_enter=[iotevents.Event(\n event_name=\"test-event\",\n condition=iotevents.Expression.current_input(input),\n actions=[actions, [\n actions.SetVariableAction(\"MyVariable\",\n iotevents.Expression.input_attribute(input, \"payload.temperature\"))\n ]\n ]\n )]\n)",
|
|
9
|
+
"version": "2"
|
|
10
|
+
},
|
|
11
|
+
"csharp": {
|
|
12
|
+
"source": "using Amazon.CDK.AWS.IoTEvents.Alpha;\nusing Amazon.CDK.AWS.IoTEvents.Actions.Alpha;\n\nIInput input;\n\nState state = new State(new StateProps {\n StateName = \"MyState\",\n OnEnter = new [] { new Event {\n EventName = \"test-event\",\n Condition = Expression.CurrentInput(input),\n Actions = new [] { actions, new [] {\n new SetVariableAction(\"MyVariable\", Expression.InputAttribute(input, \"payload.temperature\")) } }\n } }\n});",
|
|
13
|
+
"version": "1"
|
|
14
|
+
},
|
|
15
|
+
"java": {
|
|
16
|
+
"source": "import software.amazon.awscdk.services.iotevents.alpha.*;\nimport software.amazon.awscdk.services.iotevents.actions.alpha.*;\n\nIInput input;\n\nState state = State.Builder.create()\n .stateName(\"MyState\")\n .onEnter(List.of(Event.builder()\n .eventName(\"test-event\")\n .condition(Expression.currentInput(input))\n .actions(List.of(actions, List.of(\n new SetVariableAction(\"MyVariable\", Expression.inputAttribute(input, \"payload.temperature\")))))\n .build()))\n .build();",
|
|
17
|
+
"version": "1"
|
|
18
|
+
},
|
|
19
|
+
"$": {
|
|
20
|
+
"source": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});",
|
|
21
|
+
"version": "0"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"location": {
|
|
25
|
+
"api": {
|
|
26
|
+
"api": "moduleReadme",
|
|
27
|
+
"moduleFqn": "@aws-cdk/aws-iotevents-actions-alpha"
|
|
28
|
+
},
|
|
29
|
+
"field": {
|
|
30
|
+
"field": "markdown",
|
|
31
|
+
"line": 35
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"didCompile": false,
|
|
35
|
+
"fqnsReferenced": [
|
|
36
|
+
"@aws-cdk/aws-iotevents-actions-alpha.SetVariableAction",
|
|
37
|
+
"@aws-cdk/aws-iotevents-alpha.Expression",
|
|
38
|
+
"@aws-cdk/aws-iotevents-alpha.Expression#currentInput",
|
|
39
|
+
"@aws-cdk/aws-iotevents-alpha.Expression#inputAttribute",
|
|
40
|
+
"@aws-cdk/aws-iotevents-alpha.IInput",
|
|
41
|
+
"@aws-cdk/aws-iotevents-alpha.State",
|
|
42
|
+
"@aws-cdk/aws-iotevents-alpha.StateProps"
|
|
43
|
+
],
|
|
44
|
+
"fullSource": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});",
|
|
45
|
+
"syntaxKindCounter": {
|
|
46
|
+
"10": 6,
|
|
47
|
+
"75": 24,
|
|
48
|
+
"130": 1,
|
|
49
|
+
"153": 1,
|
|
50
|
+
"169": 1,
|
|
51
|
+
"192": 3,
|
|
52
|
+
"193": 2,
|
|
53
|
+
"194": 6,
|
|
54
|
+
"196": 2,
|
|
55
|
+
"197": 2,
|
|
56
|
+
"225": 2,
|
|
57
|
+
"242": 2,
|
|
58
|
+
"243": 2,
|
|
59
|
+
"254": 2,
|
|
60
|
+
"255": 2,
|
|
61
|
+
"256": 2,
|
|
62
|
+
"281": 5,
|
|
63
|
+
"290": 1
|
|
64
|
+
},
|
|
65
|
+
"fqnsFingerprint": "2623699685719a77bff1e5d9bfd763a2f87ee4df48dc738529b3b7dde22e5c3a"
|
|
66
|
+
},
|
|
5
67
|
"37d0a214abe7a2298a1ab5db51ef8090274727e97df91f78ab2f8b40d06216ba": {
|
|
6
68
|
"translations": {
|
|
7
69
|
"python": {
|
|
@@ -28,7 +90,7 @@
|
|
|
28
90
|
},
|
|
29
91
|
"field": {
|
|
30
92
|
"field": "markdown",
|
|
31
|
-
"line":
|
|
93
|
+
"line": 63
|
|
32
94
|
}
|
|
33
95
|
},
|
|
34
96
|
"didCompile": true,
|
|
@@ -62,7 +124,7 @@
|
|
|
62
124
|
"281": 5,
|
|
63
125
|
"290": 1
|
|
64
126
|
},
|
|
65
|
-
"fqnsFingerprint": "
|
|
127
|
+
"fqnsFingerprint": "d903897b0bafe0fdb569df91c6dd10e373418cc22b7cbfb69a36bfb73deb230a"
|
|
66
128
|
},
|
|
67
129
|
"608e7356ead228295bdedba3dffba3109fb96bfcb4b8bc6de21bd9faca41a9b5": {
|
|
68
130
|
"translations": {
|
|
@@ -136,7 +198,68 @@
|
|
|
136
198
|
"281": 23,
|
|
137
199
|
"290": 1
|
|
138
200
|
},
|
|
139
|
-
"fqnsFingerprint": "
|
|
201
|
+
"fqnsFingerprint": "8fac9bbf67dbbc0cd94b565350ce5044b3049474cd2bf2f0ab64c47c62e0d77b"
|
|
202
|
+
},
|
|
203
|
+
"eb1fb171932b7622e546cf1de59b6a048d56d35b9740f17c4f44c01bea051ec0": {
|
|
204
|
+
"translations": {
|
|
205
|
+
"python": {
|
|
206
|
+
"source": "import aws_cdk.aws_iotevents_alpha as iotevents\nimport aws_cdk.aws_iotevents_actions_alpha as actions\n\n# input: iotevents.IInput\n\nstate = iotevents.State(\n state_name=\"MyState\",\n on_enter=[iotevents.Event(\n event_name=\"test-event\",\n condition=iotevents.Expression.current_input(input),\n actions=[actions, [\n actions.SetVariableAction(\"MyVariable\",\n iotevents.Expression.input_attribute(input, \"payload.temperature\"))\n ]\n ]\n )]\n)",
|
|
207
|
+
"version": "2"
|
|
208
|
+
},
|
|
209
|
+
"csharp": {
|
|
210
|
+
"source": "using Amazon.CDK.AWS.IoTEvents.Alpha;\nusing Amazon.CDK.AWS.IoTEvents.Actions.Alpha;\n\nIInput input;\n\nState state = new State(new StateProps {\n StateName = \"MyState\",\n OnEnter = new [] { new Event {\n EventName = \"test-event\",\n Condition = Expression.CurrentInput(input),\n Actions = new [] { actions, new [] {\n new SetVariableAction(\"MyVariable\", Expression.InputAttribute(input, \"payload.temperature\")) } }\n } }\n});",
|
|
211
|
+
"version": "1"
|
|
212
|
+
},
|
|
213
|
+
"java": {
|
|
214
|
+
"source": "import software.amazon.awscdk.services.iotevents.alpha.*;\nimport software.amazon.awscdk.services.iotevents.actions.alpha.*;\n\nIInput input;\n\nState state = State.Builder.create()\n .stateName(\"MyState\")\n .onEnter(List.of(Event.builder()\n .eventName(\"test-event\")\n .condition(Expression.currentInput(input))\n .actions(List.of(actions, List.of(\n new SetVariableAction(\"MyVariable\", Expression.inputAttribute(input, \"payload.temperature\")))))\n .build()))\n .build();",
|
|
215
|
+
"version": "1"
|
|
216
|
+
},
|
|
217
|
+
"$": {
|
|
218
|
+
"source": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});",
|
|
219
|
+
"version": "0"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"location": {
|
|
223
|
+
"api": {
|
|
224
|
+
"api": "type",
|
|
225
|
+
"fqn": "@aws-cdk/aws-iotevents-actions-alpha.SetVariableAction"
|
|
226
|
+
},
|
|
227
|
+
"field": {
|
|
228
|
+
"field": "example"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"didCompile": false,
|
|
232
|
+
"fqnsReferenced": [
|
|
233
|
+
"@aws-cdk/aws-iotevents-actions-alpha.SetVariableAction",
|
|
234
|
+
"@aws-cdk/aws-iotevents-alpha.Expression",
|
|
235
|
+
"@aws-cdk/aws-iotevents-alpha.Expression#currentInput",
|
|
236
|
+
"@aws-cdk/aws-iotevents-alpha.Expression#inputAttribute",
|
|
237
|
+
"@aws-cdk/aws-iotevents-alpha.IInput",
|
|
238
|
+
"@aws-cdk/aws-iotevents-alpha.State",
|
|
239
|
+
"@aws-cdk/aws-iotevents-alpha.StateProps"
|
|
240
|
+
],
|
|
241
|
+
"fullSource": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});",
|
|
242
|
+
"syntaxKindCounter": {
|
|
243
|
+
"10": 6,
|
|
244
|
+
"75": 24,
|
|
245
|
+
"130": 1,
|
|
246
|
+
"153": 1,
|
|
247
|
+
"169": 1,
|
|
248
|
+
"192": 3,
|
|
249
|
+
"193": 2,
|
|
250
|
+
"194": 6,
|
|
251
|
+
"196": 2,
|
|
252
|
+
"197": 2,
|
|
253
|
+
"225": 2,
|
|
254
|
+
"242": 2,
|
|
255
|
+
"243": 2,
|
|
256
|
+
"254": 2,
|
|
257
|
+
"255": 2,
|
|
258
|
+
"256": 2,
|
|
259
|
+
"281": 5,
|
|
260
|
+
"290": 1
|
|
261
|
+
},
|
|
262
|
+
"fqnsFingerprint": "2623699685719a77bff1e5d9bfd763a2f87ee4df48dc738529b3b7dde22e5c3a"
|
|
140
263
|
}
|
|
141
264
|
}
|
|
142
265
|
}
|
package/.warnings.jsii.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
function _aws_cdk_aws_iotevents_actions_alpha_SetVariableAction(p) {
|
|
2
|
+
}
|
|
1
3
|
function _aws_cdk_aws_iotevents_actions_alpha_LambdaInvokeAction(p) {
|
|
2
4
|
}
|
|
3
5
|
function print(name, deprecationMessage) {
|
|
@@ -15,5 +17,5 @@ function print(name, deprecationMessage) {
|
|
|
15
17
|
const visitedObjects = new Set();
|
|
16
18
|
class DeprecationError extends Error {
|
|
17
19
|
}
|
|
18
|
-
module.exports = { print, _aws_cdk_aws_iotevents_actions_alpha_LambdaInvokeAction };
|
|
20
|
+
module.exports = { print, _aws_cdk_aws_iotevents_actions_alpha_SetVariableAction, _aws_cdk_aws_iotevents_actions_alpha_LambdaInvokeAction };
|
|
19
21
|
module.exports.DeprecationError = DeprecationError;
|
package/README.md
CHANGED
|
@@ -24,8 +24,37 @@ AWS IoT Events can trigger actions when it detects a specified event or transiti
|
|
|
24
24
|
|
|
25
25
|
Currently supported are:
|
|
26
26
|
|
|
27
|
+
- Set variable to detector instanse
|
|
27
28
|
- Invoke a Lambda function
|
|
28
29
|
|
|
30
|
+
## Set variable to detector instanse
|
|
31
|
+
|
|
32
|
+
The code snippet below creates an Action that set variable to detector instanse
|
|
33
|
+
when it is triggered.
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import * as iotevents from '@aws-cdk/aws-iotevents-alpha';
|
|
37
|
+
import * as actions from '@aws-cdk/aws-iotevents-actions-alpha';
|
|
38
|
+
|
|
39
|
+
declare const input: iotevents.IInput;
|
|
40
|
+
|
|
41
|
+
const state = new iotevents.State({
|
|
42
|
+
stateName: 'MyState',
|
|
43
|
+
onEnter: [{
|
|
44
|
+
eventName: 'test-event',
|
|
45
|
+
condition: iotevents.Expression.currentInput(input),
|
|
46
|
+
actions: [
|
|
47
|
+
actions: [
|
|
48
|
+
new actions.SetVariableAction(
|
|
49
|
+
'MyVariable',
|
|
50
|
+
iotevents.Expression.inputAttribute(input, 'payload.temperature'),
|
|
51
|
+
),
|
|
52
|
+
],
|
|
53
|
+
],
|
|
54
|
+
}],
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
29
58
|
## Invoke a Lambda function
|
|
30
59
|
|
|
31
60
|
The code snippet below creates an Action that invoke a Lambda function
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -10,5 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./set-variable-action"), exports);
|
|
13
14
|
__exportStar(require("./lambda-invoke-action"), exports);
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSx3REFBc0M7QUFDdEMseURBQXVDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zZXQtdmFyaWFibGUtYWN0aW9uJztcbmV4cG9ydCAqIGZyb20gJy4vbGFtYmRhLWludm9rZS1hY3Rpb24nO1xuIl19
|
|
@@ -26,5 +26,5 @@ class LambdaInvokeAction {
|
|
|
26
26
|
}
|
|
27
27
|
exports.LambdaInvokeAction = LambdaInvokeAction;
|
|
28
28
|
_a = JSII_RTTI_SYMBOL_1;
|
|
29
|
-
LambdaInvokeAction[_a] = { fqn: "@aws-cdk/aws-iotevents-actions-alpha.LambdaInvokeAction", version: "2.
|
|
29
|
+
LambdaInvokeAction[_a] = { fqn: "@aws-cdk/aws-iotevents-actions-alpha.LambdaInvokeAction", version: "2.17.0-alpha.0" };
|
|
30
30
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFtYmRhLWludm9rZS1hY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJsYW1iZGEtaW52b2tlLWFjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUlBOztHQUVHO0FBQ0gsTUFBYSxrQkFBa0I7SUFDN0I7O09BRUc7SUFDSCxZQUE2QixJQUFzQjtRQUF0QixTQUFJLEdBQUosSUFBSSxDQUFrQjtLQUNsRDtJQUVELElBQUksQ0FBQyxNQUFpQixFQUFFLE9BQW9DO1FBQzFELElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNwQyxPQUFPO1lBQ0wsYUFBYSxFQUFFO2dCQUNiLE1BQU0sRUFBRTtvQkFDTixXQUFXLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxXQUFXO2lCQUNuQzthQUNGO1NBQ0YsQ0FBQztLQUNIOztBQWhCSCxnREFpQkMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgKiBhcyBpb3RldmVudHMgZnJvbSAnQGF3cy1jZGsvYXdzLWlvdGV2ZW50cy1hbHBoYSc7XG5pbXBvcnQgKiBhcyBsYW1iZGEgZnJvbSAnYXdzLWNkay1saWIvYXdzLWxhbWJkYSc7XG5pbXBvcnQgeyBDb25zdHJ1Y3QgfSBmcm9tICdjb25zdHJ1Y3RzJztcblxuLyoqXG4gKiBUaGUgYWN0aW9uIHRvIHdyaXRlIHRoZSBkYXRhIHRvIGFuIEFXUyBMYW1iZGEgZnVuY3Rpb24uXG4gKi9cbmV4cG9ydCBjbGFzcyBMYW1iZGFJbnZva2VBY3Rpb24gaW1wbGVtZW50cyBpb3RldmVudHMuSUFjdGlvbiB7XG4gIC8qKlxuICAgKiBAcGFyYW0gZnVuYyB0aGUgQVdTIExhbWJkYSBmdW5jdGlvbiB0byBiZSBpbnZva2VkIGJ5IHRoaXMgYWN0aW9uXG4gICAqL1xuICBjb25zdHJ1Y3Rvcihwcml2YXRlIHJlYWRvbmx5IGZ1bmM6IGxhbWJkYS5JRnVuY3Rpb24pIHtcbiAgfVxuXG4gIGJpbmQoX3Njb3BlOiBDb25zdHJ1Y3QsIG9wdGlvbnM6IGlvdGV2ZW50cy5BY3Rpb25CaW5kT3B0aW9ucyk6IGlvdGV2ZW50cy5BY3Rpb25Db25maWcge1xuICAgIHRoaXMuZnVuYy5ncmFudEludm9rZShvcHRpb25zLnJvbGUpO1xuICAgIHJldHVybiB7XG4gICAgICBjb25maWd1cmF0aW9uOiB7XG4gICAgICAgIGxhbWJkYToge1xuICAgICAgICAgIGZ1bmN0aW9uQXJuOiB0aGlzLmZ1bmMuZnVuY3Rpb25Bcm4sXG4gICAgICAgIH0sXG4gICAgICB9LFxuICAgIH07XG4gIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as iotevents from '@aws-cdk/aws-iotevents-alpha';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
/**
|
|
4
|
+
* The action to create a variable with a specified value.
|
|
5
|
+
*/
|
|
6
|
+
export declare class SetVariableAction implements iotevents.IAction {
|
|
7
|
+
private readonly variableName;
|
|
8
|
+
private readonly value;
|
|
9
|
+
/**
|
|
10
|
+
* @param variableName the name of the variable
|
|
11
|
+
* @param value the new value of the variable
|
|
12
|
+
*/
|
|
13
|
+
constructor(variableName: string, value: iotevents.Expression);
|
|
14
|
+
bind(_scope: Construct, _options: iotevents.ActionBindOptions): iotevents.ActionConfig;
|
|
15
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SetVariableAction = void 0;
|
|
5
|
+
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
|
+
/**
|
|
7
|
+
* The action to create a variable with a specified value.
|
|
8
|
+
*/
|
|
9
|
+
class SetVariableAction {
|
|
10
|
+
/**
|
|
11
|
+
* @param variableName the name of the variable
|
|
12
|
+
* @param value the new value of the variable
|
|
13
|
+
*/
|
|
14
|
+
constructor(variableName, value) {
|
|
15
|
+
this.variableName = variableName;
|
|
16
|
+
this.value = value;
|
|
17
|
+
}
|
|
18
|
+
bind(_scope, _options) {
|
|
19
|
+
return {
|
|
20
|
+
configuration: {
|
|
21
|
+
setVariable: {
|
|
22
|
+
variableName: this.variableName,
|
|
23
|
+
value: this.value.evaluate(),
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.SetVariableAction = SetVariableAction;
|
|
30
|
+
_a = JSII_RTTI_SYMBOL_1;
|
|
31
|
+
SetVariableAction[_a] = { fqn: "@aws-cdk/aws-iotevents-actions-alpha.SetVariableAction", version: "2.17.0-alpha.0" };
|
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0LXZhcmlhYmxlLWFjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNldC12YXJpYWJsZS1hY3Rpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFHQTs7R0FFRztBQUNILE1BQWEsaUJBQWlCO0lBQzVCOzs7T0FHRztJQUNILFlBQTZCLFlBQW9CLEVBQW1CLEtBQTJCO1FBQWxFLGlCQUFZLEdBQVosWUFBWSxDQUFRO1FBQW1CLFVBQUssR0FBTCxLQUFLLENBQXNCO0tBQzlGO0lBRUQsSUFBSSxDQUFDLE1BQWlCLEVBQUUsUUFBcUM7UUFDM0QsT0FBTztZQUNMLGFBQWEsRUFBRTtnQkFDYixXQUFXLEVBQUU7b0JBQ1gsWUFBWSxFQUFFLElBQUksQ0FBQyxZQUFZO29CQUMvQixLQUFLLEVBQUUsSUFBSSxDQUFDLEtBQUssQ0FBQyxRQUFRLEVBQUU7aUJBQzdCO2FBQ0Y7U0FDRixDQUFDO0tBQ0g7O0FBakJILDhDQWtCQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGlvdGV2ZW50cyBmcm9tICdAYXdzLWNkay9hd3MtaW90ZXZlbnRzLWFscGhhJztcbmltcG9ydCB7IENvbnN0cnVjdCB9IGZyb20gJ2NvbnN0cnVjdHMnO1xuXG4vKipcbiAqIFRoZSBhY3Rpb24gdG8gY3JlYXRlIGEgdmFyaWFibGUgd2l0aCBhIHNwZWNpZmllZCB2YWx1ZS5cbiAqL1xuZXhwb3J0IGNsYXNzIFNldFZhcmlhYmxlQWN0aW9uIGltcGxlbWVudHMgaW90ZXZlbnRzLklBY3Rpb24ge1xuICAvKipcbiAgICogQHBhcmFtIHZhcmlhYmxlTmFtZSB0aGUgbmFtZSBvZiB0aGUgdmFyaWFibGVcbiAgICogQHBhcmFtIHZhbHVlIHRoZSBuZXcgdmFsdWUgb2YgdGhlIHZhcmlhYmxlXG4gICAqL1xuICBjb25zdHJ1Y3Rvcihwcml2YXRlIHJlYWRvbmx5IHZhcmlhYmxlTmFtZTogc3RyaW5nLCBwcml2YXRlIHJlYWRvbmx5IHZhbHVlOiBpb3RldmVudHMuRXhwcmVzc2lvbikge1xuICB9XG5cbiAgYmluZChfc2NvcGU6IENvbnN0cnVjdCwgX29wdGlvbnM6IGlvdGV2ZW50cy5BY3Rpb25CaW5kT3B0aW9ucyk6IGlvdGV2ZW50cy5BY3Rpb25Db25maWcge1xuICAgIHJldHVybiB7XG4gICAgICBjb25maWd1cmF0aW9uOiB7XG4gICAgICAgIHNldFZhcmlhYmxlOiB7XG4gICAgICAgICAgdmFyaWFibGVOYW1lOiB0aGlzLnZhcmlhYmxlTmFtZSxcbiAgICAgICAgICB2YWx1ZTogdGhpcy52YWx1ZS5ldmFsdWF0ZSgpLFxuICAgICAgICB9LFxuICAgICAgfSxcbiAgICB9O1xuICB9XG59XG4iXX0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-cdk/aws-iotevents-actions-alpha",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.17.0-alpha.0",
|
|
4
4
|
"description": "Receipt Detector Model actions for AWS IoT Events",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -74,20 +74,20 @@
|
|
|
74
74
|
},
|
|
75
75
|
"license": "Apache-2.0",
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@aws-cdk/cdk-build-tools": "2.
|
|
78
|
-
"@aws-cdk/cdk-integ-tools": "2.
|
|
79
|
-
"@aws-cdk/pkglint": "2.
|
|
77
|
+
"@aws-cdk/cdk-build-tools": "2.17.0",
|
|
78
|
+
"@aws-cdk/cdk-integ-tools": "2.17.0",
|
|
79
|
+
"@aws-cdk/pkglint": "2.17.0",
|
|
80
80
|
"@types/jest": "^27.4.1",
|
|
81
81
|
"jest": "^27.5.1",
|
|
82
|
-
"aws-cdk-lib": "2.
|
|
82
|
+
"aws-cdk-lib": "2.17.0",
|
|
83
83
|
"constructs": "^10.0.0",
|
|
84
|
-
"@aws-cdk/aws-iotevents-alpha": "2.
|
|
84
|
+
"@aws-cdk/aws-iotevents-alpha": "2.17.0-alpha.0"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {},
|
|
87
87
|
"homepage": "https://github.com/aws/aws-cdk",
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@aws-cdk/aws-iotevents-alpha": "2.
|
|
90
|
-
"aws-cdk-lib": "^2.
|
|
89
|
+
"@aws-cdk/aws-iotevents-alpha": "2.17.0-alpha.0",
|
|
90
|
+
"aws-cdk-lib": "^2.17.0",
|
|
91
91
|
"constructs": "^10.0.0"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|