1import type * as transfer from "@distilled.cloud/aws/transfer";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Server } from "./Server.ts";
5
6/**
7 * Runtime binding for `transfer:DescribeServer`.
8 *
9 * Reads the bound {@link Server}'s live configuration and state — the
10 * `ServerId` is injected from the binding. Useful for checking whether the
11 * server is `ONLINE`/`OFFLINE` before a {@link StartServer}/{@link StopServer}
12 * call or surfacing endpoint details to an admin portal. Provide the
13 * implementation with `Effect.provide(AWS.Transfer.DescribeServerHttp)`.
14 * ### Observing the Server
15 * **Example:** Read the Server State
16 * ```typescript
17 * // init — bind the operation to the server
18 * const describeServer = yield* AWS.Transfer.DescribeServer(server);
19 *
20 * // runtime
21 * const { Server } = yield* describeServer();
22 * yield* Effect.log(`server is ${Server.State}`);
23 * ```
24 *
25 * @binding
26 */
27export interface DescribeServer extends Binding.Service<
28 DescribeServer,
29 "AWS.Transfer.DescribeServer",
30 (
31 server: Server,
32 ) => Effect.Effect<
33 (
34 request?: Omit<transfer.DescribeServerRequest, "ServerId">,
35 ) => Effect.Effect<
36 transfer.DescribeServerResponse,
37 transfer.DescribeServerError
38 >
39 >
40> {}
41export const DescribeServer = Binding.Service<DescribeServer>(
42 "AWS.Transfer.DescribeServer",
43);