@aws-cdk/aws-iotevents-alpha 2.15.0-alpha.0 → 2.18.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.18.0",
12
12
  "constructs": "^10.0.0"
13
13
  },
14
14
  "dependencyClosure": {
@@ -378,6 +378,19 @@
378
378
  }
379
379
  }
380
380
  },
381
+ "aws-cdk-lib.aws_billingconductor": {
382
+ "targets": {
383
+ "dotnet": {
384
+ "namespace": "Amazon.CDK.AWS.BillingConductor"
385
+ },
386
+ "java": {
387
+ "package": "software.amazon.awscdk.services.billingconductor"
388
+ },
389
+ "python": {
390
+ "module": "aws_cdk.aws_billingconductor"
391
+ }
392
+ }
393
+ },
381
394
  "aws-cdk-lib.aws_budgets": {
382
395
  "targets": {
383
396
  "dotnet": {
@@ -2043,6 +2056,19 @@
2043
2056
  }
2044
2057
  }
2045
2058
  },
2059
+ "aws-cdk-lib.aws_personalize": {
2060
+ "targets": {
2061
+ "dotnet": {
2062
+ "namespace": "Amazon.CDK.AWS.Personalize"
2063
+ },
2064
+ "java": {
2065
+ "package": "software.amazon.awscdk.services.personalize"
2066
+ },
2067
+ "python": {
2068
+ "module": "aws_cdk.aws_personalize"
2069
+ }
2070
+ }
2071
+ },
2046
2072
  "aws-cdk-lib.aws_pinpoint": {
2047
2073
  "targets": {
2048
2074
  "dotnet": {
@@ -2933,7 +2959,7 @@
2933
2959
  "stability": "experimental"
2934
2960
  },
2935
2961
  "homepage": "https://github.com/aws/aws-cdk",
2936
- "jsiiVersion": "1.54.0 (build b1b977a)",
2962
+ "jsiiVersion": "1.55.1 (build 07d2d90)",
2937
2963
  "keywords": [
2938
2964
  "aws",
2939
2965
  "cdk",
@@ -2955,7 +2981,7 @@
2955
2981
  },
2956
2982
  "name": "@aws-cdk/aws-iotevents-alpha",
2957
2983
  "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"
2984
+ "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
2985
  },
2960
2986
  "repository": {
2961
2987
  "directory": "packages/individual-packages/aws-iotevents",
@@ -2993,6 +3019,82 @@
2993
3019
  }
2994
3020
  },
