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

main
ts 20 lines 795 Bytes
Raw
1 import * as TSW from "@distilled.cloud/aws/timestream-write";
2 import * as Layer from "effect/Layer";
3 import { makeWriteTableHttpBinding } from "./BindingHttp.ts";
4 import { CreateBatchLoadTask, type CreateBatchLoadTaskRequest } from "./CreateBatchLoadTask.ts";
5
6 export const CreateBatchLoadTaskHttp = Layer.effect(
7 CreateBatchLoadTask,
8 makeWriteTableHttpBinding({
9 tag: "AWS.Timestream.CreateBatchLoadTask",
10 operation: TSW.createBatchLoadTask,
11 actions: ["timestream:CreateBatchLoadTask"],
12 // Batch load authorizes against both the target table and its database.
13 grantDatabaseArn: true,
14 toRequest: (request: CreateBatchLoadTaskRequest, names) => ({
15 ...request,
16 TargetDatabaseName: names.DatabaseName,
17 TargetTableName: names.TableName,
18 }),
19 }),
20 );