@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, 04:45 UTC

main
ts 42 lines 1.67 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 `DetectStackDrift` operation (IAM actions
8 * `cloudformation:DetectStackDrift` + `cloudformation:DetectStackResourceDrift`
9 * — AWS authorizes both on the per-stack call).
10 *
11 * Bind this operation to a {@link Stack} to start drift detection from inside
12 * a function runtime — e.g. a scheduled drift monitor. Detection runs
13 * asynchronously; poll the returned `StackDriftDetectionId` with
14 * {@link DescribeStackDriftDetectionStatus}. Note that CloudFormation reads
15 * the live state of the stack's resources with the caller's credentials, so
16 * the function also needs read access to the resource types in the template
17 * for the detection to complete. Provide the implementation with
18 * `Effect.provide(AWS.CloudFormation.DetectStackDriftHttp)`.
19 * ### Drift Detection
20 * **Example:** Start Drift Detection
21 * ```typescript
22 * const detectStackDrift = yield* AWS.CloudFormation.DetectStackDrift(stack);
23 *
24 * const { StackDriftDetectionId } = yield* detectStackDrift();
25 * ```
26 *
27 * @binding
28 */
29 export interface DetectStackDrift extends Binding.Service<
30 DetectStackDrift,
31 "AWS.CloudFormation.DetectStackDrift",
32 (
33 stack: Stack,
34 ) => Effect.Effect<
35 (
36 request?: Omit<cloudformation.DetectStackDriftInput, "StackName">,
37 ) => Effect.Effect<cloudformation.DetectStackDriftOutput, cloudformation.DetectStackDriftError>
38 >
39 > {}
40 export const DetectStackDrift = Binding.Service<DetectStackDrift>(
41 "AWS.CloudFormation.DetectStackDrift",
42 );