@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 47 lines 1.82 KB
Raw
1 import type * as fsx from "@distilled.cloud/aws/fsx";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { FileSystem } from "./FileSystem.ts";
5
6 /**
7 * Runtime binding for the `CreateDataRepositoryTask` operation scoped to one
8 * Lustre file system (IAM actions `fsx:CreateDataRepositoryTask` and
9 * `fsx:TagResource` on the file system ARN and on `arn:aws:fsx:*:*:task/*`).
10 *
11 * Starts a bulk data movement between the bound Lustre {@link FileSystem}
12 * and its linked S3 data repository — `EXPORT_TO_REPOSITORY`,
13 * `IMPORT_METADATA_FROM_REPOSITORY`, or `RELEASE_DATA_FROM_FILESYSTEM` —
14 * from inside a function runtime, e.g. exporting results after a compute
15 * job completes. A task already executing surfaces the typed
16 * `DataRepositoryTaskExecuting`. Provide the implementation with
17 * `Effect.provide(AWS.FSx.CreateDataRepositoryTaskHttp)`.
18 * ### Data Repository Tasks
19 * **Example:** Export results to the linked S3 repository
20 * ```typescript
21 * const createDataRepositoryTask =
22 * yield* AWS.FSx.CreateDataRepositoryTask(scratch);
23 *
24 * const response = yield* createDataRepositoryTask({
25 * Type: "EXPORT_TO_REPOSITORY",
26 * Paths: ["results/"],
27 * Report: { Enabled: false },
28 * });
29 * yield* Effect.log(`task ${response.DataRepositoryTask?.TaskId} started`);
30 * ```
31 *
32 * @binding
33 */
34 export interface CreateDataRepositoryTask extends Binding.Service<
35 CreateDataRepositoryTask,
36 "AWS.FSx.CreateDataRepositoryTask",
37 (
38 fileSystem: FileSystem,
39 ) => Effect.Effect<
40 (
41 request: Omit<fsx.CreateDataRepositoryTaskRequest, "FileSystemId">,
42 ) => Effect.Effect<fsx.CreateDataRepositoryTaskResponse, fsx.CreateDataRepositoryTaskError>
43 >
44 > {}
45 export const CreateDataRepositoryTask = Binding.Service<CreateDataRepositoryTask>(
46 "AWS.FSx.CreateDataRepositoryTask",
47 );