@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 37 lines 1.2 KB
Raw
1 import * as cloudwatch from "@distilled.cloud/aws/cloudwatch";
2 import * as Binding from "alchemy/Binding";
3 import * as Effect from "effect/Effect";
4
5 export interface ListMetricsRequest extends cloudwatch.ListMetricsInput {}
6
7 /**
8 * Runtime binding for `cloudwatch:ListMetrics` — enumerate the metrics
9 * visible in the account/region, optionally filtered by namespace, metric
10 * name, or dimensions.
11 *
12 * Provide `CloudWatch.ListMetricsHttp` on the hosting Lambda Function to
13 * satisfy the requirement.
14 * ### Listing Metrics
15 * **Example:** List Metrics in a Namespace
16 * ```typescript
17 * // init — grants cloudwatch:ListMetrics
18 * const listMetrics = yield* AWS.CloudWatch.ListMetrics();
19 *
20 * // runtime
21 * const result = yield* listMetrics({ Namespace: "MyApp/Payments" });
22 * const names = (result.Metrics ?? []).map((metric) => metric.MetricName);
23 * ```
24 *
25 * @binding
26 */
27 export interface ListMetrics extends Binding.Service<
28 ListMetrics,
29 "AWS.CloudWatch.ListMetrics",
30 () => Effect.Effect<
31 (
32 request?: ListMetricsRequest,
33 ) => Effect.Effect<cloudwatch.ListMetricsOutput, cloudwatch.ListMetricsError>
34 >
35 > {}
36
37 export const ListMetrics = Binding.Service<ListMetrics>("AWS.CloudWatch.ListMetrics");