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

main
ts 48 lines 1.78 KB
Raw
1 import type * as pricing from "@distilled.cloud/aws/pricing";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 export interface ListPriceListsRequest extends pricing.ListPriceListsRequest {}
6
7 /**
8 * Runtime binding for `pricing:ListPriceLists` — list the bulk Price List
9 * file references available for a service, currency, and effective date.
10 *
11 * Each returned reference carries a `PriceListArn` and the `FileFormats`
12 * it can be downloaded in (`csv`, `json`); pass the ARN and a format to
13 * `GetPriceListFileUrl` to obtain a presigned download URL. Use without a
14 * `RegionCode` to list Price Lists from every AWS Region, or with one to
15 * narrow to a single Region. The binding takes no arguments and grants the
16 * function `pricing:ListPriceLists` (the action has no resource-level
17 * IAM). Calls are pinned to `us-east-1`, the region that serves the Price
18 * List API. Provide the implementation with
19 * `Effect.provide(AWS.Pricing.ListPriceListsHttp)`.
20 *
21 * ### Listing Price List Files
22 * **Example:** List EC2 Price Lists for us-east-1
23 * ```typescript
24 * // init
25 * const listPriceLists = yield* AWS.Pricing.ListPriceLists();
26 *
27 * // runtime
28 * const result = yield* listPriceLists({
29 * ServiceCode: "AmazonEC2",
30 * CurrencyCode: "USD",
31 * EffectiveDate: new Date(),
32 * RegionCode: "us-east-1",
33 * });
34 * const arns = (result.PriceLists ?? []).map((p) => p.PriceListArn);
35 * ```
36 *
37 * @binding
38 */
39 export interface ListPriceLists extends Binding.Service<
40 ListPriceLists,
41 "AWS.Pricing.ListPriceLists",
42 () => Effect.Effect<
43 (
44 request: ListPriceListsRequest,
45 ) => Effect.Effect<pricing.ListPriceListsResponse, pricing.ListPriceListsError>
46 >
47 > {}
48 export const ListPriceLists = Binding.Service<ListPriceLists>("AWS.Pricing.ListPriceLists");