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 ListDomainsRequest extends route53domains.ListDomainsRequest {}
6
7/**
8 * Runtime binding for `route53domains:ListDomains` — list all domain names
9 * registered with Route 53 for the current AWS account.
10 *
11 * Route 53 Domains is a global registration API with no resource-level IAM:
12 * the binding takes no arguments and grants the function
13 * `route53domains:ListDomains` on `*`. Calls are pinned to `us-east-1`, the
14 * only region that serves the Route 53 Domains API, regardless of where the
15 * function runs.
16 *
17 * Pass `Marker` from a previous response's `NextPageMarker` to paginate.
18 * Provide the implementation with
19 * `Effect.provide(AWS.Route53Domains.ListDomainsHttp)`.
20 *
21 * ### Listing Registered Domains
22 * **Example:** List the Account's Domains
23 * ```typescript
24 * // init
25 * const listDomains = yield* AWS.Route53Domains.ListDomains();
26 *
27 * // runtime
28 * const result = yield* listDomains({ MaxItems: 100 });
29 * const names = (result.Domains ?? []).map((domain) => domain.DomainName);
30 * ```
31 *
32 * @binding
33 */
34export interface ListDomains extends Binding.Service<
35 ListDomains,
36 "AWS.Route53Domains.ListDomains",
37 () => Effect.Effect<
38 (
39 request: ListDomainsRequest,
40 ) => Effect.Effect<
41 route53domains.ListDomainsResponse,
42 route53domains.ListDomainsError
43 >
44 >
45> {}
46export const ListDomains = Binding.Service<ListDomains>(
47 "AWS.Route53Domains.ListDomains",
48);