AlarmStatusWidgetSortBy

class aws_cdk.aws_cloudwatch.AlarmStatusWidgetSortBy(value)

Bases: Enum

The sort possibilities for AlarmStatusWidgets.

ExampleMetadata:

infused

Example:

# dashboard: cloudwatch.Dashboard
# error_alarm: cloudwatch.Alarm


dashboard.add_widgets(cloudwatch.AlarmStatusWidget(
    title="Errors",
    alarms=[error_alarm],
    sort_by=cloudwatch.AlarmStatusWidgetSortBy.STATE_UPDATED_TIMESTAMP,
    states=[cloudwatch.AlarmState.ALARM]
))

Attributes

DEFAULT

Choose DEFAULT to sort them in alphabetical order by alarm name.

STATE_UPDATED_TIMESTAMP

Choose STATE_UPDATED_TIMESTAMP 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.

TIMESTAMP

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.