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
| 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 | ); |