Skip to content

DescribeAlarmHistory

Source: src/AWS/CloudWatch/DescribeAlarmHistory.ts

Runtime binding for cloudwatch:DescribeAlarmHistory — read state transitions and configuration changes recorded for alarms in the account/region.

Provide CloudWatch.DescribeAlarmHistoryHttp on the hosting Lambda Function to satisfy the requirement.

// init — grants cloudwatch:DescribeAlarmHistory
const describeAlarmHistory = yield* AWS.CloudWatch.DescribeAlarmHistory();
// runtime
const result = yield* describeAlarmHistory({
AlarmName: yield* alarm.alarmName,
MaxRecords: 10,
});
const items = result.AlarmHistoryItems ?? [];