@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 17 lines 708 Bytes
Raw
1 import * as rds from "@distilled.cloud/aws/rds";
2 import * as Layer from "effect/Layer";
3 import { makeRdsInstanceHttpBinding } from "./BindingHttp.ts";
4 import { CreateDBSnapshot } from "./CreateDBSnapshot.ts";
5
6 export const CreateDBSnapshotHttp = Layer.effect(
7 CreateDBSnapshot,
8 makeRdsInstanceHttpBinding({
9 tag: "AWS.RDS.CreateDBSnapshot",
10 operation: rds.createDBSnapshot,
11 actions: ["rds:CreateDBSnapshot", "rds:AddTagsToResource"],
12 // Snapshot creation authorizes against BOTH the source ARN and the
13 // target snapshot ARN — widen the grant to the account's
14 // `snapshot` ARN space.
15 extraResources: (arn) => [`${arn.split(":").slice(0, 5).join(":")}:snapshot:*`],
16 }),
17 );