2995
3021
  "types": {
3022
+ "@aws-cdk/aws-iotevents-alpha.ActionBindOptions": {
3023
+ "assembly": "@aws-cdk/aws-iotevents-alpha",
3024
+ "datatype": true,
3025
+ "docs": {
3026
+ "stability": "experimental",
3027
+ "summary": "Options when binding a Action to a detector model.",
3028
+ "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};",
3029
+ "custom": {
3030
+ "exampleMetadata": "fixture=_generated"
3031
+ }
3032
+ },
3033
+ "fqn": "@aws-cdk/aws-iotevents-alpha.ActionBindOptions",
3034
+ "kind": "interface",
3035
+ "locationInModule": {
3036
+ "filename": "lib/action.ts",
3037
+ "line": 8
3038
+ },
3039
+ "name": "ActionBindOptions",
3040
+ "properties": [
3041
+ {
3042
+ "abstract": true,
3043
+ "docs": {
3044
+ "stability": "experimental",
3045
+ "summary": "The IAM role assumed by IoT Events to perform the action."
3046
+ },
3047
+ "immutable": true,
3048
+ "locationInModule": {
3049
+ "filename": "lib/action.ts",
3050
+ "line": 12
3051
+ },
3052
+ "name": "role",
3053
+ "type": {
3054
+ "fqn": "aws-cdk-lib.aws_iam.IRole"
3055
+ }
3056
+ }
3057
+ ],
3058
+ "symbolId": "lib/action:ActionBindOptions"
3059
+ },
3060
+ "@aws-cdk/aws-iotevents-alpha.ActionConfig": {
3061
+ "assembly": "@aws-cdk/aws-iotevents-alpha",
3062
+ "datatype": true,
3063
+ "docs": {
3064
+ "stability": "experimental",
3065
+ "summary": "Properties for a AWS IoT Events action.",
3066
+ "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};",
3067
+ "custom": {
3068
+ "exampleMetadata": "fixture=_generated"
3069
+ }
3070
+ },
3071
+ "fqn": "@aws-cdk/aws-iotevents-alpha.ActionConfig",
3072
+ "kind": "interface",
3073
+ "locationInModule": {
3074
+ "filename": "lib/action.ts",
3075
+ "line": 28
3076
+ },
3077
+ "name": "ActionConfig",
3078
+ "properties": [
3079
+ {
3080
+ "abstract": true,
3081
+ "docs": {
3082
+ "stability": "experimental",
3083
+ "summary": "The configuration for this action."
3084
+ },
3085
+ "immutable": true,
3086
+ "locationInModule": {
3087
+ "filename": "lib/action.ts",
3088
+ "line": 32
3089
+ },
3090
+ "name": "configuration",
3091
+ "type": {
3092
+ "fqn": "aws-cdk-lib.aws_iotevents.CfnDetectorModel.ActionProperty"
3093
+ }
3094
+ }
3095
+ ],
3096
+ "symbolId": "lib/action:ActionConfig"
3097
+ },
2996
3098
  "@aws-cdk/aws-iotevents-alpha.DetectorModel": {
2997
3099
  "assembly": "@aws-cdk/aws-iotevents-alpha",
2998
3100
  "base": "aws-cdk-lib.Resource",
@@ -3000,7 +3102,7 @@
3000
3102
  "custom": {
3001
3103
  "exampleMetadata": "infused"
3002
3104
  },
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});",
3105
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 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
3106
  "stability": "experimental",
3005
3107
  "summary": "Defines an AWS IoT Events detector model in this stack."
3006
3108
  },
@@ -3109,7 +3211,7 @@
3109
3211
  "custom": {
3110
3212
  "exampleMetadata": "infused"
3111
3213
  },
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});",
3214
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 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
3215
  "stability": "experimental",
3114
3216
  "summary": "Properties for defining an AWS IoT Events detector model."
3115
3217
  },
@@ -3237,8 +3339,8 @@
3237
3339
  "datatype": true,
3238
3340
  "docs": {
3239
3341
  "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};",
3342
+ "summary": "Specifies the actions to be performed when the condition evaluates to `true`.",
3343
+ "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
3344
  "custom": {
3243
3345
  "exampleMetadata": "fixture=_generated"
3244
3346
  }
@@ -3247,7 +3349,7 @@
3247
3349
  "kind": "interface",
3248
3350
  "locationInModule": {
3249
3351
  "filename": "lib/event.ts",
3250
- "line": 6
3352
+ "line": 7
3251
3353
  },
3252
3354
  "name": "Event",
3253
3355
  "properties": [
@@ -3260,24 +3362,47 @@
3260
3362
  "immutable": true,
3261
3363
  "locationInModule": {
3262
3364
  "filename": "lib/event.ts",
3263
- "line": 10
3365
+ "line": 11
3264
3366
  },
3265
3367
  "name": "eventName",
3266
3368
  "type": {
3267
3369
  "primitive": "string"
3268
3370
  }
3269
3371
  },
3372
+ {
3373
+ "abstract": true,
3374
+ "docs": {
3375
+ "default": "- no actions will be performed",
3376
+ "stability": "experimental",
3377
+ "summary": "The actions to be performed."
3378
+ },
3379
+ "immutable": true,
3380
+ "locationInModule": {
3381
+ "filename": "lib/event.ts",
3382
+ "line": 25
3383
+ },
3384
+ "name": "actions",
3385
+ "optional": true,
3386
+ "type": {
3387
+ "collection": {
3388
+ "elementtype": {
3389
+ "fqn": "@aws-cdk/aws-iotevents-alpha.IAction"
3390
+ },
3391
+ "kind": "array"
3392
+ }
3393
+ }
3394
+ },
3270
3395
  {
3271
3396
  "abstract": true,
3272
3397
  "docs": {
3273
3398
  "default": "- none (the actions are always executed)",
3274
3399
  "stability": "experimental",
3275
- "summary": "The Boolean expression that, when TRUE, causes the actions to be performed."
3400
+ "summary": "The Boolean expression that, when `true`, causes the actions to be performed."
3276
3401
  },
3277
3402
  "immutable": true,
3278
3403
  "locationInModule": {
3279
3404
  "filename": "lib/event.ts",
3280
- "line": 17
3405
+ "line": 18
3281
3406
  },
3282
3407
  "name": "condition",
3283
3408
  "optional": true,
@@ -3294,7 +3419,7 @@
3294
3419
  "custom": {
3295
3420
  "exampleMetadata": "infused"
3296
3421
  },
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});",
3422
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 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
3423
  "stability": "experimental",
