Skip to content

ListHostedZonesByName

Source: src/AWS/Route53/ListHostedZonesByName.ts

Runtime binding for the ListHostedZonesByName operation (IAM action route53:ListHostedZonesByName; list actions do not support resource-level permissions, so it is granted on *).

Looks hosted zones up by DNS name in lexicographic order — the direct way to resolve “which zone owns example.com?” at runtime. Provide the implementation with Effect.provide(AWS.Route53.ListHostedZonesByNameHttp).

const listByName = yield* AWS.Route53.ListHostedZonesByName();
const { HostedZones } = yield* listByName({
DNSName: "example.com.",
MaxItems: 1,
});