1import type * as cloudformation from "@distilled.cloud/aws/cloudformation";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Stack } from "./Stack.ts";
5
6/**
7 * Runtime binding for the `ListStackResources` operation (IAM action
8 * `cloudformation:ListStackResources`).
9 *
10 * Bind this operation to a {@link Stack} to enumerate all of the stack's
11 * resource summaries (paginated) from inside a function runtime — the
12 * lighter-weight alternative to `DescribeStackResources` for stacks with many
13 * resources. Provide the implementation with
14 * `Effect.provide(AWS.CloudFormation.ListStackResourcesHttp)`.
15 * ### Reading Stack Resources
16 * **Example:** Enumerate Stack Resources
17 * ```typescript
18 * const listStackResources =
19 * yield* AWS.CloudFormation.ListStackResources(stack);
20 *
21 * const { StackResourceSummaries } = yield* listStackResources();
22 * const types = (StackResourceSummaries ?? []).map((r) => r.ResourceType);
23 * ```
24 *
25 * @binding
26 */
27export interface ListStackResources extends Binding.Service<
28 ListStackResources,
29 "AWS.CloudFormation.ListStackResources",
30 (
31 stack: Stack,
32 ) => Effect.Effect<
33 (
34 request?: Omit<cloudformation.ListStackResourcesInput, "StackName">,
35 ) => Effect.Effect<
36 cloudformation.ListStackResourcesOutput,
37 cloudformation.ListStackResourcesError
38 >
39 >
40> {}
41export const ListStackResources = Binding.Service<ListStackResources>(
42 "AWS.CloudFormation.ListStackResources",
43);