Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new visualization type to the selection when making a panel: AWS IoT TwinMaker Alarm Configuration
To configure this panel you'll need to set it's custom panel config option of Workspace to the workspace you want to pull from in your Grafana TwinMaker Datasource.
For the query select your desired TwinMaker Datasource, add a query, use Get Property Value History by Entity along with the Entity and Component (or template variables for those) that you want. The panel expect the component type to support and query properties of: alarm_status, alarm_threshold, and alarm_notification_recipients. These are support in our beta pre-defined component type: com.amazon.iotsitewise.alarm that isn't publically available yet.
Once configured the panel should display the alarm Id base on the Component Name, Threshold based on the alarm_threshold, and Notification based on alarm_notification-recipients. If testing with AWS IoT Sitewise alarms the values for threshold and notifications are often not updated regularly so a longer query time range may be necessary to generate data. If you get a warning of: missing data then this probably means you need to get data into your time range.
The panel's Edit Alarm button allows you to open a modal that sets a new threshold for you alarm via TwinMakers BatchPutPropertyValues API. The new threshold should update in the Alarm Config Panel, your original datasource, and any Grafana charts you have displaying it's current value.
The TwinMaker workspace role will need the additional permissions in it's policy:
The TwinMaker Dashboard role used with your Grafana Datasource will need the additional permissions in it's policy: