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

main
ts 40 lines 1.37 KB
Raw
1 import type * as mediaconvert from "@distilled.cloud/aws/mediaconvert";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4
5 /**
6 * Runtime binding for `mediaconvert:CreateJob` — submit a transcode job from
7 * runtime code, the classic "S3 upload event → Lambda → transcode" workflow.
8 * Also grants `iam:PassRole` (conditioned to `mediaconvert.amazonaws.com`)
9 * for the S3-access role the job passes to the service.
10 *
11 * Job ids are server-assigned at runtime, so the binding takes no arguments
12 * and grants `mediaconvert:CreateJob` on `*`. Provide the implementation
13 * with `Effect.provide(AWS.MediaConvert.CreateJobHttp)`.
14 *
15 * ### Submitting Jobs
16 * **Example:** Transcode an Uploaded File
17 * ```typescript
18 * // init
19 * const createJob = yield* AWS.MediaConvert.CreateJob();
20 *
21 * // runtime
22 * const { Job } = yield* createJob({
23 * Role: roleArn,
24 * JobTemplate: template.jobTemplateName,
25 * Settings: { Inputs: [{ FileInput: `s3://${bucket}/${key}` }] },
26 * });
27 * ```
28 *
29 * @binding
30 */
31 export interface CreateJob extends Binding.Service<
32 CreateJob,
33 "AWS.MediaConvert.CreateJob",
34 () => Effect.Effect<
35 (
36 request: mediaconvert.CreateJobRequest,
37 ) => Effect.Effect<mediaconvert.CreateJobResponse, mediaconvert.CreateJobError>
38 >
39 > {}
40 export const CreateJob = Binding.Service<CreateJob>("AWS.MediaConvert.CreateJob");