@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, 04:45 UTC

main
ts 45 lines 1.49 KB
Raw
1 import type * as cloudformation from "@distilled.cloud/aws/cloudformation";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Stack } from "./Stack.ts";
5
6 /**
7 * Runtime binding for the `DescribeStackEvents` operation (IAM action
8 * `cloudformation:DescribeStackEvents`).
9 *
10 * Bind this operation to a {@link Stack} to read its event history —
11 * per-resource create/update/delete progress and failure reasons — from
12 * inside a function runtime. Useful for deployment dashboards and failure
13 * alerting. Provide the implementation with
14 * `Effect.provide(AWS.CloudFormation.DescribeStackEventsHttp)`.
15 * ### Reading Stacks
16 * **Example:** Read Recent Stack Events
17 * ```typescript
18 * const describeStackEvents =
19 * yield* AWS.CloudFormation.DescribeStackEvents(stack);
20 *
21 * const { StackEvents } = yield* describeStackEvents();
22 * const failures = (StackEvents ?? []).filter(
23 * (e) => e.ResourceStatus?.endsWith("_FAILED"),
24 * );
25 * ```
26 *
27 * @binding
28 */
29 export interface DescribeStackEvents extends Binding.Service<
30 DescribeStackEvents,
31 "AWS.CloudFormation.DescribeStackEvents",
32 (
33 stack: Stack,
34 ) => Effect.Effect<
35 (
36 request?: Omit<cloudformation.DescribeStackEventsInput, "StackName">,
37 ) => Effect.Effect<
38 cloudformation.DescribeStackEventsOutput,
39 cloudformation.DescribeStackEventsError
40 >
41 >
42 > {}
43 export const DescribeStackEvents = Binding.Service<DescribeStackEvents>(
44 "AWS.CloudFormation.DescribeStackEvents",
45 );