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 `GetTemplate` operation (IAM action
8 * `cloudformation:GetTemplate`).
9 *
10 * Bind this operation to a {@link Stack} to read the deployed template body
11 * from inside a function runtime — e.g. audit tooling that archives or diffs
12 * the template actually running in the account. Provide the implementation
13 * with `Effect.provide(AWS.CloudFormation.GetTemplateHttp)`.
14 * ### Reading Stacks
15 * **Example:** Read the Deployed Template
16 * ```typescript
17 * const getTemplate = yield* AWS.CloudFormation.GetTemplate(stack);
18 *
19 * const { TemplateBody } = yield* getTemplate();
20 * ```
21 *
22 * @binding
23 */
24export interface GetTemplate extends Binding.Service<
25 GetTemplate,
26 "AWS.CloudFormation.GetTemplate",
27 (
28 stack: Stack,
29 ) => Effect.Effect<
30 (
31 request?: Omit<cloudformation.GetTemplateInput, "StackName">,
32 ) => Effect.Effect<
33 cloudformation.GetTemplateOutput,
34 cloudformation.GetTemplateError
35 >
36 >
37> {}
38export const GetTemplate = Binding.Service<GetTemplate>(
39 "AWS.CloudFormation.GetTemplate",
40);