The best way to control Claude Code, Codex and more from any computer or phone

main
ts 44 lines 1.52 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 `DescribeStackResources` operation (IAM action
8 * `cloudformation:DescribeStackResources`).
9 *
10 * Bind this operation to a {@link Stack} to resolve the physical ids of the
11 * stack's resources — e.g. look up a resource created by the template by its
12 * logical id from inside a function runtime. Provide the implementation with
13 * `Effect.provide(AWS.CloudFormation.DescribeStackResourcesHttp)`.
14 * ### Reading Stack Resources
15 * **Example:** Resolve a Resource's Physical Id
16 * ```typescript
17 * const describeStackResources =
18 * yield* AWS.CloudFormation.DescribeStackResources(stack);
19 *
20 * const { StackResources } = yield* describeStackResources({
21 * LogicalResourceId: "Param",
22 * });
23 * const physicalId = StackResources?.[0]?.PhysicalResourceId;
24 * ```
25 *
26 * @binding
27 */
28 export interface DescribeStackResources extends Binding.Service<
29 DescribeStackResources,
30 "AWS.CloudFormation.DescribeStackResources",
31 (
32 stack: Stack,
33 ) => Effect.Effect<
34 (
35 request?: Omit<cloudformation.DescribeStackResourcesInput, "StackName">,
36 ) => Effect.Effect<
37 cloudformation.DescribeStackResourcesOutput,
38 cloudformation.DescribeStackResourcesError
39 >
40 >
41 > {}
42 export const DescribeStackResources = Binding.Service<DescribeStackResources>(
43 "AWS.CloudFormation.DescribeStackResources",
44 );