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

main
ts 43 lines 1.63 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 DescribeServicesRequest extends pricing.DescribeServicesRequest {}
6
7 /**
8 * Runtime binding for `pricing:DescribeServices` — list the service codes
9 * known to the AWS Price List API, or the filterable attribute names of one
10 * service.
11 *
12 * Call it without a `ServiceCode` to enumerate every service code, or with
13 * one (e.g. `AmazonEC2`) to get the attribute names you can filter
14 * `GetProducts` by (`instanceType`, `location`, `operatingSystem`, ...).
15 * The binding takes no arguments and grants the function
16 * `pricing:DescribeServices` (the action has no resource-level IAM). Calls
17 * are pinned to `us-east-1`, the region that serves the Price List API.
18 * Provide the implementation with
19 * `Effect.provide(AWS.Pricing.DescribeServicesHttp)`.
20 *
21 * ### Discovering Services
22 * **Example:** List Filterable Attributes for EC2
23 * ```typescript
24 * // init
25 * const describeServices = yield* AWS.Pricing.DescribeServices();
26 *
27 * // runtime
28 * const result = yield* describeServices({ ServiceCode: "AmazonEC2" });
29 * const attributeNames = result.Services?.[0]?.AttributeNames ?? [];
30 * ```
31 *
32 * @binding
33 */
34 export interface DescribeServices extends Binding.Service<
35 DescribeServices,
36 "AWS.Pricing.DescribeServices",
37 () => Effect.Effect<
38 (
39 request?: DescribeServicesRequest,
40 ) => Effect.Effect<pricing.DescribeServicesResponse, pricing.DescribeServicesError>
41 >
42 > {}
43 export const DescribeServices = Binding.Service<DescribeServices>("AWS.Pricing.DescribeServices");