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 `SignalResource` operation (IAM action
8 * `cloudformation:SignalResource`).
9 *
10 * Bind this operation to a {@link Stack} to send SUCCESS/FAILURE signals to a
11 * resource with a `CreationPolicy` or a `WaitCondition` in the stack —
12 * e.g. a function that performs out-of-band initialization and unblocks the
13 * stack when done. Provide the implementation with
14 * `Effect.provide(AWS.CloudFormation.SignalResourceHttp)`.
15 * ### Signaling Resources
16 * **Example:** Signal a Wait Condition
17 * ```typescript
18 * const signalResource = yield* AWS.CloudFormation.SignalResource(stack);
19 *
20 * yield* signalResource({
21 * LogicalResourceId: "WaitCondition",
22 * UniqueId: "init-1",
23 * Status: "SUCCESS",
24 * });
25 * ```
26 *
27 * @binding
28 */
29export interface SignalResource extends Binding.Service<
30 SignalResource,
31 "AWS.CloudFormation.SignalResource",
32 (
33 stack: Stack,
34 ) => Effect.Effect<
35 (
36 request: Omit<cloudformation.SignalResourceInput, "StackName">,
37 ) => Effect.Effect<
38 cloudformation.SignalResourceResponse,
39 cloudformation.SignalResourceError
40 >
41 >
42> {}
43export const SignalResource = Binding.Service<SignalResource>(
44 "AWS.CloudFormation.SignalResource",
45);