@aws-cdk/aws-iotevents-alpha 2.34.2-alpha.0 → 2.37.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.34.2",
11
+ "aws-cdk-lib": "^2.37.0",
12
12
  "constructs": "^10.0.0"
13
13
  },
14
14
  "dependencyClosure": {
@@ -3024,7 +3024,7 @@
3024
3024
  "stability": "experimental"
3025
3025
  },
3026
3026
  "homepage": "https://github.com/aws/aws-cdk",
3027
- "jsiiVersion": "1.63.0 (build 7c24e36)",
3027
+ "jsiiVersion": "1.63.2 (build a8a8833)",
3028
3028
  "keywords": [
3029
3029
  "aws",
3030
3030
  "cdk",
@@ -3046,7 +3046,7 @@
3046
3046
  },
3047
3047
  "name": "@aws-cdk/aws-iotevents-alpha",
3048
3048
  "readme": {
3049
- "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 less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});\n```\n\nTo grant permissions to put messages in the input,\nyou can use the `grantWrite()` method:\n\n```ts\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\ndeclare const grantable: iam.IGrantable;\nconst input = iotevents.Input.fromInputName(this, 'MyInput', 'my_input');\n\ninput.grantWrite(grantable);\n```\n"
3049
+ "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## `DetectorModel`\n\nThe following example creates an AWS IoT Events detector model to your stack.\nThe detector model need a reference to at least one AWS IoT Events input.\nAWS IoT Events inputs enable the detector to get MQTT payload values from IoT Core rules.\n\nYou can define built-in actions to use a timer or set a variable, or send data to other AWS resources.\nSee also [@aws-cdk/aws-iotevents-actions](https://docs.aws.amazon.com/cdk/api/v1/docs/aws-iotevents-actions-readme.html) for other actions.\n\n```ts\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});\n```\n\nTo grant permissions to put messages in the input,\nyou can use the `grantWrite()` method:\n\n```ts\nimport * as iam from 'aws-cdk-lib/aws-iam';\nimport * as iotevents from '@aws-cdk/aws-iotevents-alpha';\n\ndeclare const grantable: iam.IGrantable;\nconst input = iotevents.Input.fromInputName(this, 'MyInput', 'my_input');\n\ninput.grantWrite(grantable);\n```\n"
3050
3050
  },
3051
3051
  "repository": {
3052
3052
  "directory": "packages/individual-packages/aws-iotevents",
@@ -3137,7 +3137,7 @@
3137
3137
  "kind": "interface",
3138
3138
  "locationInModule": {
3139
3139
  "filename": "lib/action.ts",
3140
- "line": 28
3140
+ "line": 29
3141
3141
  },
3142
3142
  "name": "ActionConfig",
3143
3143
  "properties": [
@@ -3150,7 +3150,7 @@
3150
3150
  "immutable": true,
3151
3151
  "locationInModule": {
3152
3152
  "filename": "lib/action.ts",
3153
- "line": 32
3153
+ "line": 33
3154
3154
  },
3155
3155
  "name": "configuration",
3156
3156
  "type": {
@@ -3520,7 +3520,7 @@
3520
3520
  "custom": {
3521
3521
  "exampleMetadata": "infused"
3522
3522
  },
3523
- "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});",
3523
+ "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 new actions.SetTimerAction('MyTimer', {\n duration: cdk.Duration.seconds(60),\n }),\n ],\n }],\n});",
3524
3524
  "see": "https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html",
3525
3525
  "stability": "experimental",
3526
3526
  "summary": "Expression for events in Detector Model state."
@@ -3532,7 +3532,7 @@
3532
3532
  },
3533
3533
  "locationInModule": {
3534
3534
  "filename": "lib/expression.ts",
3535
- "line": 86
3535
+ "line": 151
3536
3536
  }
3537
3537
  },
3538
3538
  "kind": "class",
@@ -3541,6 +3541,37 @@
3541
3541
  "line": 7
3542
3542
  },
