@aws-cdk/aws-iotevents-alpha 2.15.0-alpha.0 → 2.16.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.15.0",
11
+ "aws-cdk-lib": "^2.16.0",
12
12
  "constructs": "^10.0.0"
13
13
  },
14
14
  "dependencyClosure": {
@@ -2955,7 +2955,7 @@
2955
2955
  },
2956
2956
  "name": "@aws-cdk/aws-iotevents-alpha",
2957
2957
  "readme": {
2958
- "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"
2958
+ "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\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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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"
2959
2959
  },
2960
2960
  "repository": {
2961
2961
  "directory": "packages/individual-packages/aws-iotevents",
@@ -2993,6 +2993,82 @@
2993
2993
  }
2994
2994
  },
2995
2995
  "types": {
2996
+ "@aws-cdk/aws-iotevents-alpha.ActionBindOptions": {
2997
+ "assembly": "@aws-cdk/aws-iotevents-alpha",
2998
+ "datatype": true,
2999
+ "docs": {
3000
+ "stability": "experimental",
3001
+ "summary": "Options when binding a Action to a detector model.",
3002
+ "example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as iotevents_alpha from '@aws-cdk/aws-iotevents-alpha';\nimport { aws_iam as iam } from 'aws-cdk-lib';\n\ndeclare const role: iam.Role;\nconst actionBindOptions: iotevents_alpha.ActionBindOptions = {\n role: role,\n};",
3003
+ "custom": {
3004
+ "exampleMetadata": "fixture=_generated"
3005
+ }
3006
+ },
3007
+ "fqn": "@aws-cdk/aws-iotevents-alpha.ActionBindOptions",
3008
+ "kind": "interface",
3009
+ "locationInModule": {
3010
+ "filename": "lib/action.ts",
3011
+ "line": 8
3012
+ },
3013
+ "name": "ActionBindOptions",
3014
+ "properties": [
3015
+ {
3016
+ "abstract": true,
3017
+ "docs": {
3018
+ "stability": "experimental",
3019
+ "summary": "The IAM role assumed by IoT Events to perform the action."
3020
+ },
3021
+ "immutable": true,
3022
+ "locationInModule": {
3023
+ "filename": "lib/action.ts",
3024
+ "line": 12
3025
+ },
3026
+ "name": "role",
3027
+ "type": {
3028
+ "fqn": "aws-cdk-lib.aws_iam.IRole"
3029
+ }
3030
+ }
3031
+ ],
3032
+ "symbolId": "lib/action:ActionBindOptions"
3033
+ },
3034
+ "@aws-cdk/aws-iotevents-alpha.ActionConfig": {
3035
+ "assembly": "@aws-cdk/aws-iotevents-alpha",
3036
+ "datatype": true,
3037
+ "docs": {
3038
+ "stability": "experimental",
3039
+ "summary": "Properties for a AWS IoT Events action.",
3040
+ "example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as iotevents_alpha from '@aws-cdk/aws-iotevents-alpha';\nconst actionConfig: iotevents_alpha.ActionConfig = {\n configuration: {\n clearTimer: {\n timerName: 'timerName',\n },\n dynamoDb: {\n hashKeyField: 'hashKeyField',\n hashKeyValue: 'hashKeyValue',\n tableName: 'tableName',\n\n // the properties below are optional\n hashKeyType: 'hashKeyType',\n operation: 'operation',\n payload: {\n contentExpression: 'contentExpression',\n type: 'type',\n },\n payloadField: 'payloadField',\n rangeKeyField: 'rangeKeyField',\n rangeKeyType: 'rangeKeyType',\n rangeKeyValue: 'rangeKeyValue',\n },\n dynamoDBv2: {\n tableName: 'tableName',\n\n // the properties below are optional\n payload: {\n contentExpression: 'contentExpression',\n type: 'type',\n },\n },\n firehose: {\n deliveryStreamName: 'deliveryStreamName',\n\n // the properties below are optional\n payload: {\n contentExpression: 'contentExpression',\n type: 'type',\n },\n separator: 'separator',\n },\n iotEvents: {\n inputName: 'inputName',\n\n // the properties below are optional\n payload: {\n contentExpression: 'contentExpression',\n type: 'type',\n },\n },\n iotSiteWise: {\n propertyValue: {\n value: {\n booleanValue: 'booleanValue',\n doubleValue: 'doubleValue',\n integerValue: 'integerValue',\n stringValue: 'stringValue',\n },\n\n // the properties below are optional\n quality: 'quality',\n timestamp: {\n timeInSeconds: 'timeInSeconds',\n\n // the properties below are optional\n offsetInNanos: 'offsetInNanos',\n },\n },\n\n // the properties below are optional\n assetId: 'assetId',\n entryId: 'entryId',\n propertyAlias: 'propertyAlias',\n propertyId: 'propertyId',\n },\n iotTopicPublish: {\n mqttTopic: 'mqttTopic',\n\n // the properties below are optional\n payload: {\n contentExpression: 'contentExpression',\n type: 'type',\n },\n },\n lambda: {\n functionArn: 'functionArn',\n\n // the properties below are optional\n payload: {\n contentExpression: 'contentExpression',\n type: 'type',\n },\n },\n resetTimer: {\n timerName: 'timerName',\n },\n setTimer: {\n timerName: 'timerName',\n\n // the properties below are optional\n durationExpression: 'durationExpression',\n seconds: 123,\n },\n setVariable: {\n value: 'value',\n variableName: 'variableName',\n },\n sns: {\n targetArn: 'targetArn',\n\n // the properties below are optional\n payload: {\n contentExpression: 'contentExpression',\n type: 'type',\n },\n },\n sqs: {\n queueUrl: 'queueUrl',\n\n // the properties below are optional\n payload: {\n contentExpression: 'contentExpression',\n type: 'type',\n },\n useBase64: false,\n },\n },\n};",
3041
+ "custom": {
3042
+ "exampleMetadata": "fixture=_generated"
3043
+ }
3044
+ },
3045
+ "fqn": "@aws-cdk/aws-iotevents-alpha.ActionConfig",
3046
+ "kind": "interface",
3047
+ "locationInModule": {
3048
+ "filename": "lib/action.ts",
3049
+ "line": 28
3050
+ },
3051
+ "name": "ActionConfig",
3052
+ "properties": [
3053
+ {
3054
+ "abstract": true,
3055
+ "docs": {
3056
+ "stability": "experimental",
3057
+ "summary": "The configuration for this action."
3058
+ },
3059
+ "immutable": true,
3060
+ "locationInModule": {
3061
+ "filename": "lib/action.ts",
3062
+ "line": 32
3063
+ },
3064
+ "name": "configuration",
3065
+ "type": {
3066
+ "fqn": "aws-cdk-lib.aws_iotevents.CfnDetectorModel.ActionProperty"
3067
+ }
3068
+ }
3069
+ ],
3070
+ "symbolId": "lib/action:ActionConfig"
3071
+ },
2996
3072
  "@aws-cdk/aws-iotevents-alpha.DetectorModel": {
2997
3073
  "assembly": "@aws-cdk/aws-iotevents-alpha",
2998
3074
  "base": "aws-cdk-lib.Resource",
@@ -3000,7 +3076,7 @@
3000
3076
  "custom": {
3001
3077
  "exampleMetadata": "infused"
3002
3078
  },
3003
- "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});",
3079
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
3004
3080
  "stability": "experimental",
3005
3081
  "summary": "Defines an AWS IoT Events detector model in this stack."
3006
3082
  },
@@ -3109,7 +3185,7 @@
3109
3185
  "custom": {
3110
3186
  "exampleMetadata": "infused"
3111
3187
  },
3112
- "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});",
3188
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
3113
3189
  "stability": "experimental",
3114
3190
  "summary": "Properties for defining an AWS IoT Events detector model."
3115
3191
  },
