1import type * as route53domains from "@distilled.cloud/aws/route-53-domains";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5export interface GetDomainDetailRequest
6 extends route53domains.GetDomainDetailRequest {}
7
8/**
9 * Runtime binding for `route53domains:GetDomainDetail` — return detailed
10 * information (nameservers, contacts, expiry, DNSSEC keys, status list)
11 * about a domain registered with the current AWS account.
12 *
13 * Route 53 Domains is a global registration API with no resource-level IAM:
14 * the binding takes no arguments and grants the function
15 * `route53domains:GetDomainDetail` on `*`. Calls are pinned to `us-east-1`,
16 * the only region that serves the Route 53 Domains API, regardless of where
17 * the function runs.
18 *
19 * Requesting detail for a domain that is not registered in the current
20 * account fails with a typed `DomainNotFound` error. Provide the
21 * implementation with
22 * `Effect.provide(AWS.Route53Domains.GetDomainDetailHttp)`.
23 *
24 * ### Reading Domain Details
25 * **Example:** Get the Nameservers of an Owned Domain
26 * ```typescript
27 * // init
28 * const getDomainDetail = yield* AWS.Route53Domains.GetDomainDetail();
29 *
30 * // runtime
31 * const detail = yield* getDomainDetail({ DomainName: "example.com" });
32 * const nameservers = (detail.Nameservers ?? []).map((ns) => ns.Name);
33 * ```
34 *
35 * **Example:** Handle a Domain That Is Not in the Account
36 * ```typescript
37 * const detail = yield* getDomainDetail({ DomainName: "example.com" }).pipe(
38 * Effect.catchTag("DomainNotFound", () => Effect.succeed(undefined)),
39 * );
40 * ```
41 *
42 * @binding
43 */
44export interface GetDomainDetail extends Binding.Service<
45 GetDomainDetail,
46 "AWS.Route53Domains.GetDomainDetail",
47 () => Effect.Effect<
48 (
49 request: GetDomainDetailRequest,
50 ) => Effect.Effect<
51 route53domains.GetDomainDetailResponse,
52 route53domains.GetDomainDetailError
53 >
54 >
55> {}
56export const GetDomainDetail = Binding.Service<GetDomainDetail>(
57 "AWS.Route53Domains.GetDomainDetail",
58);