3543
3543
  "methods": [
3544
+ {
3545
+ "docs": {
3546
+ "stability": "experimental",
3547
+ "summary": "Create a expression for the Addition operator."
3548
+ },
3549
+ "locationInModule": {
3550
+ "filename": "lib/expression.ts",
3551
+ "line": 42
3552
+ },
3553
+ "name": "add",
3554
+ "parameters": [
3555
+ {
3556
+ "name": "left",
3557
+ "type": {
3558
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3559
+ }
3560
+ },
3561
+ {
3562
+ "name": "right",
3563
+ "type": {
3564
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3565
+ }
3566
+ }
3567
+ ],
3568
+ "returns": {
3569
+ "type": {
3570
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3571
+ }
3572
+ },
3573
+ "static": true
3574
+ },
3544
3575
  {
3545
3576
  "docs": {
3546
3577
  "stability": "experimental",
@@ -3548,7 +3579,7 @@
3548
3579
  },
3549
3580
  "locationInModule": {
3550
3581
  "filename": "lib/expression.ts",
3551
- "line": 75
3582
+ "line": 140
3552
3583
  },
3553
3584
  "name": "and",
3554
3585
  "parameters": [
@@ -3572,6 +3603,130 @@
3572
3603
  },
3573
3604
  "static": true
3574
3605
  },
3606
+ {
3607
+ "docs": {
3608
+ "stability": "experimental",
3609
+ "summary": "Create a expression for the Bitwise AND operator."
3610
+ },
3611
+ "locationInModule": {
3612
+ "filename": "lib/expression.ts",
3613
+ "line": 84
3614
+ },
3615
+ "name": "bitwiseAnd",
3616
+ "parameters": [
3617
+ {
3618
+ "name": "left",
3619
+ "type": {
3620
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3621
+ }
3622
+ },
3623
+ {
3624
+ "name": "right",
3625
+ "type": {
3626
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3627
+ }
3628
+ }
3629
+ ],
3630
+ "returns": {
3631
+ "type": {
3632
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3633
+ }
3634
+ },
3635
+ "static": true
3636
+ },
3637
+ {
3638
+ "docs": {
3639
+ "stability": "experimental",
3640
+ "summary": "Create a expression for the Bitwise OR operator."
3641
+ },
3642
+ "locationInModule": {
3643
+ "filename": "lib/expression.ts",
3644
+ "line": 77
3645
+ },
3646
+ "name": "bitwiseOr",
3647
+ "parameters": [
3648
+ {
3649
+ "name": "left",
3650
+ "type": {
3651
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3652
+ }
3653
+ },
3654
+ {
3655
+ "name": "right",
3656
+ "type": {
3657
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3658
+ }
3659
+ }
3660
+ ],
3661
+ "returns": {
3662
+ "type": {
3663
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3664
+ }
3665
+ },
3666
+ "static": true
3667
+ },
3668
+ {
3669
+ "docs": {
3670
+ "stability": "experimental",
3671
+ "summary": "Create a expression for the Bitwise XOR operator."
3672
+ },
3673
+ "locationInModule": {
3674
+ "filename": "lib/expression.ts",
3675
+ "line": 91
3676
+ },
3677
+ "name": "bitwiseXor",
3678
+ "parameters": [
3679
+ {
3680
+ "name": "left",
3681
+ "type": {
3682
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3683
+ }
3684
+ },
3685
+ {
3686
+ "name": "right",
3687
+ "type": {
3688
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3689
+ }
3690
+ }
3691
+ ],
3692
+ "returns": {
3693
+ "type": {
3694
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3695
+ }
3696
+ },
3697
+ "static": true
3698
+ },
3699
+ {
3700
+ "docs": {
3701
+ "stability": "experimental",
3702
+ "summary": "Create a expression for the String Concatenation operator."
3703
+ },
3704
+ "locationInModule": {
3705
+ "filename": "lib/expression.ts",
3706
+ "line": 70
3707
+ },
3708
+ "name": "concat",
3709
+ "parameters": [
3710
+ {
3711
+ "name": "left",
3712
+ "type": {
3713
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3714
+ }
3715
+ },
3716
+ {
3717
+ "name": "right",
3718
+ "type": {
3719
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3720
+ }
3721
+ }
3722
+ ],
3723
+ "returns": {
3724
+ "type": {
3725
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3726
+ }
3727
+ },
3728
+ "static": true
3729
+ },
3575
3730
  {
3576
3731
  "docs": {
3577
3732
  "remarks": "It is evaluated to true if the specified input message was received.",
@@ -3598,6 +3753,37 @@
3598
3753
  },
3599
3754
  "static": true
3600
3755
  },
3756
+ {
3757
+ "docs": {
3758
+ "stability": "experimental",
3759
+ "summary": "Create a expression for the Division operator."
3760
+ },
3761
+ "locationInModule": {
3762
+ "filename": "lib/expression.ts",
3763
+ "line": 56
3764
+ },
3765
+ "name": "divide",
3766
+ "parameters": [
3767
+ {
3768
+ "name": "left",
3769
+ "type": {
3770
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3771
+ }
3772
+ },
3773
+ {
3774
+ "name": "right",
3775
+ "type": {
3776
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3777
+ }
3778
+ }
3779
+ ],
3780
+ "returns": {
3781
+ "type": {
3782
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
3783
+ }
3784
+ },
3785
+ "static": true
3786
+ },
3601
3787
  {
3602
3788
  "docs": {
3603
3789
  "stability": "experimental",
@@ -3605,7 +3791,7 @@
3605
3791
  },
3606
3792
  "locationInModule": {
3607
3793
  "filename": "lib/expression.ts",
3608
- "line": 33
3794
+ "line": 98
3609
3795
  },
3610
3796
  "name": "eq",
3611
3797
  "parameters": [
@@ -3661,7 +3847,7 @@
3661
3847
  },
3662
3848
  "locationInModule": {
3663
3849
  "filename": "lib/expression.ts",
3664
- "line": 61
3850
+ "line": 126
3665
3851
  },
3666
3852
  "name": "gt",
3667
3853
  "parameters": [
@@ -3692,7 +3878,7 @@
3692
3878
  },
3693
3879
  "locationInModule": {
3694
3880
  "filename": "lib/expression.ts",
3695
- "line": 68
3881
+ "line": 133
3696
3882
  },
3697
3883
  "name": "gte",
3698
3884
  "parameters": [
@@ -3723,7 +3909,7 @@
3723
3909
  },
3724
3910
  "locationInModule": {
3725
3911
  "filename": "lib/expression.ts",
3726
- "line": 26
3912
+ "line": 35
3727
3913
  },
3728
3914
  "name": "inputAttribute",
3729
3915
  "parameters": [
@@ -3754,7 +3940,7 @@
3754
3940
  },
3755
3941
  "locationInModule": {
3756
3942
  "filename": "lib/expression.ts",
3757
- "line": 47
3943
+ "line": 112
3758
3944
  },
3759
3945
  "name": "lt",
3760
3946
  "parameters": [
@@ -3785,7 +3971,7 @@
3785
3971
  },
3786
3972
  "locationInModule": {
3787
3973
  "filename": "lib/expression.ts",
3788
- "line": 54
3974
+ "line": 119
3789
3975
  },
3790
3976
  "name": "lte",
3791
3977
  "parameters": [
@@ -3809,6 +3995,37 @@
3809
3995
  },
3810
3996
  "static": true
3811
3997
  },
3998
+ {
3999
+ "docs": {
4000
+ "stability": "experimental",
4001
+ "summary": "Create a expression for the Multiplication operator."
4002
+ },
4003
+ "locationInModule": {
4004
+ "filename": "lib/expression.ts",
4005
+ "line": 63
4006
+ },
4007
+ "name": "multiply",
4008
+ "parameters": [
4009
+ {
4010
+ "name": "left",
4011
+ "type": {
4012
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
4013
+ }
4014
+ },
4015
+ {
4016
+ "name": "right",
4017
+ "type": {
4018
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
4019
+ }
4020
+ }
4021
+ ],
4022
+ "returns": {
4023
+ "type": {
4024
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
4025
+ }
4026
+ },
4027
+ "static": true
4028
+ },
3812
4029
  {
3813
4030
  "docs": {
3814
4031
  "stability": "experimental",
@@ -3816,7 +4033,7 @@
3816
4033
  },
3817
4034
  "locationInModule": {
3818
4035
  "filename": "lib/expression.ts",
3819
- "line": 40
4036
+ "line": 105
3820
4037
  },
3821
4038
  "name": "neq",
3822
4039
  "parameters": [
@@ -3847,7 +4064,7 @@
3847
4064
  },
3848
4065
  "locationInModule": {
3849
4066
  "filename": "lib/expression.ts",
3850
- "line": 82
4067
+ "line": 147
3851
4068
  },
3852
4069
  "name": "or",
3853
4070
  "parameters": [
@@ -3871,6 +4088,63 @@
3871
4088
  },
3872
4089
  "static": true
3873
4090
  },
4091
+ {
4092
+ "docs": {
4093
+ "stability": "experimental",
4094
+ "summary": "Create a expression for the Subtraction operator."
4095
+ },
4096
+ "locationInModule": {
4097
+ "filename": "lib/expression.ts",
4098
+ "line": 49
4099
+ },
4100
+ "name": "subtract",
4101
+ "parameters": [
4102
+ {
4103
+ "name": "left",
4104
+ "type": {
4105
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
4106
+ }
4107
+ },
4108
+ {
4109
+ "name": "right",
4110
+ "type": {
4111
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
4112
+ }
4113
+ }
4114
+ ],
4115
+ "returns": {
4116
+ "type": {
4117
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
4118
+ }
4119
+ },
4120
+ "static": true
4121
+ },
4122
+ {
4123
+ "docs": {
4124
+ "remarks": "It is evaluated to true if the specified timer has elapsed.\nYou can define a timer only using the `setTimer` action.",
4125
+ "stability": "experimental",
4126
+ "summary": "Create a expression for function `timeout(\"timer-name\")`."
4127
+ },
4128
+ "locationInModule": {
4129
+ "filename": "lib/expression.ts",
4130
+ "line": 28
4131
+ },
4132
+ "name": "timeout",
4133
+ "parameters": [
4134
+ {
4135
+ "name": "timerName",
4136
+ "type": {
4137
+ "primitive": "string"
4138
+ }
4139
+ }
4140
+ ],
4141
+ "returns": {
4142
+ "type": {
4143
+ "fqn": "@aws-cdk/aws-iotevents-alpha.Expression"
4144
+ }
4145
+ },
4146
+ "static": true
4147
+ },
3874
4148
  {
3875
4149
  "abstract": true,
3876
4150
  "docs": {
@@ -3879,7 +4153,7 @@
3879
4153
  },
3880
4154
  "locationInModule": {
3881
4155
  "filename": "lib/expression.ts",
3882
- "line": 98
4156
+ "line": 163
3883
4157
  },
3884
4158
  "name": "evaluate",
3885
4159
  "parameters": [
@@ -3917,39 +4191,6 @@
3917
4191
  "filename": "lib/action.ts",
3918
4192
  "line": 18
3919
4193
  },
3920
- "methods": [
3921
- {
3922
- "abstract": true,
3923
- "docs": {
3924
- "stability": "experimental",
3925
- "summary": "Returns the AWS IoT Events action specification."
3926
- },
3927
- "locationInModule": {
3928
- "filename": "lib/action.ts",
3929
- "line": 22
3930
- },
3931
- "name": "bind",
3932
- "parameters": [
3933
- {
3934
- "name": "scope",
3935
- "type": {
3936
- "fqn": "constructs.Construct"
3937
- }
3938
- },
3939
- {
3940
- "name": "options",
3941
- "type": {
3942
- "fqn": "@aws-cdk/aws-iotevents-alpha.ActionBindOptions"
3943
- }
3944
- }
3945
- ],
3946
- "returns": {
3947
- "type": {
3948
- "fqn": "@aws-cdk/aws-iotevents-alpha.ActionConfig"
3949
- }
3950
- }
3951
- }
3952
- ],
3953
4194
  "name": "IAction",
3954
4195
  "symbolId": "lib/action:IAction"
3955
4196
  },
@@ -4126,7 +4367,7 @@
4126
4367
  "custom": {
4127
4368
  "exampleMetadata": "infused"
4128
4369
  },
4129
- "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as actions from '@aws-cdk/aws-iotevents-actions-alpha';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\ndeclare const func: lambda.IFunction;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n inputName: 'my_input', // optional\n attributeJsonPaths: ['payload.deviceId', 'payload.temperature'],\n});\n\nconst warmState = new iotevents.State({\n stateName: 'warm',\n onEnter: [{\n eventName: 'test-enter-event',\n condition: iotevents.Expression.currentInput(input),\n actions: [new actions.LambdaInvokeAction(func)], // optional\n }],\n onInput: [{ // optional\n eventName: 'test-input-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n onExit: [{ // optional\n eventName: 'test-exit-event',\n actions: [new actions.LambdaInvokeAction(func)],\n }],\n});\nconst coldState = new iotevents.State({\n stateName: 'cold',\n});\n\n// transit to coldState when temperature is less than 15\nwarmState.transitionTo(coldState, {\n eventName: 'to_coldState', // optional property, default by combining the names of the States\n when: iotevents.Expression.lt(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n executing: [new actions.LambdaInvokeAction(func)], // optional\n});\n// transit to warmState when temperature is greater than or equal to 15\ncoldState.transitionTo(warmState, {\n when: iotevents.Expression.gte(\n iotevents.Expression.inputAttribute(input, 'payload.temperature'),\n iotevents.Expression.fromString('15'),\n ),\n});\n\nnew iotevents.DetectorModel(this, 'MyDetectorModel', {\n detectorModelName: 'test-detector-model', // optional\n description: 'test-detector-model-description', // optional property, default is none\n evaluationMethod: iotevents.EventEvaluation.SERIAL, // optional property, default is iotevents.EventEvaluation.BATCH\n detectorKey: 'payload.deviceId', // optional property, default is none and single detector instance will be created and all inputs will be routed to it\n initialState: warmState,\n});",
4370
+ "example": "import * as iotevents from '@aws-cdk/aws-iotevents-alpha';\nimport * as iam from 'aws-cdk-lib/aws-iam';\n\ndeclare const role: iam.IRole;\n\nconst input = new iotevents.Input(this, 'MyInput', {\n attributeJsonPaths: ['payload.temperature', 'payload.transactionId'],\n});\nconst topicRule = new iot.TopicRule(this, 'TopicRule', {\n sql: iot.IotSql.fromStringAsVer20160323(\n \"SELECT * FROM 'device/+/data'\",\n ),\n actions: [\n new actions.IotEventsPutMessageAction(input, {\n batchMode: true, // optional property, default is 'false'\n messageId: '${payload.transactionId}', // optional property, default is a new UUID\n role: role, // optional property, default is a new UUID\n }),\n ],\n});",
4130
4371
  "stability": "experimental",
4131
4372
  "summary": "Defines an AWS IoT Events input in this stack."
4132
4373
  },
@@ -4370,7 +4611,7 @@
4370
4611
  "custom": {
4371
4612
  "exampleMetadata": "infused"
4372
4613
  },
4373
- "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});",
4614
+ "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 new actions.SetTimerAction('MyTimer', {\n duration: cdk.Duration.seconds(60),\n }),\n ],\n }],\n});",
4374
4615
  "stability": "experimental",
4375
4616
  "summary": "Defines a state of a detector."
4376
4617
  },
@@ -4458,7 +4699,7 @@
4458
4699
  "custom": {
4459
4700
  "exampleMetadata": "infused"
4460
4701
  },
4461
- "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});",
4702
+ "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 new actions.SetTimerAction('MyTimer', {\n duration: cdk.Duration.seconds(60),\n }),\n ],\n }],\n});",
4462
4703
  "stability": "experimental",
4463
4704
  "summary": "Properties for defining a state of a detector."
4464
4705
  },
@@ -4642,6 +4883,6 @@
4642
4883
  "symbolId": "lib/state:TransitionOptions"
4643
4884
  }
4644
4885
  },
4645
- "version": "2.34.2-alpha.0",
4886
+ "version": "2.37.0-alpha.0",
4646
4887
  "fingerprint": "**********"
4647
- }
4888
+ }