1import type * as route53 from "@distilled.cloud/aws/route-53";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for the `GetChange` operation (IAM action
7 * `route53:GetChange` on `arn:aws:route53:::change/*`).
8 *
9 * Polls the status of a record change submitted via
10 * {@link ChangeResourceRecordSets} — `PENDING` until the change has
11 * propagated to all authoritative name servers, then `INSYNC`. Pass the
12 * bare change id (strip a leading `/change/` from `ChangeInfo.Id`).
13 * Provide the implementation with
14 * `Effect.provide(AWS.Route53.GetChangeHttp)`.
15 * ### Managing Records at Runtime
16 * **Example:** Wait for a change to propagate
17 * ```typescript
18 * const getChange = yield* AWS.Route53.GetChange();
19 *
20 * const status = yield* getChange({
21 * Id: changeId.replace(/^\/change\//, ""),
22 * }).pipe(
23 * Effect.map((r) => r.ChangeInfo.Status),
24 * Effect.repeat({
25 * schedule: Schedule.fixed("2 seconds"),
26 * until: (status) => status === "INSYNC",
27 * times: 30,
28 * }),
29 * );
30 * ```
31 *
32 * @binding
33 */
34export interface GetChange extends Binding.Service<
35 GetChange,
36 "AWS.Route53.GetChange",
37 () => Effect.Effect<
38 (
39 request: route53.GetChangeRequest,
40 ) => Effect.Effect<route53.GetChangeResponse, route53.GetChangeError>
41 >
42> {}
43export const GetChange = Binding.Service<GetChange>("AWS.Route53.GetChange");