@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 50 lines 1.62 KB
Raw
1 import type * as elbv2 from "@distilled.cloud/aws/elastic-load-balancing-v2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { TargetGroup } from "./TargetGroup.ts";
5
6 /**
7 * `RegisterTargets` request with `TargetGroupArn` injected from the bound
8 * {@link TargetGroup}.
9 */
10 export interface RegisterTargetsRequest extends Omit<
11 elbv2.RegisterTargetsInput,
12 "TargetGroupArn"
13 > {}
14
15 /**
16 * Runtime binding for the `RegisterTargets` operation (IAM action
17 * `elasticloadbalancing:RegisterTargets` scoped to the target-group ARN).
18 *
19 * Registers targets (instances, IPs, Lambda functions, or an ALB) with the
20 * bound target group at runtime — e.g. custom blue/green orchestration, or
21 * compute that registers itself into a target group at boot.
22 * Provide the implementation with
23 * `Effect.provide(AWS.ELBv2.RegisterTargetsHttp)`.
24 * ### Dynamic Target Management
25 * **Example:** Register an IP target
26 * ```typescript
27 * // init — bind the operation to the target group
28 * const registerTargets = yield* AWS.ELBv2.RegisterTargets(targetGroup);
29 *
30 * // runtime — register a target by IP and port
31 * yield* registerTargets({
32 * Targets: [{ Id: "10.0.1.15", Port: 8080 }],
33 * });
34 * ```
35 *
36 * @binding
37 */
38 export interface RegisterTargets extends Binding.Service<
39 RegisterTargets,
40 "AWS.ELBv2.RegisterTargets",
41 (
42 targetGroup: TargetGroup,
43 ) => Effect.Effect<
44 (
45 request: RegisterTargetsRequest,
46 ) => Effect.Effect<elbv2.RegisterTargetsOutput, elbv2.RegisterTargetsError>
47 >
48 > {}
49
50 export const RegisterTargets = Binding.Service<RegisterTargets>("AWS.ELBv2.RegisterTargets");