@aws-cdk/aws-iotevents-alpha 2.18.0-alpha.0 → 2.21.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 +226 -14
- package/.jsii.tabl.json +78 -71
- package/.warnings.jsii.js +80 -44
- package/README.md +6 -6
- package/lib/detector-model.js +11 -3
- package/lib/expression.d.ts +31 -1
- package/lib/expression.js +151 -13
- package/lib/input.js +11 -3
- package/lib/state.js +21 -5
- package/package.json +9 -9
package/.jsii
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://aws.amazon.com"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"aws-cdk-lib": "^2.
|
|
11
|
+
"aws-cdk-lib": "^2.21.0",
|
|
12
12
|
"constructs": "^10.0.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencyClosure": {
|
|
@@ -1913,6 +1913,19 @@
|
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
1915
|
},
|
|
1916
|
+
"aws-cdk-lib.aws_mediatailor": {
|
|
1917
|
+
"targets": {
|
|
1918
|
+
"dotnet": {
|
|
1919
|
+
"namespace": "Amazon.CDK.AWS.MediaTailor"
|
|
1920
|
+
},
|
|
1921
|
+
"java": {
|
|
1922
|
+
"package": "software.amazon.awscdk.services.mediatailor"
|
|
1923
|
+
},
|
|
1924
|
+
"python": {
|
|
1925
|
+
"module": "aws_cdk.aws_mediatailor"
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
},
|
|
1916
1929
|
"aws-cdk-lib.aws_memorydb": {
|
|
1917
1930
|
"targets": {
|
|
1918
1931
|
"dotnet": {
|
|
@@ -2959,7 +2972,7 @@
|
|
|
2959
2972
|
"stability": "experimental"
|
|
2960
2973
|
},
|
|
2961
2974
|
"homepage": "https://github.com/aws/aws-cdk",
|
|
2962
|
-
"jsiiVersion": "1.
|
|
2975
|
+
"jsiiVersion": "1.57.0 (build f614666)",
|
|
2963
2976
|
"keywords": [
|
|
2964
2977
|
"aws",
|
|
2965
2978
|
"cdk",
|
|
@@ -2981,7 +2994,7 @@
|
|
|
2981
2994
|
},
|
|
2982
2995
|
"name": "@aws-cdk/aws-iotevents-alpha",
|
|
2983
2996
|
"readme": {
|
|
2984
|
-
"markdown": "# AWS::IoTEvents Construct Library\n\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\nAWS IoT Events enables you to monitor your equipment or device fleets for\nfailures or changes in operation, and to trigger actions when such events\noccur.\n\n## Installation\n\nInstall the module:\n\n```console\n$ npm i @aws-cdk/aws-iotevents\n```\n\nImport it into your code:\n\n```ts nofixture\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n```\n\n## `DetectorModel`\n\nThe following example creates an AWS IoT Events detector model to your stack.\nThe detector model need a reference to at least one AWS IoT Events input.\nAWS IoT Events inputs enable the detector to get MQTT payload values from IoT Core rules.\n\nYou can define built-in actions to use a timer or set a variable, or send data to other AWS resources.\nSee also [@aws-cdk/aws-iotevents-actions](https://docs.aws.amazon.com/cdk/api/v1/docs/aws-iotevents-actions-readme.html) for other actions.\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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is
|
|
2997
|
+
"markdown": "# AWS::IoTEvents Construct Library\n\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\nAWS IoT Events enables you to monitor your equipment or device fleets for\nfailures or changes in operation, and to trigger actions when such events\noccur.\n\n## Installation\n\nInstall the module:\n\n```console\n$ npm i @aws-cdk/aws-iotevents\n```\n\nImport it into your code:\n\n```ts nofixture\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n```\n\n## `DetectorModel`\n\nThe following example creates an AWS IoT Events detector model to your stack.\nThe detector model need a reference to at least one AWS IoT Events input.\nAWS IoT Events inputs enable the detector to get MQTT payload values from IoT Core rules.\n\nYou can define built-in actions to use a timer or set a variable, or send data to other AWS resources.\nSee also [@aws-cdk/aws-iotevents-actions](https://docs.aws.amazon.com/cdk/api/v1/docs/aws-iotevents-actions-readme.html) for other actions.\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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});\n```\n\nTo grant permissions to put messages in the input,\nyou can use the `grantWrite()` method:\n\n```ts\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\ndeclare const grantable: iam.IGrantable;\nconst input = iotevents.Input.fromInputName(this, 'MyInput', 'my_input');\n\ninput.grantWrite(grantable);\n```\n"
|
|
2985
2998
|
},
|
|
2986
2999
|
"repository": {
|
|
2987
3000
|
"directory": "packages/individual-packages/aws-iotevents",
|
|
@@ -3012,7 +3025,7 @@
|
|
|
3012
3025
|
"python": {
|
|
3013
3026
|
"classifiers": [
|
|
3014
3027
|
"Framework :: AWS CDK",
|
|
3015
|
-
"Framework :: AWS CDK ::
|
|
3028
|
+
"Framework :: AWS CDK :: 2"
|
|
3016
3029
|
],
|
|
3017
3030
|
"distName": "aws-cdk.aws-iotevents-alpha",
|
|
3018
3031
|
"module": "aws_cdk.aws_iotevents_alpha"
|
|
@@ -3102,7 +3115,7 @@
|
|
|
3102
3115
|
"custom": {
|
|
3103
3116
|
"exampleMetadata": "infused"
|
|
3104
3117
|
},
|
|
3105
|
-
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is
|
|
3118
|
+
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});",
|
|
3106
3119
|
"stability": "experimental",
|
|
3107
3120
|
"summary": "Defines an AWS IoT Events detector model in this stack."
|
|
3108
3121
|
},
|
|
@@ -3211,7 +3224,7 @@
|
|
|
3211
3224
|
"custom": {
|
|
3212
3225
|
"exampleMetadata": "infused"
|
|
3213
3226
|
},
|
|
3214
|
-
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is
|
|
3227
|
+
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});",
|
|
3215
3228
|
"stability": "experimental",
|
|
3216
3229
|
"summary": "Properties for defining an AWS IoT Events detector model."
|
|
3217
3230
|
},
|
|
@@ -3419,7 +3432,7 @@
|
|
|
3419
3432
|
"custom": {
|
|
3420
3433
|
"exampleMetadata": "infused"
|
|
3421
3434
|
},
|
|
3422
|
-
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is
|
|
3435
|
+
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});",
|
|
3423
3436
|
"stability": "experimental",
|
|
3424
3437
|
"summary": "Information about the order in which events are evaluated and how actions are executed."
|
|
3425
3438
|
},
|
|
@@ -3467,7 +3480,7 @@
|
|
|
3467
3480
|
},
|
|
3468
3481
|
"locationInModule": {
|
|
3469
3482
|
"filename": "lib/expression.ts",
|
|
3470
|
-
"line":
|
|
3483
|
+
"line": 86
|
|
3471
3484
|
}
|
|
3472
3485
|
},
|
|
3473
3486
|
"kind": "class",
|
|
@@ -3483,7 +3496,7 @@
|
|
|
3483
3496
|
},
|
|
3484
3497
|
"locationInModule": {
|
|
3485
3498
|
"filename": "lib/expression.ts",
|
|
3486
|
-
"line":
|
|
3499
|
+
"line": 75
|
|
3487
3500
|
},
|
|
3488
3501
|
"name": "and",
|
|
3489
3502
|
"parameters": [
|
|
@@ -3589,6 +3602,68 @@
|
|
|
3589
3602
|
},
|
|
3590
3603
|
"static": true
|
|
3591
3604
|
},
|
|
3605
|
+
{
|
|
3606
|
+
"docs": {
|
|
3607
|
+
"stability": "experimental",
|
|
3608
|
+
"summary": "Create a expression for the Greater Than operator."
|
|
3609
|
+
},
|
|
3610
|
+
"locationInModule": {
|
|
3611
|
+
"filename": "lib/expression.ts",
|
|
3612
|
+
"line": 61
|
|
3613
|
+
},
|
|
3614
|
+
"name": "gt",
|
|
3615
|
+
"parameters": [
|
|
3616
|
+
{
|
|
3617
|
+
"name": "left",
|
|
3618
|
+
"type": {
|
|
3619
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3620
|
+
}
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
"name": "right",
|
|
3624
|
+
"type": {
|
|
3625
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3626
|
+
}
|
|
3627
|
+
}
|
|
3628
|
+
],
|
|
3629
|
+
"returns": {
|
|
3630
|
+
"type": {
|
|
3631
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3632
|
+
}
|
|
3633
|
+
},
|
|
3634
|
+
"static": true
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
"docs": {
|
|
3638
|
+
"stability": "experimental",
|
|
3639
|
+
"summary": "Create a expression for the Greater Than Or Equal operator."
|
|
3640
|
+
},
|
|
3641
|
+
"locationInModule": {
|
|
3642
|
+
"filename": "lib/expression.ts",
|
|
3643
|
+
"line": 68
|
|
3644
|
+
},
|
|
3645
|
+
"name": "gte",
|
|
3646
|
+
"parameters": [
|
|
3647
|
+
{
|
|
3648
|
+
"name": "left",
|
|
3649
|
+
"type": {
|
|
3650
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3651
|
+
}
|
|
3652
|
+
},
|
|
3653
|
+
{
|
|
3654
|
+
"name": "right",
|
|
3655
|
+
"type": {
|
|
3656
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
],
|
|
3660
|
+
"returns": {
|
|
3661
|
+
"type": {
|
|
3662
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3663
|
+
}
|
|
3664
|
+
},
|
|
3665
|
+
"static": true
|
|
3666
|
+
},
|
|
3592
3667
|
{
|
|
3593
3668
|
"docs": {
|
|
3594
3669
|
"stability": "experimental",
|
|
@@ -3620,6 +3695,130 @@
|
|
|
3620
3695
|
},
|
|
3621
3696
|
"static": true
|
|
3622
3697
|
},
|
|
3698
|
+
{
|
|
3699
|
+
"docs": {
|
|
3700
|
+
"stability": "experimental",
|
|
3701
|
+
"summary": "Create a expression for the Less Than operator."
|
|
3702
|
+
},
|
|
3703
|
+
"locationInModule": {
|
|
3704
|
+
"filename": "lib/expression.ts",
|
|
3705
|
+
"line": 47
|
|
3706
|
+
},
|
|
3707
|
+
"name": "lt",
|
|
3708
|
+
"parameters": [
|
|
3709
|
+
{
|
|
3710
|
+
"name": "left",
|
|
3711
|
+
"type": {
|
|
3712
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3713
|
+
}
|
|
3714
|
+
},
|
|
3715
|
+
{
|
|
3716
|
+
"name": "right",
|
|
3717
|
+
"type": {
|
|
3718
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3719
|
+
}
|
|
3720
|
+
}
|
|
3721
|
+
],
|
|
3722
|
+
"returns": {
|
|
3723
|
+
"type": {
|
|
3724
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3725
|
+
}
|
|
3726
|
+
},
|
|
3727
|
+
"static": true
|
|
3728
|
+
},
|
|
3729
|
+
{
|
|
3730
|
+
"docs": {
|
|
3731
|
+
"stability": "experimental",
|
|
3732
|
+
"summary": "Create a expression for the Less Than Or Equal operator."
|
|
3733
|
+
},
|
|
3734
|
+
"locationInModule": {
|
|
3735
|
+
"filename": "lib/expression.ts",
|
|
3736
|
+
"line": 54
|
|
3737
|
+
},
|
|
3738
|
+
"name": "lte",
|
|
3739
|
+
"parameters": [
|
|
3740
|
+
{
|
|
3741
|
+
"name": "left",
|
|
3742
|
+
"type": {
|
|
3743
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3744
|
+
}
|
|
3745
|
+
},
|
|
3746
|
+
{
|
|
3747
|
+
"name": "right",
|
|
3748
|
+
"type": {
|
|
3749
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3750
|
+
}
|
|
3751
|
+
}
|
|
3752
|
+
],
|
|
3753
|
+
"returns": {
|
|
3754
|
+
"type": {
|
|
3755
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3756
|
+
}
|
|
3757
|
+
},
|
|
3758
|
+
"static": true
|
|
3759
|
+
},
|
|
3760
|
+
{
|
|
3761
|
+
"docs": {
|
|
3762
|
+
"stability": "experimental",
|
|
3763
|
+
"summary": "Create a expression for the Not Equal operator."
|
|
3764
|
+
},
|
|
3765
|
+
"locationInModule": {
|
|
3766
|
+
"filename": "lib/expression.ts",
|
|
3767
|
+
"line": 40
|
|
3768
|
+
},
|
|
3769
|
+
"name": "neq",
|
|
3770
|
+
"parameters": [
|
|
3771
|
+
{
|
|
3772
|
+
"name": "left",
|
|
3773
|
+
"type": {
|
|
3774
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3775
|
+
}
|
|
3776
|
+
},
|
|
3777
|
+
{
|
|
3778
|
+
"name": "right",
|
|
3779
|
+
"type": {
|
|
3780
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3781
|
+
}
|
|
3782
|
+
}
|
|
3783
|
+
],
|
|
3784
|
+
"returns": {
|
|
3785
|
+
"type": {
|
|
3786
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3787
|
+
}
|
|
3788
|
+
},
|
|
3789
|
+
"static": true
|
|
3790
|
+
},
|
|
3791
|
+
{
|
|
3792
|
+
"docs": {
|
|
3793
|
+
"stability": "experimental",
|
|
3794
|
+
"summary": "Create a expression for the OR operator."
|
|
3795
|
+
},
|
|
3796
|
+
"locationInModule": {
|
|
3797
|
+
"filename": "lib/expression.ts",
|
|
3798
|
+
"line": 82
|
|
3799
|
+
},
|
|
3800
|
+
"name": "or",
|
|
3801
|
+
"parameters": [
|
|
3802
|
+
{
|
|
3803
|
+
"name": "left",
|
|
3804
|
+
"type": {
|
|
3805
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3806
|
+
}
|
|
3807
|
+
},
|
|
3808
|
+
{
|
|
3809
|
+
"name": "right",
|
|
3810
|
+
"type": {
|
|
3811
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3812
|
+
}
|
|
3813
|
+
}
|
|
3814
|
+
],
|
|
3815
|
+
"returns": {
|
|
3816
|
+
"type": {
|
|
3817
|
+
"fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
|
|
3818
|
+
}
|
|
3819
|
+
},
|
|
3820
|
+
"static": true
|
|
3821
|
+
},
|
|
3623
3822
|
{
|
|
3624
3823
|
"abstract": true,
|
|
3625
3824
|
"docs": {
|
|
@@ -3628,9 +3827,22 @@
|
|
|
3628
3827
|
},
|
|
3629
3828
|
"locationInModule": {
|
|
3630
3829
|
"filename": "lib/expression.ts",
|
|
3631
|
-
"line":
|
|
3830
|
+
"line": 98
|
|
3632
3831
|
},
|
|
3633
3832
|
"name": "evaluate",
|
|
3833
|
+
"parameters": [
|
|
3834
|
+
{
|
|
3835
|
+
"docs": {
|
|
3836
|
+
"remarks": "This is intended to be set according to MDN rules, see\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Operator_Precedence#table\nfor details",
|
|
3837
|
+
"summary": "priority of the parent of this expression, used for determining whether or not to add parenthesis around the expression."
|
|
3838
|
+
},
|
|
3839
|
+
"name": "parentPriority",
|
|
3840
|
+
"optional": true,
|
|
3841
|
+
"type": {
|
|
3842
|
+
"primitive": "number"
|
|
3843
|
+
}
|
|
3844
|
+
}
|
|
3845
|
+
],
|
|
3634
3846
|
"returns": {
|
|
3635
3847
|
"type": {
|
|
3636
3848
|
"primitive": "string"
|
|
@@ -3862,7 +4074,7 @@
|
|
|
3862
4074
|
"custom": {
|
|
3863
4075
|
"exampleMetadata": "infused"
|
|
3864
4076
|
},
|
|
3865
|
-
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is
|
|
4077
|
+
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});",
|
|
3866
4078
|
"stability": "experimental",
|
|
3867
4079
|
"summary": "Defines an AWS IoT Events input in this stack."
|
|
3868
4080
|
},
|
|
@@ -4045,7 +4257,7 @@
|
|
|
4045
4257
|
"custom": {
|
|
4046
4258
|
"exampleMetadata": "infused"
|
|
4047
4259
|
},
|
|
4048
|
-
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is
|
|
4260
|
+
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});",
|
|
4049
4261
|
"stability": "experimental",
|
|
4050
4262
|
"summary": "Properties for defining an AWS IoT Events input."
|
|
4051
4263
|
},
|
|
@@ -4304,7 +4516,7 @@
|
|
|
4304
4516
|
"custom": {
|
|
4305
4517
|
"exampleMetadata": "infused"
|
|
4306
4518
|
},
|
|
4307
|
-
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is
|
|
4519
|
+
"example": "import * 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 func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});",
|
|
4308
4520
|
"stability": "experimental",
|
|
4309
4521
|
"summary": "Properties for options of state transition."
|
|
4310
4522
|
},
|
|
@@ -4378,6 +4590,6 @@
|
|
|
4378
4590
|
"symbolId": "lib/state:TransitionOptions"
|
|
4379
4591
|
}
|
|
4380
4592
|
},
|
|
4381
|
-
"version": "2.
|
|
4593
|
+
"version": "2.21.0-alpha.0",
|
|
4382
4594
|
"fingerprint": "**********"
|
|
4383
4595
|
}
|