@aws-cdk/aws-iotevents-alpha 2.11.0-alpha.0 → 2.14.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 CHANGED
@@ -8,7 +8,7 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "aws-cdk-lib": "^2.11.0",
11
+ "aws-cdk-lib": "^2.14.0",
12
12
  "constructs": "^10.0.0"
13
13
  },
14
14
  "dependencyClosure": {
@@ -2920,7 +2920,7 @@
2920
2920
  "stability": "experimental"
2921
2921
  },
2922
2922
  "homepage": "https://github.com/aws/aws-cdk",
2923
- "jsiiVersion": "1.52.1 (build 5ccc8f6)",
2923
+ "jsiiVersion": "1.54.0 (build b1b977a)",
2924
2924
  "keywords": [
2925
2925
  "aws",
2926
2926
  "cdk",
@@ -2942,7 +2942,7 @@
2942
2942
  },
2943
2943
  "name": "@aws-cdk/aws-iotevents-alpha",
2944
2944
  "readme": {
2945
- "markdown": "# AWS::IoTEvents Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\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\n```ts\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\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"
2945
+ "markdown": "# AWS::IoTEvents Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\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\n```ts\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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"
2946
2946
  },
2947
2947
  "repository": {
2948
2948
  "directory": "packages/individual-packages/aws-iotevents",
@@ -2987,7 +2987,7 @@
2987
2987
  "custom": {
2988
2988
  "exampleMetadata": "infused"
2989
2989
  },
2990
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\n});",
2990
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
2991
2991
  "stability": "experimental",
2992
2992
  "summary": "Defines an AWS IoT Events detector model in this stack."
2993
2993
  },
@@ -2998,7 +2998,7 @@
2998
2998
  },
2999
2999
  "locationInModule": {
3000
3000
  "filename": "lib/detector-model.ts",
3001
- "line": 106
3001
+ "line": 107
3002
3002
  },
3003
3003
  "parameters": [
3004
3004
  {
@@ -3027,7 +3027,7 @@
3027
3027
  "kind": "class",
3028
3028
  "locationInModule": {
3029
3029
  "filename": "lib/detector-model.ts",
3030
- "line": 94
3030
+ "line": 95
3031
3031
  },
3032
3032
  "methods": [
3033
3033
  {
@@ -3037,7 +3037,7 @@
3037
3037
  },
3038
3038
  "locationInModule": {
3039
3039
  "filename": "lib/detector-model.ts",
3040
- "line": 98
3040
+ "line": 99
3041
3041
  },
3042
3042
  "name": "fromDetectorModelName",
3043
3043
  "parameters": [
@@ -3078,7 +3078,7 @@
3078
3078
  "immutable": true,
3079
3079
  "locationInModule": {
3080
3080
  "filename": "lib/detector-model.ts",
3081
- "line": 104
3081
+ "line": 105
3082
3082
  },
3083
3083
  "name": "detectorModelName",
3084
3084
  "overrides": "@aws-cdk/aws-iotevents-alpha.IDetectorModel",
@@ -3096,7 +3096,7 @@
3096
3096
  "custom": {
3097
3097
  "exampleMetadata": "infused"
3098
3098
  },
3099
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\n});",
3099
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
3100
3100
  "stability": "experimental",
3101
3101
  "summary": "Properties for defining an AWS IoT Events detector model."
3102
3102
  },
@@ -3104,7 +3104,7 @@
3104
3104
  "kind": "interface",
3105
3105
  "locationInModule": {
3106
3106
  "filename": "lib/detector-model.ts",
3107
- "line": 38
3107
+ "line": 39
3108
3108
  },
3109
3109
  "name": "DetectorModelProps",
3110
3110
  "properties": [
@@ -3117,7 +3117,7 @@
3117
3117
  "immutable": true,
3118
3118
  "locationInModule": {
3119
3119
  "filename": "lib/detector-model.ts",
3120
- "line": 81
3120
+ "line": 82
3121
3121
  },
3122
3122
  "name": "initialState",
3123
3123
  "type": {
@@ -3134,7 +3134,7 @@
3134
3134
  "immutable": true,
3135
3135
  "locationInModule": {
3136
3136
  "filename": "lib/detector-model.ts",
3137
- "line": 51
3137
+ "line": 52
3138
3138
  },
3139
3139
  "name": "description",
3140
3140
  "optional": true,
@@ -3153,7 +3153,7 @@
3153
3153
  "immutable": true,
3154
3154
  "locationInModule": {
3155
3155
  "filename": "lib/detector-model.ts",
3156
- "line": 76
3156
+ "line": 77
3157
3157
  },
3158
3158
  "name": "detectorKey",
3159
3159
  "optional": true,
@@ -3171,7 +3171,7 @@
3171
3171
  "immutable": true,
3172
3172
  "locationInModule": {
3173
3173
  "filename": "lib/detector-model.ts",
3174
- "line": 44
3174
+ "line": 45
3175
3175
  },
3176
3176
  "name": "detectorModelName",
3177
3177
  "optional": true,
@@ -3190,7 +3190,7 @@
3190
3190
  "immutable": true,
3191
3191
  "locationInModule": {
3192
3192
  "filename": "lib/detector-model.ts",
3193
- "line": 63
3193
+ "line": 64
3194
3194
  },
3195
3195
  "name": "evaluationMethod",
3196
3196
  "optional": true,
@@ -3208,7 +3208,7 @@
3208
3208
  "immutable": true,
3209
3209
  "locationInModule": {
3210
3210
  "filename": "lib/detector-model.ts",
3211
- "line": 88
3211
+ "line": 89
3212
3212
  },
3213
3213
  "name": "role",
3214
3214
  "optional": true,
@@ -3281,7 +3281,7 @@
3281
3281
  "custom": {
3282
3282
  "exampleMetadata": "infused"
3283
3283
  },
3284
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\n});",
3284
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
3285
3285
  "stability": "experimental",
3286
3286
  "summary": "Information about the order in which events are evaluated and how actions are executed."
3287
3287
  },
