| 1 | import * as cloudwatch from "@distilled.cloud/aws/cloudwatch"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import type { AlarmResource } from "./binding-common.ts"; |
| 4 | import { makeCloudWatchResourceHttpBinding } from "./BindingHttp.ts"; |
| 5 | import { SetAlarmState } from "./SetAlarmState.ts"; |
| 6 | |
| 7 | export const SetAlarmStateHttp = Layer.effect( |
| 8 | SetAlarmState, |
| 9 | makeCloudWatchResourceHttpBinding({ |
| 10 | tag: "AWS.CloudWatch.SetAlarmState", |
| 11 | operation: cloudwatch.setAlarmState, |
| 12 | actions: ["cloudwatch:SetAlarmState"], |
| 13 | requestKey: "AlarmName", |
| 14 | identifier: (alarm: AlarmResource) => alarm.alarmName, |
| 15 | resourceArn: (alarm: AlarmResource) => alarm.alarmArn, |
| 16 | }), |
| 17 | ); |