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

main
ts 45 lines 1.62 KB
Raw
1 import type * as personalize from "@distilled.cloud/aws/personalize";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `personalize:CreateBatchInferenceJob` — Starts a batch inference job that scores a list of users from S3
7 * against a solution version and writes recommendations back to S3.
8 * Grants `personalize:CreateBatchInferenceJob` on `*` plus
9 * `iam:PassRole` (conditioned to `personalize.amazonaws.com`) for the
10 * data-access role the service assumes to read/write the buckets.
11 * Provide the implementation with
12 * `Effect.provide(AWS.Personalize.CreateBatchInferenceJobHttp)`.
13 *
14 * ### Batch Inference
15 * **Example:** Score Users in Batch
16 * ```typescript
17 * // init
18 * const createBatchInferenceJob = yield* Personalize.CreateBatchInferenceJob();
19 *
20 * const { batchInferenceJobArn } = yield* createBatchInferenceJob({
21 * jobName: "nightly-scores",
22 * solutionVersionArn,
23 * jobInput: { s3DataSource: { path: "s3://bucket/users.json" } },
24 * jobOutput: { s3DataDestination: { path: "s3://bucket/scores/" } },
25 * roleArn: batchRoleArn,
26 * });
27 * ```
28 *
29 * @binding
30 */
31 export interface CreateBatchInferenceJob extends Binding.Service<
32 CreateBatchInferenceJob,
33 "AWS.Personalize.CreateBatchInferenceJob",
34 () => Effect.Effect<
35 (
36 request: personalize.CreateBatchInferenceJobRequest,
37 ) => Effect.Effect<
38 personalize.CreateBatchInferenceJobResponse,
39 personalize.CreateBatchInferenceJobError
40 >
41 >
42 > {}
43 export const CreateBatchInferenceJob = Binding.Service<CreateBatchInferenceJob>(
44 "AWS.Personalize.CreateBatchInferenceJob",
45 );