@@ -3295,14 +3295,14 @@
3295
3295
  {
3296
3296
  "docs": {
3297
3297
  "stability": "experimental",
3298
- "summary": "When setting to SERIAL, variables are updated and event conditions are evaluated in the order that the events are defined."
3298
+ "summary": "When setting to BATCH, variables within a state are updated and events within a state are performed only after all event conditions are evaluated."
3299
3299
  },
3300
3300
  "name": "BATCH"
3301
3301
  },
3302
3302
  {
3303
3303
  "docs": {
3304
3304
  "stability": "experimental",
3305
- "summary": "When setting to BATCH, variables within a state are updated and events within a state are performed only after all event conditions are evaluated."
3305
+ "summary": "When setting to SERIAL, variables are updated and event conditions are evaluated in the order that the events are defined."
3306
3306
  },
3307
3307
  "name": "SERIAL"
3308
3308
  }
@@ -3317,7 +3317,7 @@
3317
3317
  "custom": {
3318
3318
  "exampleMetadata": "infused"
3319
3319
  },
3320
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\n});",
3320
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
3321
3321
  "see": "https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html",
3322
3322
  "stability": "experimental",
3323
3323
  "summary": "Expression for events in Detector Model state."
@@ -3676,7 +3676,7 @@
3676
3676
  "custom": {
3677
3677
  "exampleMetadata": "infused"
3678
3678
  },
3679
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\n});",
3679
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
3680
3680
  "stability": "experimental",
3681
3681
  "summary": "Defines an AWS IoT Events input in this stack."
3682
3682
  },
@@ -3859,7 +3859,7 @@
3859
3859
  "custom": {
3860
3860
  "exampleMetadata": "infused"
3861
3861
  },
3862
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\n});",
3862
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
3863
3863
  "stability": "experimental",
3864
3864
  "summary": "Properties for defining an AWS IoT Events input."
3865
3865
  },
@@ -3920,7 +3920,7 @@
3920
3920
  "custom": {
3921
3921
  "exampleMetadata": "infused"
3922
3922
  },
3923
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\n});",
3923
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
3924
3924
  "stability": "experimental",
3925
3925
  "summary": "Defines a state of a detector."
3926
3926
  },
@@ -3931,7 +3931,7 @@
3931
3931
  },
3932
3932
  "locationInModule": {
3933
3933
  "filename": "lib/state.ts",
3934
- "line": 31
3934
+ "line": 72
3935
3935
  },
