@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 46 lines 1.53 KB
Raw
1 import type * as dataexchange from "@distilled.cloud/aws/dataexchange";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `dataexchange:CreateJob`.
7 *
8 * Creates an import/export job — the Data Exchange work unit that moves
9 * assets between S3 (or signed URLs, Redshift datashares, API Gateway
10 * APIs, Lake Formation permissions) and a revision. Import/export jobs
11 * additionally need S3 permissions on the source/destination bucket —
12 * attach the matching `AWS.S3` bindings to the same host.
13 * Provide the implementation with
14 * `Effect.provide(AWS.DataExchange.CreateJobHttp)`.
15 * ### Import & Export Jobs
16 * **Example:** Import S3 Objects Into A Revision
17 * ```typescript
18 * const createJob = yield* AWS.DataExchange.CreateJob();
19 * const startJob = yield* AWS.DataExchange.StartJob();
20 *
21 * // runtime
22 * const job = yield* createJob({
23 * Type: "IMPORT_ASSETS_FROM_S3",
24 * Details: {
25 * ImportAssetsFromS3: {
26 * DataSetId: dataSetId,
27 * RevisionId: revisionId,
28 * AssetSources: [{ Bucket: bucket, Key: "prices.csv" }],
29 * },
30 * },
31 * });
32 * yield* startJob({ JobId: job.Id! });
33 * ```
34 *
35 * @binding
36 */
37 export interface CreateJob extends Binding.Service<
38 CreateJob,
39 "AWS.DataExchange.CreateJob",
40 () => Effect.Effect<
41 (
42 request: dataexchange.CreateJobRequest,
43 ) => Effect.Effect<dataexchange.CreateJobResponse, dataexchange.CreateJobError>
44 >
45 > {}
46 export const CreateJob = Binding.Service<CreateJob>("AWS.DataExchange.CreateJob");