The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import * as cloudwatch from "@distilled.cloud/aws/cloudwatch"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | |
| 5 | export interface DescribeAlarmHistoryRequest extends cloudwatch.DescribeAlarmHistoryInput {} |
| 6 | |
| 7 | /** |
| 8 | * Runtime binding for `cloudwatch:DescribeAlarmHistory` — read state |
| 9 | * transitions and configuration changes recorded for alarms in the |
| 10 | * account/region. |
| 11 | * |
| 12 | * Provide `CloudWatch.DescribeAlarmHistoryHttp` on the hosting Lambda |
| 13 | * Function to satisfy the requirement. |
| 14 | * ### Reading Alarm State |
| 15 | * **Example:** Read an Alarm's Recent History |
| 16 | * ```typescript |
| 17 | * // init — grants cloudwatch:DescribeAlarmHistory |
| 18 | * const describeAlarmHistory = yield* AWS.CloudWatch.DescribeAlarmHistory(); |
| 19 | * |
| 20 | * // runtime |
| 21 | * const result = yield* describeAlarmHistory({ |
| 22 | * AlarmName: yield* alarm.alarmName, |
| 23 | * MaxRecords: 10, |
| 24 | * }); |
| 25 | * const items = result.AlarmHistoryItems ?? []; |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface DescribeAlarmHistory extends Binding.Service< |
| 31 | DescribeAlarmHistory, |
| 32 | "AWS.CloudWatch.DescribeAlarmHistory", |
| 33 | () => Effect.Effect< |
| 34 | ( |
| 35 | request?: DescribeAlarmHistoryRequest, |
| 36 | ) => Effect.Effect<cloudwatch.DescribeAlarmHistoryOutput, cloudwatch.DescribeAlarmHistoryError> |
| 37 | > |
| 38 | > {} |
| 39 | |
| 40 | export const DescribeAlarmHistory = Binding.Service<DescribeAlarmHistory>( |
| 41 | "AWS.CloudWatch.DescribeAlarmHistory", |
| 42 | ); |