The best way to control Claude Code, Codex and more from any computer or phone

main
ts 19 lines 852 Bytes
Raw
1 import * as serverless from "@distilled.cloud/aws/redshift-serverless";
2 import * as Layer from "effect/Layer";
3 import { makeServerlessNamespaceHttpBinding, serverlessArnPrefix } from "./BindingHttp.ts";
4 import { RestoreFromSnapshot } from "./RestoreFromSnapshot.ts";
5
6 export const RestoreFromSnapshotHttp = Layer.effect(
7 RestoreFromSnapshot,
8 makeServerlessNamespaceHttpBinding({
9 tag: "AWS.RedshiftServerless.RestoreFromSnapshot",
10 operation: serverless.restoreFromSnapshot,
11 actions: ["redshift-serverless:RestoreFromSnapshot"],
12 // The operation authorizes against sibling resource ARNs (snapshots,
13 // recovery points, the serving workgroup) in addition to the namespace.
14 extraResources: (arn) => {
15 const prefix = serverlessArnPrefix(arn);
16 return [`${prefix}:snapshot/*`, `${prefix}:workgroup/*`];
17 },
18 }),
19 );