| 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 | |
| 5 | /** |
| 6 | * Runtime binding for `controltower:GetLandingZone`. |
| 7 | * |
| 8 | * An account-level operation that reads the landing zone's version, status, |
| 9 | * drift status, and manifest by its ARN (discovered via |
| 10 | * {@link ListLandingZones}). Useful for drift-monitoring functions that |
| 11 | * alert when the landing zone drifts out of sync. Provide the |
| 12 | * implementation with `Effect.provide(AWS.ControlTower.GetLandingZoneHttp)`. |
| 13 | * ### Inspecting the Landing Zone |
| 14 | * **Example:** Read the Landing Zone's Drift Status |
| 15 | * ```typescript |
| 16 | * // init — account-level binding takes no resource |
| 17 | * const getLandingZone = yield* AWS.ControlTower.GetLandingZone(); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const { landingZone } = yield* getLandingZone({ |
| 21 | * landingZoneIdentifier: arn, |
| 22 | * }); |
| 23 | * console.log(landingZone.driftStatus?.status); |
| 24 | * ``` |
| 25 | * |
| 26 | * @binding |
| 27 | */ |
| 28 | export interface GetLandingZone extends Binding.Service< |
| 29 | GetLandingZone, |
| 30 | "AWS.ControlTower.GetLandingZone", |
| 31 | () => Effect.Effect< |
| 32 | ( |
| 33 | request: controltower.GetLandingZoneInput, |
| 34 | ) => Effect.Effect< |
| 35 | controltower.GetLandingZoneOutput, |
| 36 | controltower.GetLandingZoneError |
| 37 | > |
| 38 | > |
| 39 | > {} |
| 40 | |
| 41 | export const GetLandingZone = Binding.Service<GetLandingZone>( |
| 42 | "AWS.ControlTower.GetLandingZone", |
| 43 | ); |