Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IotEvents action is missing from Iot CfnTopicRule ActionProperty #7288

Closed
nassahmed opened this issue Apr 10, 2020 · 5 comments
Closed

IotEvents action is missing from Iot CfnTopicRule ActionProperty #7288

nassahmed opened this issue Apr 10, 2020 · 5 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@nassahmed
Copy link

nassahmed commented Apr 10, 2020

When creating an Iot CfnTopicRule, IotEvents is missing as an action property.
This action is declared in cloudformation documentation ( https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iot-topicrule-action.html ) and in cdk documentation https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-iot.CfnTopicRule.html .

Reproduction Steps

Create an iot CfnTopicRule with an IotEvent as an action.

Error Log

Type '{ iotEvents: {}; }' is not assignable to type 'IResolvable | ActionProperty'.
Object literal may only specify known properties, and 'iotEvents' does not exist in type 'IResolvable | ActionProperty'.

Environment

  • CLI Version :
  • Framework Version: 1.32.0
  • OS : WSL (Ubuntu)
  • Language : Typescript

This is 🐛 Bug Report

@nassahmed nassahmed added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 10, 2020
@shivlaks
Copy link
Contributor

@nassahmed can you share some code? - the iotEvents action is modeled as an action property

@nassahmed
Copy link
Author

nassahmed commented Apr 10, 2020

I have seen that its referenced in the documentation but i also saw that its missing inside the node_modules files.

Its probably because of how recent IotEvent is.

    const nctLiveRule = new iot.CfnTopicRule(this, "nctLiveRule", {
      topicRulePayload: {
        actions: [
          {
            kinesis: {
              streamName:
                props.nctLivePositionStream.name || "nctLivePositionStream",
              roleArn: nctLiveRuleRole.roleArn,
              partitionKey: "${newuuid()}",
            },
          },
          {
            iotEvents: {}, // Here is where the error occurs
          },
        ],
        sql: "SELECT * FROM '$aws/rules/nct'",
        ruleDisabled: false,
      },
      ruleName: "nct",
    });

@shivlaks
Copy link
Contributor

shivlaks commented Apr 10, 2020

@nassahmed are you certain you're on 1.32.0 in your package.json?
It was added recently in #7113

@nassahmed
Copy link
Author

After deleting the node_modules and runing an npm update it seems the issue was solved. I looked at the changelog but didnt notice Cloudformation line.
Sorry for this.

@shivlaks
Copy link
Contributor

no worries! glad it works 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants