The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import type * as route53 from "@distilled.cloud/aws/route-53"; |
| 2 | import * as Binding from "alchemy/Binding"; |
| 3 | import type * as Effect from "effect/Effect"; |
| 4 | import type { HostedZone } from "./HostedZone.ts"; |
| 5 | |
| 6 | /** |
| 7 | * `TestDNSAnswer` request with `HostedZoneId` injected from the bound |
| 8 | * {@link HostedZone}. |
| 9 | */ |
| 10 | export interface TestDNSAnswerRequest extends Omit<route53.TestDNSAnswerRequest, "HostedZoneId"> {} |
| 11 | |
| 12 | /** |
| 13 | * Runtime binding for the `TestDNSAnswer` operation (IAM action |
| 14 | * `route53:TestDNSAnswer`; the action does not support resource-level |
| 15 | * permissions, so it is granted on `*`). |
| 16 | * |
| 17 | * Asks Route 53's authoritative servers what they would answer for a record |
| 18 | * in the bound {@link HostedZone} — works before (and without) delegation, |
| 19 | * so it verifies records written via |
| 20 | * {@link ChangeResourceRecordSets} without waiting for public DNS. Public |
| 21 | * zones only. Provide the implementation with |
| 22 | * `Effect.provide(AWS.Route53.TestDNSAnswerHttp)`. |
| 23 | * ### Inspecting Zones |
| 24 | * **Example:** Verify a record answers |
| 25 | * ```typescript |
| 26 | * const testDnsAnswer = yield* AWS.Route53.TestDNSAnswer(zone); |
| 27 | * |
| 28 | * const answer = yield* testDnsAnswer({ |
| 29 | * RecordName: "www.example.com", |
| 30 | * RecordType: "A", |
| 31 | * }); |
| 32 | * // answer.ResponseCode -> "NOERROR", answer.RecordData -> the values |
| 33 | * ``` |
| 34 | * |
| 35 | * @binding |
| 36 | */ |
| 37 | export interface TestDNSAnswer extends Binding.Service< |
| 38 | TestDNSAnswer, |
| 39 | "AWS.Route53.TestDNSAnswer", |
| 40 | ( |
| 41 | zone: HostedZone, |
| 42 | ) => Effect.Effect< |
| 43 | ( |
| 44 | request: TestDNSAnswerRequest, |
| 45 | ) => Effect.Effect<route53.TestDNSAnswerResponse, route53.TestDNSAnswerError> |
| 46 | > |
| 47 | > {} |
| 48 | export const TestDNSAnswer = Binding.Service<TestDNSAnswer>("AWS.Route53.TestDNSAnswer"); |