3936
3936
  "parameters": [
3937
3937
  {
@@ -3945,8 +3945,42 @@
3945
3945
  "kind": "class",
3946
3946
  "locationInModule": {
3947
3947
  "filename": "lib/state.ts",
3948
- "line": 25
3948
+ "line": 64
3949
3949
  },
3950
+ "methods": [
3951
+ {
3952
+ "docs": {
3953
+ "remarks": "The transition event will be triggered if condition is evaluated to TRUE.",
3954
+ "stability": "experimental",
3955
+ "summary": "Add a transition event to the state."
3956
+ },
3957
+ "locationInModule": {
3958
+ "filename": "lib/state.ts",
3959
+ "line": 83
3960
+ },
3961
+ "name": "transitionTo",
3962
+ "parameters": [
3963
+ {
3964
+ "docs": {
3965
+ "summary": "the state that will be transit to when the event triggered."
3966
+ },
3967
+ "name": "targetState",
3968
+ "type": {
3969
+ "fqn": "@aws-cdk/aws-iotevents-alpha.State"
3970
+ }
3971
+ },
3972
+ {
3973
+ "docs": {
3974
+ "summary": "transition options including the condition that causes the state transition."
3975
+ },
3976
+ "name": "options",
3977
+ "type": {
3978
+ "fqn": "@aws-cdk/aws-iotevents-alpha.TransitionOptions"
3979
+ }
3980
+ }
3981
+ ]
3982
+ }
3983
+ ],
3950
3984
  "name": "State",
3951
3985
  "properties": [
3952
3986
  {
@@ -3957,7 +3991,7 @@
3957
3991
  "immutable": true,
3958
3992
  "locationInModule": {
3959
3993
  "filename": "lib/state.ts",
3960
- "line": 29
3994
+ "line": 68
3961
3995
  },
3962
3996
  "name": "stateName",
3963
3997
  "type": {
@@ -3974,7 +4008,7 @@
3974
4008
  "custom": {
3975
4009
  "exampleMetadata": "infused"
3976
4010
  },
3977
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst onlineState = new iotevents.State({\n stateName: 'online',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\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: onlineState,\n});",
4011
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
3978
4012
  "stability": "experimental",
3979
4013
  "summary": "Properties for defining a state of a detector."
3980
4014
  },
@@ -3982,7 +4016,7 @@
3982
4016
  "kind": "interface",
3983
4017
  "locationInModule": {
3984
4018
  "filename": "lib/state.ts",
3985
- "line": 7
4019
+ "line": 46
3986
4020
  },
3987
4021
  "name": "StateProps",
3988
4022
  "properties": [
@@ -3995,7 +4029,7 @@
3995
4029
  "immutable": true,
3996
4030
  "locationInModule": {
3997
4031
  "filename": "lib/state.ts",
3998
- "line": 11
4032
+ "line": 50
3999
4033
  },
4000
4034
  "name": "stateName",
4001
4035
  "type": {
@@ -4013,7 +4047,7 @@
4013
4047
  "immutable": true,
4014
4048
  "locationInModule": {
4015
4049
  "filename": "lib/state.ts",
4016
- "line": 19
4050
+ "line": 58
4017
4051
  },
4018
4052
  "name": "onEnter",
4019
4053
  "optional": true,
@@ -4028,8 +4062,65 @@
4028
4062
  }
4029
4063
  ],
4030
4064
  "symbolId": "lib/state:StateProps"
4065
+ },
4066
+ "@aws-cdk/aws-iotevents-alpha.TransitionOptions": {
4067
+ "assembly": "@aws-cdk/aws-iotevents-alpha",
4068
+ "datatype": true,
4069
+ "docs": {
4070
+ "custom": {
4071
+ "exampleMetadata": "infused"
4072
+ },
4073
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\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-event',\n condition: iotevents.Expression.currentInput(input),\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 10\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('10'),\n ),\n});\n// transit to warmState when temperature is 20\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.eq(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('20'),\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});",
4074
+ "stability": "experimental",
4075
+ "summary": "Properties for options of state transition."
4076
+ },
4077
+ "fqn": "@aws-cdk/aws-iotevents-alpha.TransitionOptions",
4078
+ "kind": "interface",
4079
+ "locationInModule": {
4080
+ "filename": "lib/state.ts",
4081
+ "line": 8
4082
+ },
4083
+ "name": "TransitionOptions",
4084
+ "properties": [
4085
+ {
4086
+ "abstract": true,
4087
+ "docs": {
4088
+ "remarks": "When this was evaluated to TRUE, the state transition and the actions are triggered.",
4089
+ "stability": "experimental",
4090
+ "summary": "The condition that is used to determine to cause the state transition and the actions."
4091
+ },
4092
+ "immutable": true,
4093
+ "locationInModule": {
4094
+ "filename": "lib/state.ts",
4095
+ "line": 20
4096
+ },
4097
+ "name": "when",
4098
+ "type": {
4099
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
4100
+ }
4101
+ },
4102
+ {
4103
+ "abstract": true,
4104
+ "docs": {
4105
+ "default": "string combining the names of the States as `${originStateName}_to_${targetStateName}`",
4106
+ "stability": "experimental",
4107
+ "summary": "The name of the event."
4108
+ },
4109
+ "immutable": true,
4110
+ "locationInModule": {
4111
+ "filename": "lib/state.ts",
4112
+ "line": 14
4113
+ },
4114
+ "name": "eventName",
4115
+ "optional": true,
4116
+ "type": {
4117
+ "primitive": "string"
4118
+ }
4119
+ }
4120
+ ],
4121
+ "symbolId": "lib/state:TransitionOptions"
4031
4122
  }
4032
4123
  },
4033
- "version": "2.11.0-alpha.0",
4124
+ "version": "2.14.0-alpha.0",
4034
4125
  "fingerprint": "**********"
4035
4126
  }