@@ -3237,8 +3313,8 @@
3237
3313
  "datatype": true,
3238
3314
  "docs": {
3239
3315
  "stability": "experimental",
3240
- "summary": "Specifies the actions to be performed when the condition evaluates to TRUE.",
3241
- "example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as iotevents_alpha from '@aws-cdk/aws-iotevents-alpha';\n\ndeclare const expression: iotevents_alpha.Expression;\nconst event: iotevents_alpha.Event = {\n eventName: 'eventName',\n\n // the properties below are optional\n condition: expression,\n};",
3316
+ "summary": "Specifies the actions to be performed when the condition evaluates to `true`.",
3317
+ "example": "// The code below shows an example of how to instantiate this type.\n// The values are placeholders you should change.\nimport * as iotevents_alpha from '@aws-cdk/aws-iotevents-alpha';\n\ndeclare const action: iotevents_alpha.IAction;\ndeclare const expression: iotevents_alpha.Expression;\nconst event: iotevents_alpha.Event = {\n eventName: 'eventName',\n\n // the properties below are optional\n actions: [action],\n condition: expression,\n};",
3242
3318
  "custom": {
3243
3319
  "exampleMetadata": "fixture=_generated"
3244
3320
  }
@@ -3247,7 +3323,7 @@
3247
3323
  "kind": "interface",
3248
3324
  "locationInModule": {
3249
3325
  "filename": "lib/event.ts",
3250
- "line": 6
3326
+ "line": 7
3251
3327
  },
3252
3328
  "name": "Event",
3253
3329
  "properties": [
@@ -3260,24 +3336,47 @@
3260
3336
  "immutable": true,
3261
3337
  "locationInModule": {
3262
3338
  "filename": "lib/event.ts",
3263
- "line": 10
3339
+ "line": 11
3264
3340
  },
3265
3341
  "name": "eventName",
3266
3342
  "type": {
3267
3343
  "primitive": "string"
3268
3344
  }
3269
3345
  },
3346
+ {
3347
+ "abstract": true,
3348
+ "docs": {
3349
+ "default": "- no actions will be performed",
3350
+ "stability": "experimental",
3351
+ "summary": "The actions to be performed."
3352
+ },
3353
+ "immutable": true,
3354
+ "locationInModule": {
3355
+ "filename": "lib/event.ts",
3356
+ "line": 25
3357
+ },
3358
+ "name": "actions",
3359
+ "optional": true,
3360
+ "type": {
3361
+ "collection": {
3362
+ "elementtype": {
3363
+ "fqn": "@aws-cdk/aws-iotevents-alpha.IAction"
3364
+ },
3365
+ "kind": "array"
3366
+ }
3367
+ }
3368
+ },
3270
3369
  {
3271
3370
  "abstract": true,
3272
3371
  "docs": {
3273
3372
  "default": "- none (the actions are always executed)",
3274
3373
  "stability": "experimental",
3275
- "summary": "The Boolean expression that, when TRUE, causes the actions to be performed."
3374
+ "summary": "The Boolean expression that, when `true`, causes the actions to be performed."
3276
3375
  },
3277
3376
  "immutable": true,
3278
3377
  "locationInModule": {
3279
3378
  "filename": "lib/event.ts",
3280
- "line": 17
3379
+ "line": 18
3281
3380
  },
3282
3381
  "name": "condition",
3283
3382
  "optional": true,
@@ -3294,7 +3393,7 @@
3294
3393
  "custom": {
3295
3394
  "exampleMetadata": "infused"
3296
3395
  },
3297
- "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});",
3396
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
3298
3397
  "stability": "experimental",
3299
3398
  "summary": "Information about the order in which events are evaluated and how actions are executed."
3300
3399
  },
@@ -3330,7 +3429,7 @@
3330
3429
  "custom": {
3331
3430
  "exampleMetadata": "infused"
3332
3431
  },
3333
- "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});",
3432
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
3334
3433
  "see": "https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html",
3335
3434
  "stability": "experimental",
3336
3435
  "summary": "Expression for events in Detector Model state."
@@ -3516,6 +3615,54 @@
3516
3615
  "name": "Expression",
3517
3616
  "symbolId": "lib/expression:Expression"
3518
3617
  },