3299
3424
  "summary": "Information about the order in which events are evaluated and how actions are executed."
3300
3425
  },
@@ -3330,7 +3455,7 @@
3330
3455
  "custom": {
3331
3456
  "exampleMetadata": "infused"
3332
3457
  },
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});",
3458
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});",
3334
3459
  "see": "https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html",
3335
3460
  "stability": "experimental",
3336
3461
  "summary": "Expression for events in Detector Model state."
@@ -3516,6 +3641,54 @@
3516
3641
  "name": "Expression",
3517
3642
  "symbolId": "lib/expression:Expression"
3518
3643
  },
3644
+ "@aws-cdk/aws-iotevents-alpha.IAction": {
3645
+ "assembly": "@aws-cdk/aws-iotevents-alpha",
3646
+ "docs": {
3647
+ "stability": "experimental",
3648
+ "summary": "An abstract action for DetectorModel."
3649
+ },
3650
+ "fqn": "@aws-cdk/aws-iotevents-alpha.IAction",
3651
+ "kind": "interface",
3652
+ "locationInModule": {
3653
+ "filename": "lib/action.ts",
3654
+ "line": 18
3655
+ },
3656
+ "methods": [
3657
+ {
3658
+ "abstract": true,
3659
+ "docs": {
3660
+ "stability": "experimental",
3661
+ "summary": "Returns the AWS IoT Events action specification."
3662
+ },
3663
+ "locationInModule": {
3664
+ "filename": "lib/action.ts",
3665
+ "line": 22
3666
+ },
3667
+ "name": "bind",
3668
+ "parameters": [
3669
+ {
3670
+ "name": "scope",
3671
+ "type": {
3672
+ "fqn": "constructs.Construct"
3673
+ }
3674
+ },
3675
+ {
3676
+ "name": "options",
3677
+ "type": {
3678
+ "fqn": "@aws-cdk/aws-iotevents-alpha.ActionBindOptions"
3679
+ }
3680
+ }
3681
+ ],
3682
+ "returns": {
3683
+ "type": {
3684
+ "fqn": "@aws-cdk/aws-iotevents-alpha.ActionConfig"
3685
+ }
3686
+ }
3687
+ }
3688
+ ],
3689
+ "name": "IAction",
3690
+ "symbolId": "lib/action:IAction"
3691
+ },
3519
3692
  "@aws-cdk/aws-iotevents-alpha.IDetectorModel": {
3520
3693
  "assembly": "@aws-cdk/aws-iotevents-alpha",
3521
3694
  "docs": {
@@ -3689,7 +3862,7 @@
3689
3862
  "custom": {
3690
3863
  "exampleMetadata": "infused"
3691
3864
  },
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});",
3865
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 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
3866
  "stability": "experimental",
3694
3867
  "summary": "Defines an AWS IoT Events input in this stack."
3695
3868
  },
@@ -3872,7 +4045,7 @@
3872
4045
  "custom": {
3873
4046
  "exampleMetadata": "infused"
3874
4047
  },
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});",
4048
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 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
4049
  "stability": "experimental",
3877
4050
  "summary": "Properties for defining an AWS IoT Events input."
3878
4051
  },
