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

main
ts 39 lines 1.41 KB
Raw
1 import type * as controltower from "@distilled.cloud/aws/controltower";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { EnabledControl } from "./EnabledControl.ts";
5
6 /**
7 * Runtime binding for `controltower:GetEnabledControl`.
8 *
9 * Bind this operation to an {@link EnabledControl} to read the enablement's
10 * live status, drift status, and parameters from inside a function runtime.
11 * Useful for drift-monitoring functions that alert when a guardrail drifts.
12 * Provide the implementation with
13 * `Effect.provide(AWS.ControlTower.GetEnabledControlHttp)`.
14 * ### Inspecting an Enabled Control
15 * **Example:** Read the Enabled Control's Drift Status
16 * ```typescript
17 * // init — bind the operation to the enabled control
18 * const getEnabledControl = yield* AWS.ControlTower.GetEnabledControl(guardrail);
19 *
20 * // runtime
21 * const { enabledControlDetails } = yield* getEnabledControl();
22 * console.log(enabledControlDetails.driftStatusSummary?.driftStatus);
23 * ```
24 *
25 * @binding
26 */
27 export interface GetEnabledControl extends Binding.Service<
28 GetEnabledControl,
29 "AWS.ControlTower.GetEnabledControl",
30 (
31 enabledControl: EnabledControl,
32 ) => Effect.Effect<
33 () => Effect.Effect<controltower.GetEnabledControlOutput, controltower.GetEnabledControlError>
34 >
35 > {}
36
37 export const GetEnabledControl = Binding.Service<GetEnabledControl>(
38 "AWS.ControlTower.GetEnabledControl",
39 );