1import * as cloudwatch from "@distilled.cloud/aws/cloudwatch";
2import * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { AlarmResource } from "./binding-common.ts";
5
6type AlarmResources = [AlarmResource, ...AlarmResource[]];
7
8/**
9 * Runtime binding for `cloudwatch:EnableAlarmActions` — re-enable the
10 * actions of the bound alarms after they were suppressed with
11 * {@link DisableAlarmActions}. Bind it to one or more {@link Alarm} /
12 * {@link CompositeAlarm} resources; the alarm names are injected
13 * automatically.
14 *
15 * Provide `CloudWatch.EnableAlarmActionsHttp` on the hosting Lambda
16 * Function to satisfy the requirement.
17 * ### Managing Alarm Actions
18 * **Example:** Re-enable an Alarm After a Deploy
19 * ```typescript
20 * // init — grants cloudwatch:EnableAlarmActions on the alarm
21 * const enableAlarmActions = yield* AWS.CloudWatch.EnableAlarmActions(alarm);
22 *
23 * // runtime
24 * yield* enableAlarmActions();
25 * ```
26 *
27 * @binding
28 */
29export interface EnableAlarmActions extends Binding.Service<
30 EnableAlarmActions,
31 "AWS.CloudWatch.EnableAlarmActions",
32 (
33 ...alarms: AlarmResources
34 ) => Effect.Effect<
35 () => Effect.Effect<cloudwatch.EnableAlarmActionsResponse, any>
36 >
37> {}
38
39export const EnableAlarmActions = Binding.Service<EnableAlarmActions>(
40 "AWS.CloudWatch.EnableAlarmActions",
41);