@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 58 lines 2.16 KB
Raw
1 import type * as route53domains from "@distilled.cloud/aws/route-53-domains";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 export interface RegisterDomainRequest extends route53domains.RegisterDomainRequest {}
6
7 /**
8 * Runtime binding for `route53domains:RegisterDomain` — register a domain
9 * name with Route 53 programmatically. Registration is asynchronous: the
10 * response carries an `OperationId` you can poll with
11 * `AWS.Route53Domains.GetOperationDetail`.
12 *
13 * Registering a domain **bills the AWS account** for the registration fee,
14 * so guard calls carefully (e.g. behind a
15 * `AWS.Route53Domains.CheckDomainAvailability` check and explicit user
16 * consent in a domain-reseller flow).
17 *
18 * Route 53 Domains is a global registration API with no resource-level IAM:
19 * the binding takes no arguments and grants the function
20 * `route53domains:RegisterDomain` plus `route53:CreateHostedZone` (the API
21 * pre-validates that the caller can create the hosted zone Route 53
22 * auto-creates during registration) on `*`. Calls are pinned to
23 * `us-east-1`, the only region that serves the Route 53 Domains API,
24 * regardless of where the function runs.
25 *
26 * Provide the implementation with
27 * `Effect.provide(AWS.Route53Domains.RegisterDomainHttp)`.
28 *
29 * ### Registering Domains
30 * **Example:** Register a Domain for a Customer
31 * ```typescript
32 * // init
33 * const registerDomain = yield* AWS.Route53Domains.RegisterDomain();
34 *
35 * // runtime
36 * const result = yield* registerDomain({
37 * DomainName: "example-customer-domain.com",
38 * DurationInYears: 1,
39 * AdminContact: contact,
40 * RegistrantContact: contact,
41 * TechContact: contact,
42 * AutoRenew: true,
43 * });
44 * // poll result.OperationId with GetOperationDetail until SUCCESSFUL
45 * ```
46 *
47 * @binding
48 */
49 export interface RegisterDomain extends Binding.Service<
50 RegisterDomain,
51 "AWS.Route53Domains.RegisterDomain",
52 () => Effect.Effect<
53 (
54 request: RegisterDomainRequest,
55 ) => Effect.Effect<route53domains.RegisterDomainResponse, route53domains.RegisterDomainError>
56 >
57 > {}
58 export const RegisterDomain = Binding.Service<RegisterDomain>("AWS.Route53Domains.RegisterDomain");