@devries-cameron20 / t3code Mirror · read-only
Fork 0

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

main
ts 39 lines 1.32 KB
Raw
1 import * as cloudwatch from "@distilled.cloud/aws/cloudwatch";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4 import type { AlarmResource } from "./binding-common.ts";
5
6 type 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 */
29 export interface EnableAlarmActions extends Binding.Service<
30 EnableAlarmActions,
31 "AWS.CloudWatch.EnableAlarmActions",
32 (
33 ...alarms: AlarmResources
34 ) => Effect.Effect<() => Effect.Effect<cloudwatch.EnableAlarmActionsResponse, any>>
35 > {}
36
37 export const EnableAlarmActions = Binding.Service<EnableAlarmActions>(
38 "AWS.CloudWatch.EnableAlarmActions",
39 );