Skip to main content

Receipt Detector Model actions for AWS IoT Events

Project description

Actions for AWS::IoTEvents Detector Model

---

cdk-constructs: Experimental

The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


This library contains integration classes to specify actions of state events of Detector Model in @aws-cdk/aws-iotevents. Instances of these classes should be passed to State defined in @aws-cdk/aws-iotevents You can define built-in actions to use a timer or set a variable, or send data to other AWS resources.

This library contains integration classes to use a timer or set a variable, or send data to other AWS resources. AWS IoT Events can trigger actions when it detects a specified event or transition event.

Currently supported are:

  • Set variable to detector instanse
  • Invoke a Lambda function

Set variable to detector instanse

The code snippet below creates an Action that set variable to detector instanse when it is triggered.

# Example automatically generated from non-compiling source. May contain errors.
import aws_cdk.aws_iotevents as iotevents
import aws_cdk.aws_iotevents_actions as actions

# input: iotevents.IInput

state = iotevents.State(
    state_name="MyState",
    on_enter=[iotevents.Event(
        event_name="test-event",
        condition=iotevents.Expression.current_input(input),
        actions=[actions, [
            actions.SetVariableAction("MyVariable",
                iotevents.Expression.input_attribute(input, "payload.temperature"))
        ]
        ]
    )]
)

Invoke a Lambda function

The code snippet below creates an Action that invoke a Lambda function when it is triggered.

import aws_cdk.aws_iotevents as iotevents
import aws_cdk.aws_iotevents_actions as actions
import aws_cdk.aws_lambda as lambda_

# input: iotevents.IInput
# func: lambda.IFunction

state = iotevents.State(
    state_name="MyState",
    on_enter=[iotevents.Event(
        event_name="test-event",
        condition=iotevents.Expression.current_input(input),
        actions=[actions.LambdaInvokeAction(func)]
    )]
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws-cdk.aws-iotevents-actions-1.153.1.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_cdk.aws_iotevents_actions-1.153.1-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

File details

Details for the file aws-cdk.aws-iotevents-actions-1.153.1.tar.gz.

File metadata

  • Download URL: aws-cdk.aws-iotevents-actions-1.153.1.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

File hashes

Hashes for aws-cdk.aws-iotevents-actions-1.153.1.tar.gz
Algorithm Hash digest
SHA256 1f8107d1170e1ef8c20cb6bb0bdb3f57e145c9215575a2a1034830a0ab2f9bd6
MD5 ac4b883a67cf2a1d18a30538d09edfab
BLAKE2b-256 6f73d1a16f2f257a7c38a68ebc04463b54b4b1f10177e6c07c61c4fe3c0eb8cb

See more details on using hashes here.

File details

Details for the file aws_cdk.aws_iotevents_actions-1.153.1-py3-none-any.whl.

File metadata

  • Download URL: aws_cdk.aws_iotevents_actions-1.153.1-py3-none-any.whl
  • Upload date:
  • Size: 27.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

File hashes

Hashes for aws_cdk.aws_iotevents_actions-1.153.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a62748780e23ffa6572f71edde112bcd1c97414e92ac4df289f5e00a2000053d
MD5 396faec0ad85e2150676a214f57c1174
BLAKE2b-256 a4ffa55bc639a74c54115c7b178509fbf027226dd1354f660a103192615ac578

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page