@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.39 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 `DescribeStacks` operation (IAM action
8 * `cloudformation:DescribeStacks`).
9 *
10 * Bind this operation to a {@link Stack} to read its live status, parameters,
11 * and template outputs from inside a function runtime — the classic
12 * service-discovery pattern of resolving endpoints/ARNs from a stack's
13 * outputs. Provide the implementation with
14 * `Effect.provide(AWS.CloudFormation.DescribeStacksHttp)`.
15 * ### Reading Stacks
16 * **Example:** Read a Stack's Outputs
17 * ```typescript
18 * // init — bind the operation to the stack
19 * const describeStacks = yield* AWS.CloudFormation.DescribeStacks(stack);
20 *
21 * // runtime
22 * const { Stacks } = yield* describeStacks();
23 * const outputs = Stacks?.[0]?.Outputs ?? [];
24 * ```
25 *
26 * @binding
27 */
28 export interface DescribeStacks extends Binding.Service<
29 DescribeStacks,
30 "AWS.CloudFormation.DescribeStacks",
31 (
32 stack: Stack,
33 ) => Effect.Effect<
34 (
35 request?: Omit<cloudformation.DescribeStacksInput, "StackName">,
36 ) => Effect.Effect<cloudformation.DescribeStacksOutput, cloudformation.DescribeStacksError>
37 >
38 > {}
39 export const DescribeStacks = Binding.Service<DescribeStacks>("AWS.CloudFormation.DescribeStacks");