sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Route53Domains/ ListPrices.ts

import type * as route53domains from "@distilled.cloud/aws/route-53-domains";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

export interface ListPricesRequest extends route53domains.ListPricesRequest {}

/**
 * Runtime binding for `route53domains:ListPrices` — list registration,
 * transfer, renewal, restoration, and owner-change prices for the TLDs
 * supported by Route 53, or for one specific TLD.
 *
 * Route 53 Domains is a global registration API with no resource-level IAM:
 * the binding takes no arguments and grants the function
 * `route53domains:ListPrices` on `*`. Calls are pinned to `us-east-1`, the
 * only region that serves the Route 53 Domains API, regardless of where the
 * function runs.
 *
 * Provide the implementation with
 * `Effect.provide(AWS.Route53Domains.ListPricesHttp)`.
 *
 * ### Looking Up Prices
 * **Example:** Get the Registration Price for .com
 * ```typescript
 * // init
 * const listPrices = yield* AWS.Route53Domains.ListPrices();
 *
 * // runtime
 * const result = yield* listPrices({ Tld: "com" });
 * const price = result.Prices?.[0]?.RegistrationPrice?.Price;
 * ```
 *
 * @binding
 */
export interface ListPrices extends Binding.Service<
  ListPrices,
  "AWS.Route53Domains.ListPrices",
  () => Effect.Effect<
    (
      request: ListPricesRequest,
    ) => Effect.Effect<route53domains.ListPricesResponse, route53domains.ListPricesError>
  >
> {}
export const ListPrices = Binding.Service<ListPrices>("AWS.Route53Domains.ListPrices");