@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 38 lines 1.29 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 import type { MetricStream } from "./MetricStream.ts";
5
6 type MetricStreams = [MetricStream, ...MetricStream[]];
7
8 /**
9 * Runtime binding for `cloudwatch:StartMetricStreams` — resume streaming
10 * for the bound metric streams after they were paused with
11 * {@link StopMetricStreams}. Bind it to one or more {@link MetricStream}
12 * resources; the stream names are injected automatically.
13 *
14 * Provide `CloudWatch.StartMetricStreamsHttp` on the hosting Lambda
15 * Function to satisfy the requirement.
16 * ### Managing Metric Streams
17 * **Example:** Resume a Paused Metric Stream
18 * ```typescript
19 * // init — grants cloudwatch:StartMetricStreams on the stream
20 * const startMetricStreams = yield* AWS.CloudWatch.StartMetricStreams(stream);
21 *
22 * // runtime
23 * yield* startMetricStreams();
24 * ```
25 *
26 * @binding
27 */
28 export interface StartMetricStreams extends Binding.Service<
29 StartMetricStreams,
30 "AWS.CloudWatch.StartMetricStreams",
31 (
32 ...streams: MetricStreams
33 ) => Effect.Effect<() => Effect.Effect<cloudwatch.StartMetricStreamsOutput, any>>
34 > {}
35
36 export const StartMetricStreams = Binding.Service<StartMetricStreams>(
37 "AWS.CloudWatch.StartMetricStreams",
38 );