| 1 | import type * as controltower from "@distilled.cloud/aws/controltower"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { EnabledBaseline } from "./EnabledBaseline.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `controltower:GetEnabledBaseline`. |
| 8 | * |
| 9 | * Bind this operation to an {@link EnabledBaseline} to read the |
| 10 | * enablement's live status, drift status, and parameters from inside a |
| 11 | * function runtime. Provide the implementation with |
| 12 | * `Effect.provide(AWS.ControlTower.GetEnabledBaselineHttp)`. |
| 13 | * ### Inspecting an Enabled Baseline |
| 14 | * **Example:** Read the Enabled Baseline's Status |
| 15 | * ```typescript |
| 16 | * // init — bind the operation to the enabled baseline |
| 17 | * const getEnabledBaseline = yield* AWS.ControlTower.GetEnabledBaseline(ouBaseline); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { enabledBaselineDetails } = yield* getEnabledBaseline(); |
| 21 | * console.log(enabledBaselineDetails?.statusSummary.status); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface GetEnabledBaseline extends Binding.Service< |
| 27 | GetEnabledBaseline, |
| 28 | "AWS.ControlTower.GetEnabledBaseline", |
| 29 | ( |
| 30 | enabledBaseline: EnabledBaseline, |
| 31 | ) => Effect.Effect< |
| 32 | () => Effect.Effect< |
| 33 | controltower.GetEnabledBaselineOutput, |
| 34 | controltower.GetEnabledBaselineError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const GetEnabledBaseline = Binding.Service<GetEnabledBaseline>( |
| 40 | "AWS.ControlTower.GetEnabledBaseline", |
| 41 | ); |