(cloudwatch): AlarmWidget should accept additional props sortBy and states #19386
Closed
1 of 2 tasks
Labels
@aws-cdk/aws-cloudwatch
Related to Amazon CloudWatch
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Description
At the moment it's not possible to set the following properties
sortBy
Specifies how to sort the alarms in the widget.
Choose default to sort them in alphabetical order by alarm name.
Choose stateUpdatedTimestamp to sort them first by alarm state, with alarms in ALARM state first, INSUFFICIENT_DATA alarms next, and OK alarms last. Within each group, the alarms are sorted by when they last changed state, with more recent state changes listed first.
Choose timestamp to sort them by the time when the alarms most recently changed state, no matter the current alarm state. The alarm that changed state most recently is listed first.
If you omit this field, the alarms are sorted in alphabetical order.
Type: String
Valid Values: default | stateUpdatedTimestamp | timestamp
Required: No
states
Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states. You can specify one or more alarm states in the value for this field. The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK.
If you omit this field or specify an empty array, all the alarms specifed in alarms are displayed.
Type: Array of strings
Required: No
Both should be optional
Use Case
I want to unleash cloudwatch dashboard power
Proposed Solution
add optional props, extend toJSON method
Other information
No response
Acknowledge
The text was updated successfully, but these errors were encountered: