@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, 04:45 UTC

main
ts 22 lines 716 Bytes
Raw
1 import * as compute from "@distilled.cloud/gcp/compute_v1";
2 import * as Layer from "effect/Layer";
3 import { makeInstanceHttpBinding } from "./BindingHttp.ts";
4 import { StopInstance } from "./StopInstance.ts";
5
6 /**
7 * HTTP implementation of {@link StopInstance}.
8 *
9 * Grants `roles/compute.instanceAdmin.v1` on the bound instance only,
10 * because no narrower predefined role contains `compute.instances.stop`.
11 *
12 * @layer
13 * @provides GCP.Compute.StopInstance
14 */
15 export const StopInstanceHttp = Layer.effect(
16 StopInstance,
17 makeInstanceHttpBinding({
18 tag: "GCP.Compute.StopInstance",
19 iam: { role: "roles/compute.instanceAdmin.v1", on: "compute.instance" },
20 operation: compute.stopInstances,
21 }),
22 );