1import type * as dms from "@distilled.cloud/aws/database-migration-service";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Endpoint } from "./Endpoint.ts";
5
6/**
7 * Runtime binding for `dms:DescribeRefreshSchemasStatus`.
8 *
9 * Bind this operation to an {@link Endpoint} to poll the status of the last
10 * `RefreshSchemas` run against it (`refreshing`, `successful`, `failed`).
11 * Provide the implementation with
12 * `Effect.provide(AWS.DMS.DescribeRefreshSchemasStatusHttp)`.
13 * ### Polling a Schema Refresh
14 * **Example:** Wait for a Refresh to Complete
15 * ```typescript
16 * // init — bind the operation to the endpoint
17 * const refreshStatus = yield* AWS.DMS.DescribeRefreshSchemasStatus(source);
18 *
19 * // runtime
20 * const { RefreshSchemasStatus } = yield* refreshStatus();
21 * if (RefreshSchemasStatus?.Status === "successful") {
22 * // schemas are ready to describe
23 * }
24 * ```
25 *
26 * @binding
27 */
28export interface DescribeRefreshSchemasStatus extends Binding.Service<
29 DescribeRefreshSchemasStatus,
30 "AWS.DMS.DescribeRefreshSchemasStatus",
31 (
32 endpoint: Endpoint,
33 ) => Effect.Effect<
34 () => Effect.Effect<
35 dms.DescribeRefreshSchemasStatusResponse,
36 dms.DescribeRefreshSchemasStatusError
37 >
38 >
39> {}
40
41export const DescribeRefreshSchemasStatus =
42 Binding.Service<DescribeRefreshSchemasStatus>(
43 "AWS.DMS.DescribeRefreshSchemasStatus",
44 );