Skip to content

(cloudwatch): AlarmWidget should accept additional props sortBy and states #19386

@markussiebert

Description

@markussiebert

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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-cloudwatchRelated to Amazon CloudWatcheffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions