| 1 | import type * as route53 from "@distilled.cloud/aws/route-53"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `ListHostedZonesByName` operation (IAM action |
| 7 | * `route53:ListHostedZonesByName`; list actions do not support |
| 8 | * resource-level permissions, so it is granted on `*`). |
| 9 | * |
| 10 | * Looks hosted zones up by DNS name in lexicographic order — the direct way |
| 11 | * to resolve "which zone owns `example.com`?" at runtime. Provide the |
| 12 | * implementation with |
| 13 | * `Effect.provide(AWS.Route53.ListHostedZonesByNameHttp)`. |
| 14 | * ### Discovering Zones |
| 15 | * **Example:** Find a zone by name |
| 16 | * ```typescript |
| 17 | * const listByName = yield* AWS.Route53.ListHostedZonesByName(); |
| 18 | * |
| 19 | * const { HostedZones } = yield* listByName({ |
| 20 | * DNSName: "example.com.", |
| 21 | * MaxItems: 1, |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface ListHostedZonesByName extends Binding.Service< |
| 28 | ListHostedZonesByName, |
| 29 | "AWS.Route53.ListHostedZonesByName", |
| 30 | () => Effect.Effect< |
| 31 | ( |
| 32 | request?: route53.ListHostedZonesByNameRequest, |
| 33 | ) => Effect.Effect< |
| 34 | route53.ListHostedZonesByNameResponse, |
| 35 | route53.ListHostedZonesByNameError |
| 36 | > |
| 37 | > |
| 38 | > {} |
| 39 | export const ListHostedZonesByName = Binding.Service<ListHostedZonesByName>( |
| 40 | "AWS.Route53.ListHostedZonesByName", |
| 41 | ); |