1import type * as controltower from "@distilled.cloud/aws/controltower";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `controltower:GetBaselineOperation`.
7 *
8 * An account-level operation that reads the status of an asynchronous
9 * baseline operation (`ENABLE_BASELINE`, `DISABLE_BASELINE`,
10 * `UPDATE_ENABLED_BASELINE`, `RESET_ENABLED_BASELINE`). Pair it with
11 * {@link ResetEnabledBaseline} to poll a drift-remediation run to
12 * completion. Provide the implementation with
13 * `Effect.provide(AWS.ControlTower.GetBaselineOperationHttp)`.
14 * ### Polling Asynchronous Operations
15 * **Example:** Poll a Baseline Operation
16 * ```typescript
17 * // init — account-level binding takes no resource
18 * const getBaselineOperation = yield* AWS.ControlTower.GetBaselineOperation();
19 *
20 * // runtime
21 * const { baselineOperation } = yield* getBaselineOperation({
22 * operationIdentifier,
23 * });
24 * console.log(baselineOperation.status);
25 * ```
26 *
27 * @binding
28 */
29export interface GetBaselineOperation extends Binding.Service<
30 GetBaselineOperation,
31 "AWS.ControlTower.GetBaselineOperation",
32 () => Effect.Effect<
33 (
34 request: controltower.GetBaselineOperationInput,
35 ) => Effect.Effect<
36 controltower.GetBaselineOperationOutput,
37 controltower.GetBaselineOperationError
38 >
39 >
40> {}
41
42export const GetBaselineOperation = Binding.Service<GetBaselineOperation>(
43 "AWS.ControlTower.GetBaselineOperation",
44);