3618
+ "@aws-cdk/aws-iotevents-alpha.IAction": {
3619
+ "assembly": "@aws-cdk/aws-iotevents-alpha",
3620
+ "docs": {
3621
+ "stability": "experimental",
3622
+ "summary": "An abstract action for DetectorModel."
3623
+ },
3624
+ "fqn": "@aws-cdk/aws-iotevents-alpha.IAction",
3625
+ "kind": "interface",
3626
+ "locationInModule": {
3627
+ "filename": "lib/action.ts",
3628
+ "line": 18
3629
+ },
3630
+ "methods": [
3631
+ {
3632
+ "abstract": true,
3633
+ "docs": {
3634
+ "stability": "experimental",
3635
+ "summary": "Returns the AWS IoT Events action specification."
3636
+ },
3637
+ "locationInModule": {
3638
+ "filename": "lib/action.ts",
3639
+ "line": 22
3640
+ },
3641
+ "name": "bind",
3642
+ "parameters": [
3643
+ {
3644
+ "name": "scope",
3645
+ "type": {
3646
+ "fqn": "constructs.Construct"
3647
+ }
3648
+ },
3649
+ {
3650
+ "name": "options",
3651
+ "type": {
3652
+ "fqn": "@aws-cdk/aws-iotevents-alpha.ActionBindOptions"
3653
+ }
3654
+ }
3655
+ ],
3656
+ "returns": {
3657
+ "type": {
3658
+ "fqn": "@aws-cdk/aws-iotevents-alpha.ActionConfig"
3659
+ }
3660
+ }
3661
+ }
3662
+ ],
3663
+ "name": "IAction",
3664
+ "symbolId": "lib/action:IAction"
3665
+ },
3519
3666
  "@aws-cdk/aws-iotevents-alpha.IDetectorModel": {
3520
3667
  "assembly": "@aws-cdk/aws-iotevents-alpha",
3521
3668
  "docs": {
@@ -3689,7 +3836,7 @@
3689
3836
  "custom": {
3690
3837
  "exampleMetadata": "infused"
3691
3838
  },
3692
- "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});",
3839
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
3693
3840
  "stability": "experimental",
3694
3841
  "summary": "Defines an AWS IoT Events input in this stack."
3695
3842
  },
@@ -3872,7 +4019,7 @@
3872
4019
  "custom": {
3873
4020
  "exampleMetadata": "infused"
3874
4021
  },
3875
- "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});",
4022
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
3876
4023
  "stability": "experimental",
3877
4024
  "summary": "Properties for defining an AWS IoT Events input."
3878
4025
  },
