| 1 | import type * as route53domains from "@distilled.cloud/aws/route-53-domains"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | export interface GetOperationDetailRequest |
| 6 | extends route53domains.GetOperationDetailRequest {} |
| 7 | |
| 8 | /** |
| 9 | * Runtime binding for `route53domains:GetOperationDetail` — return the |
| 10 | * current status of an asynchronous Route 53 Domains operation (a domain |
| 11 | * registration, renewal, transfer, or nameserver update identified by the |
| 12 | * `OperationId` those calls return). |
| 13 | * |
| 14 | * Route 53 Domains is a global registration API with no resource-level IAM: |
| 15 | * the binding takes no arguments and grants the function |
| 16 | * `route53domains:GetOperationDetail` on `*`. Calls are pinned to |
| 17 | * `us-east-1`, the only region that serves the Route 53 Domains API, |
| 18 | * regardless of where the function runs. |
| 19 | * |
| 20 | * Provide the implementation with |
| 21 | * `Effect.provide(AWS.Route53Domains.GetOperationDetailHttp)`. |
| 22 | * |
| 23 | * ### Tracking Registration Operations |
| 24 | * **Example:** Poll a Registration Until It Completes |
| 25 | * ```typescript |
| 26 | * // init |
| 27 | * const getOperationDetail = yield* AWS.Route53Domains.GetOperationDetail(); |
| 28 | * |
| 29 | * // runtime |
| 30 | * const detail = yield* getOperationDetail({ OperationId: operationId }).pipe( |
| 31 | * Effect.repeat({ |
| 32 | * schedule: Schedule.spaced("10 seconds"), |
| 33 | * until: (d) => d.Status === "SUCCESSFUL" || d.Status === "ERROR", |
| 34 | * times: 8, |
| 35 | * }), |
| 36 | * ); |
| 37 | * ``` |
| 38 | * |
| 39 | * @binding |
| 40 | */ |
| 41 | export interface GetOperationDetail extends Binding.Service< |
| 42 | GetOperationDetail, |
| 43 | "AWS.Route53Domains.GetOperationDetail", |
| 44 | () => Effect.Effect< |
| 45 | ( |
| 46 | request: GetOperationDetailRequest, |
| 47 | ) => Effect.Effect< |
| 48 | route53domains.GetOperationDetailResponse, |
| 49 | route53domains.GetOperationDetailError |
| 50 | > |
| 51 | > |
| 52 | > {} |
| 53 | export const GetOperationDetail = Binding.Service<GetOperationDetail>( |
| 54 | "AWS.Route53Domains.GetOperationDetail", |
| 55 | ); |