1import type * as controltower from "@distilled.cloud/aws/controltower";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { EnabledControl } from "./EnabledControl.ts";
5
6/**
7 * Runtime binding for `controltower:ResetEnabledControl`.
8 *
9 * Bind this operation to an {@link EnabledControl} to re-deploy the
10 * guardrail's governance resources from inside a function runtime —
11 * remediating drift without changing the enablement's configuration. The
12 * call starts an asynchronous operation; poll it with
13 * {@link GetControlOperation}. Provide the implementation with
14 * `Effect.provide(AWS.ControlTower.ResetEnabledControlHttp)`.
15 * ### Remediating Drift
16 * **Example:** Reset a Drifted Enabled Control
17 * ```typescript
18 * // init — bind the operation to the enabled control
19 * const resetEnabledControl = yield* AWS.ControlTower.ResetEnabledControl(guardrail);
20 *
21 * // runtime
22 * const { operationIdentifier } = yield* resetEnabledControl();
23 * ```
24 *
25 * @binding
26 */
27export interface ResetEnabledControl extends Binding.Service<
28 ResetEnabledControl,
29 "AWS.ControlTower.ResetEnabledControl",
30 (
31 enabledControl: EnabledControl,
32 ) => Effect.Effect<
33 () => Effect.Effect<
34 controltower.ResetEnabledControlOutput,
35 controltower.ResetEnabledControlError
36 >
37 >
38> {}
39
40export const ResetEnabledControl = Binding.Service<ResetEnabledControl>(
41 "AWS.ControlTower.ResetEnabledControl",
42);