sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ ControlTower/ ListLandingZoneOperations.ts

import type * as controltower from "@distilled.cloud/aws/controltower";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for `controltower:ListLandingZoneOperations`.
 *
 * An account-level operation that enumerates recent landing zone operations
 * (creates, updates, deletes, and resets), optionally filtered by type or
 * status. Useful for governance dashboards that surface in-flight landing
 * zone upgrades. Provide the implementation with
 * `Effect.provide(AWS.ControlTower.ListLandingZoneOperationsHttp)`.
 * ### Polling Asynchronous Operations
 * **Example:** List In-Progress Landing Zone Operations
 * ```typescript
 * // init — account-level binding takes no resource
 * const listLandingZoneOperations =
 *   yield* AWS.ControlTower.ListLandingZoneOperations();
 *
 * // runtime
 * const result = yield* listLandingZoneOperations({
 *   filter: { statuses: ["IN_PROGRESS"] },
 * });
 * console.log(result.landingZoneOperations.length);
 * ```
 *
 * @binding
 */
export interface ListLandingZoneOperations extends Binding.Service<
  ListLandingZoneOperations,
  "AWS.ControlTower.ListLandingZoneOperations",
  () => Effect.Effect<
    (
      request?: controltower.ListLandingZoneOperationsInput,
    ) => Effect.Effect<
      controltower.ListLandingZoneOperationsOutput,
      controltower.ListLandingZoneOperationsError
    >
  >
> {}

export const ListLandingZoneOperations = Binding.Service<ListLandingZoneOperations>(
  "AWS.ControlTower.ListLandingZoneOperations",
);