@@ -3933,7 +4106,7 @@
3933
4106
  "custom": {
3934
4107
  "exampleMetadata": "infused"
3935
4108
  },
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});",
4109
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});",
3937
4110
  "stability": "experimental",
3938
4111
  "summary": "Defines a state of a detector."
3939
4112
  },
@@ -3944,7 +4117,7 @@
3944
4117
  },
3945
4118
  "locationInModule": {
3946
4119
  "filename": "lib/state.ts",
3947
- "line": 72
4120
+ "line": 104
3948
4121
  },
3949
4122
  "parameters": [
3950
4123
  {
@@ -3958,18 +4131,18 @@
3958
4131
  "kind": "class",
3959
4132
  "locationInModule": {
3960
4133
  "filename": "lib/state.ts",
3961
- "line": 64
4134
+ "line": 96
3962
4135
  },
3963
4136
  "methods": [
3964
4137
  {
3965
4138
  "docs": {
3966
- "remarks": "The transition event will be triggered if condition is evaluated to TRUE.",
4139
+ "remarks": "The transition event will be triggered if condition is evaluated to `true`.",
3967
4140
  "stability": "experimental",
3968
4141
  "summary": "Add a transition event to the state."
3969
4142
  },
3970
4143
  "locationInModule": {
3971
4144
  "filename": "lib/state.ts",
3972
- "line": 83
4145
+ "line": 115
3973
4146
  },
3974
4147
  "name": "transitionTo",
3975
4148
  "parameters": [
@@ -4004,7 +4177,7 @@
4004
4177
  "immutable": true,
4005
4178
  "locationInModule": {
4006
4179
  "filename": "lib/state.ts",
4007
- "line": 68
4180
+ "line": 100
4008
4181
  },
4009
4182
  "name": "stateName",
4010
4183
  "type": {
@@ -4021,7 +4194,7 @@
4021
4194
  "custom": {
4022
4195
  "exampleMetadata": "infused"
4023
4196
  },
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});",
4197
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\n\ndeclare const input: iotevents.IInput;\n\nconst state = new iotevents.State({\n stateName: 'MyState',\n onEnter: [{\n eventName: 'test-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [\n actions: [\n new actions.SetVariableAction(\n 'MyVariable',\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n ),\n ],\n ],\n }],\n});",
4025
4198
  "stability": "experimental",
4026
4199
  "summary": "Properties for defining a state of a detector."
4027
4200
  },
@@ -4029,7 +4202,7 @@
4029
4202
  "kind": "interface",
4030
4203
  "locationInModule": {
4031
4204
  "filename": "lib/state.ts",
4032
- "line": 46
4205
+ "line": 62
4033
4206
  },
4034
4207
  "name": "StateProps",
4035
4208
  "properties": [
@@ -4042,7 +4215,7 @@
4042
4215
  "immutable": true,
4043
4216
  "locationInModule": {
4044
4217
  "filename": "lib/state.ts",
4045
- "line": 50
4218
+ "line": 66
4046
4219
  },
4047
4220
  "name": "stateName",
4048
4221
  "type": {
@@ -4052,15 +4225,15 @@
4052
4225
  {
4053
4226
  "abstract": true,
4054
4227
  "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.",
4228
+ "default": "- no events will trigger on entering this state",
4229
+ "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
4230
  "stability": "experimental",
4058
4231
  "summary": "Specifies the events on enter."
4059
4232
  },
4060
4233
  "immutable": true,
4061
4234
  "locationInModule": {
4062
4235
  "filename": "lib/state.ts",
4063
- "line": 58
4236
+ "line": 74
4064
4237
  },
4065
4238
  "name": "onEnter",
4066
4239
  "optional": true,
@@ -4072,6 +4245,54 @@
4072
4245
  "kind": "array"
4073
4246
  }
4074
4247
  }
4248
+ },
4249
+ {
4250
+ "abstract": true,
4251
+ "docs": {
4252
+ "default": "- no events will trigger on exiting this state",
4253
+ "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.",
4254
+ "stability": "experimental",
4255
+ "summary": "Specifies the events on exit."
4256
+ },
4257
+ "immutable": true,
4258
+ "locationInModule": {
4259
+ "filename": "lib/state.ts",
4260
+ "line": 90
4261
+ },
4262
+ "name": "onExit",
4263
+ "optional": true,
4264
+ "type": {
4265
+ "collection": {
4266
+ "elementtype": {
4267
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Event"
4268
+ },
4269
+ "kind": "array"
4270
+ }
4271
+ }
4272
+ },
4273
+ {
4274
+ "abstract": true,
4275
+ "docs": {
4276
+ "default": "- no events will trigger on input in this state",
4277
+ "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.",
4278
+ "stability": "experimental",
4279
+ "summary": "Specifies the events on input."
4280
+ },
4281
+ "immutable": true,
4282
+ "locationInModule": {
4283
+ "filename": "lib/state.ts",
4284
+ "line": 82
4285
+ },
4286
+ "name": "onInput",
4287
+ "optional": true,
4288
+ "type": {
4289
+ "collection": {
4290
+ "elementtype": {
4291
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Event"
4292
+ },
4293
+ "kind": "array"
4294
+ }
4295
+ }
4075
4296
  }
4076
4297
  ],
4077
4298
  "symbolId": "lib/state:StateProps"
@@ -4083,7 +4304,7 @@
4083
4304
  "custom": {
4084
4305
  "exampleMetadata": "infused"
4085
4306
  },
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});",
4307
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is 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
4308
  "stability": "experimental",
4088
4309
  "summary": "Properties for options of state transition."
4089
4310
  },
@@ -4091,21 +4312,21 @@
4091
4312
  "kind": "interface",
4092
4313
  "locationInModule": {
4093
4314
  "filename": "lib/state.ts",
4094
- "line": 8
4315
+ "line": 10
4095
4316
  },
4096
4317
  "name": "TransitionOptions",
4097
4318
  "properties": [
4098
4319
  {
4099
4320
  "abstract": true,
4100
4321
  "docs": {
4101
- "remarks": "When this was evaluated to TRUE, the state transition and the actions are triggered.",
4322
+ "remarks": "When this was evaluated to `true`, the state transition and the actions are triggered.",
4102
4323
  "stability": "experimental",
4103
4324
  "summary": "The condition that is used to determine to cause the state transition and the actions."
4104
4325
  },
4105
4326
  "immutable": true,
4106
4327
  "locationInModule": {
4107
4328
  "filename": "lib/state.ts",
4108
- "line": 20
4329
+ "line": 22
4109
4330
  },
4110
4331
  "name": "when",
4111
4332
  "type": {
@@ -4122,18 +4343,41 @@
4122
4343
  "immutable": true,
4123
4344
  "locationInModule": {
4124
4345
  "filename": "lib/state.ts",
4125
- "line": 14
4346
+ "line": 16
4126
4347
  },
4127
4348
  "name": "eventName",
4128
4349
  "optional": true,
4129
4350
  "type": {
4130
4351
  "primitive": "string"
4131
4352
  }
4353
+ },
4354
+ {
4355
+ "abstract": true,
4356
+ "docs": {
4357
+ "default": "- no actions will be performed",
4358
+ "stability": "experimental",
4359
+ "summary": "The actions to be performed with the transition."
4360
+ },
4361
+ "immutable": true,
4362
+ "locationInModule": {
4363
+ "filename": "lib/state.ts",
4364
+ "line": 29
4365
+ },
4366
+ "name": "executing",
4367
+ "optional": true,
4368
+ "type": {
4369
+ "collection": {
4370
+ "elementtype": {
4371
+ "fqn": "@aws-cdk/aws-iotevents-alpha.IAction"
4372
+ },
4373
+ "kind": "array"
4374
+ }
4375
+ }
4132
4376
  }
4133
4377
  ],
4134
4378
  "symbolId": "lib/state:TransitionOptions"
4135
4379
  }
4136
4380
  },
4137
- "version": "2.15.0-alpha.0",
4381
+ "version": "2.18.0-alpha.0",
4138
4382
  "fingerprint": "**********"
4139
4383
  }