@@ -3933,7 +4080,7 @@
3933
4080
  "custom": {
3934
4081
  "exampleMetadata": "infused"
3935
4082
  },
3936
- "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});",
4083
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
3937
4084
  "stability": "experimental",
3938
4085
  "summary": "Defines a state of a detector."
3939
4086
  },
@@ -3944,7 +4091,7 @@
3944
4091
  },
3945
4092
  "locationInModule": {
3946
4093
  "filename": "lib/state.ts",
3947
- "line": 72
4094
+ "line": 104
3948
4095
  },
3949
4096
  "parameters": [
3950
4097
  {
@@ -3958,18 +4105,18 @@
3958
4105
  "kind": "class",
3959
4106
  "locationInModule": {
3960
4107
  "filename": "lib/state.ts",
3961
- "line": 64
4108
+ "line": 96
3962
4109
  },
3963
4110
  "methods": [
3964
4111
  {
3965
4112
  "docs": {
3966
- "remarks": "The transition event will be triggered if condition is evaluated to TRUE.",
4113
+ "remarks": "The transition event will be triggered if condition is evaluated to `true`.",
3967
4114
  "stability": "experimental",
3968
4115
  "summary": "Add a transition event to the state."
3969
4116
  },
3970
4117
  "locationInModule": {
3971
4118
  "filename": "lib/state.ts",
3972
- "line": 83
4119
+ "line": 115
3973
4120
  },
3974
4121
  "name": "transitionTo",
3975
4122
  "parameters": [
@@ -4004,7 +4151,7 @@
4004
4151
  "immutable": true,
4005
4152
  "locationInModule": {
4006
4153
  "filename": "lib/state.ts",
4007
- "line": 68
4154
+ "line": 100
4008
4155
  },
4009
4156
  "name": "stateName",
4010
4157
  "type": {
@@ -4021,7 +4168,7 @@
4021
4168
  "custom": {
4022
4169
  "exampleMetadata": "infused"
4023
4170
  },
4024
- "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});",
4171
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
4025
4172
  "stability": "experimental",
4026
4173
  "summary": "Properties for defining a state of a detector."
4027
4174
  },
@@ -4029,7 +4176,7 @@
4029
4176
  "kind": "interface",
4030
4177
  "locationInModule": {
4031
4178
  "filename": "lib/state.ts",
4032
- "line": 46
4179
+ "line": 62
4033
4180
  },
4034
4181
  "name": "StateProps",
4035
4182
  "properties": [
@@ -4042,7 +4189,7 @@
4042
4189
  "immutable": true,
4043
4190
  "locationInModule": {
4044
4191
  "filename": "lib/state.ts",
4045
- "line": 50
4192
+ "line": 66
4046
4193
  },
4047
4194
  "name": "stateName",
4048
4195
  "type": {
@@ -4052,15 +4199,15 @@
4052
4199
  {
4053
4200
  "abstract": true,
4054
4201
  "docs": {
4055
- "default": "- events on enter will not be set",
4056
- "remarks": "the conditions of the events are evaluated when the state is entered.\nIf the condition is `TRUE`, the actions of the event are performed.",
4202
+ "default": "- no events will trigger on entering this state",
4203
+ "remarks": "The conditions of the events will be evaluated when entering this state.\nIf the condition of the event evaluates to `true`, the actions of the event will be executed.",
4057
4204
  "stability": "experimental",
4058
4205
  "summary": "Specifies the events on enter."
4059
4206
  },
4060
4207
  "immutable": true,
4061
4208
  "locationInModule": {
4062
4209
  "filename": "lib/state.ts",
4063
- "line": 58
4210
+ "line": 74
4064
4211
  },
4065
4212
  "name": "onEnter",
4066
4213
  "optional": true,
@@ -4072,6 +4219,54 @@
4072
4219
  "kind": "array"
4073
4220
  }
4074
4221
  }
4222
+ },
4223
+ {
4224
+ "abstract": true,
4225
+ "docs": {
4226
+ "default": "- no events will trigger on exiting this state",
4227
+ "remarks": "The conditions of the events are evaluated when an exiting this state.\nIf the condition evaluates to `true`, the actions of the event will be executed.",
4228
+ "stability": "experimental",
4229
+ "summary": "Specifies the events on exit."
4230
+ },
4231
+ "immutable": true,
4232
+ "locationInModule": {
4233
+ "filename": "lib/state.ts",
4234
+ "line": 90
4235
+ },
4236
+ "name": "onExit",
4237
+ "optional": true,
4238
+ "type": {
4239
+ "collection": {
4240
+ "elementtype": {
4241
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Event"
4242
+ },
4243
+ "kind": "array"
4244
+ }
4245
+ }
4246
+ },
4247
+ {
4248
+ "abstract": true,
4249
+ "docs": {
4250
+ "default": "- no events will trigger on input in this state",
4251
+ "remarks": "The conditions of the events will be evaluated when any input is received.\nIf the condition of the event evaluates to `true`, the actions of the event will be executed.",
4252
+ "stability": "experimental",
4253
+ "summary": "Specifies the events on input."
4254
+ },
4255
+ "immutable": true,
4256
+ "locationInModule": {
4257
+ "filename": "lib/state.ts",
4258
+ "line": 82
4259
+ },
4260
+ "name": "onInput",
4261
+ "optional": true,
4262
+ "type": {
4263
+ "collection": {
4264
+ "elementtype": {
4265
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Event"
4266
+ },
4267
+ "kind": "array"
4268
+ }
4269
+ }
4075
4270
  }
4076
4271
  ],
4077
4272
  "symbolId": "lib/state:StateProps"
@@ -4083,7 +4278,7 @@
4083
4278
  "custom": {
4084
4279
  "exampleMetadata": "infused"
4085
4280
  },
4086
- "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});",
4281
+ "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 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 executing: [new actions.LambdaInvokeAction(func)], // optional\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});",
4087
4282
  "stability": "experimental",
4088
4283
  "summary": "Properties for options of state transition."
4089
4284
  },
@@ -4091,21 +4286,21 @@
4091
4286
  "kind": "interface",
4092
4287
  "locationInModule": {
4093
4288
  "filename": "lib/state.ts",
4094
- "line": 8
4289
+ "line": 10
4095
4290
  },
4096
4291
  "name": "TransitionOptions",
4097
4292
  "properties": [
4098
4293
  {
4099
4294
  "abstract": true,
4100
4295
  "docs": {
4101
- "remarks": "When this was evaluated to TRUE, the state transition and the actions are triggered.",
4296
+ "remarks": "When this was evaluated to `true`, the state transition and the actions are triggered.",
4102
4297
  "stability": "experimental",
4103
4298
  "summary": "The condition that is used to determine to cause the state transition and the actions."
4104
4299
  },
4105
4300
  "immutable": true,
4106
4301
  "locationInModule": {
4107
4302
  "filename": "lib/state.ts",
4108
- "line": 20
4303
+ "line": 22
4109
4304
  },
4110
4305
  "name": "when",
4111
4306
  "type": {
@@ -4122,18 +4317,41 @@
4122
4317
  "immutable": true,
4123
4318
  "locationInModule": {
4124
4319
  "filename": "lib/state.ts",
4125
- "line": 14
4320
+ "line": 16
4126
4321
  },
4127
4322
  "name": "eventName",
4128
4323
  "optional": true,
4129
4324
  "type": {
4130
4325
  "primitive": "string"
4131
4326
  }
4327
+ },
4328
+ {
4329
+ "abstract": true,
4330
+ "docs": {
4331
+ "default": "- no actions will be performed",
4332
+ "stability": "experimental",
4333
+ "summary": "The actions to be performed with the transition."
4334
+ },
4335
+ "immutable": true,
4336
+ "locationInModule": {
4337
+ "filename": "lib/state.ts",
4338
+ "line": 29
4339
+ },
4340
+ "name": "executing",
4341
+ "optional": true,
4342
+ "type": {
4343
+ "collection": {
4344
+ "elementtype": {
4345
+ "fqn": "@aws-cdk/aws-iotevents-alpha.IAction"
4346
+ },
4347
+ "kind": "array"
4348
+ }
4349
+ }
4132
4350
  }
4133
4351
  ],
4134
4352
  "symbolId": "lib/state:TransitionOptions"
4135
4353
  }
4136
4354
  },
4137
- "version": "2.15.0-alpha.0",
4355
+ "version": "2.16.0-alpha.0",
4138
4356
  "fingerprint": "**********"
4139
4357
  }