Skip to content
v2.274.0

AlarmStatusWidgetSortBy Enum ​

The sort possibilities for AlarmStatusWidgets.

Example ​

ts
declare const dashboard: cloudwatch.Dashboard;
declare const errorAlarm: cloudwatch.Alarm;

dashboard.addWidgets(new cloudwatch.AlarmStatusWidget({
  title: "Errors",
  alarms: [errorAlarm],
  sortBy: cloudwatch.AlarmStatusWidgetSortBy.STATE_UPDATED_TIMESTAMP,
  states: [cloudwatch.AlarmState.ALARM],
}));

Members ​

MemberDescription
DEFAULTChoose DEFAULT to sort them in alphabetical order by alarm name.
STATE_UPDATED_TIMESTAMPChoose STATE_UPDATED_TIMESTAMP to sort them first by alarm state, with alarms in ALARM state first, INSUFFICIENT_DATA alarms next, and OK alarms last.
TIMESTAMPChoose TIMESTAMP to sort them by the time when the alarms most recently changed state, no matter the current alarm state.

Referenced by ​