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