-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(iotevents): support SetVariable action #19305
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @yamatatsu, let's just settle on a good name!
/** | ||
* The action to create a variable with a specified value. | ||
*/ | ||
export class IoteventsSetVariableAction implements iotevents.IAction { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's with the weird name? Why the weird Iotevents
prefix?
I think this should be called just SetVariableAction
.
I could be convinced to IotSetVariableAction
or IotEventsSetVariableAction
, but in my opinion, the Iot
/ IotEvents
prefix doesn't add anything here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny change 🙂.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
This PR implememts `SetVariable` actions. This action allow to set variable to detector instanse. If use this action as following and deploy it: ```ts actions: [ new actions.IoteventsSetVariableAction( 'MyVariable', iotevents.Expression.inputAttribute(input, 'payload.temperature'), ), ], ``` And send message via cli as following: ``` aws iotevents-data batch-put-message --messages=messageId=(date | md5),inputName=test_input,payload=(echo '{"payload":{"deviceId":"000","temperature":18.5}}' | base64) ``` You can see the created detector instanse on web console: ![image](https://user-images.githubusercontent.com/11013683/157444640-c93e4229-ba75-46dd-8d35-cd171fed6145.png) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This PR implememts
SetVariable
actions.This action allow to set variable to detector instanse.
If use this action as following and deploy it:
And send message via cli as following:
You can see the created detector instanse on web console:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license