| 1 | import type * as dataexchange from "@distilled.cloud/aws/dataexchange"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `dataexchange:StartJob`. |
| 7 | * |
| 8 | * Starts a created job. Jobs are created in the `WAITING` state and do |
| 9 | * nothing until started. The job runs with the caller's forwarded |
| 10 | * permissions, so this binding also grants `dataexchange:CreateAsset` |
| 11 | * (import jobs) and `dataexchange:GetAsset` (export jobs); grant the S3 |
| 12 | * side of the transfer via the matching `AWS.S3` bindings. |
| 13 | * Provide the implementation with |
| 14 | * `Effect.provide(AWS.DataExchange.StartJobHttp)`. |
| 15 | * ### Import & Export Jobs |
| 16 | * **Example:** Start A Created Job |
| 17 | * ```typescript |
| 18 | * const startJob = yield* AWS.DataExchange.StartJob(); |
| 19 | * |
| 20 | * // runtime |
| 21 | * yield* startJob({ JobId: job.Id! }); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface StartJob extends Binding.Service< |
| 27 | StartJob, |
| 28 | "AWS.DataExchange.StartJob", |
| 29 | () => Effect.Effect< |
| 30 | ( |
| 31 | request: dataexchange.StartJobRequest, |
| 32 | ) => Effect.Effect< |
| 33 | dataexchange.StartJobResponse, |
| 34 | dataexchange.StartJobError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | export const StartJob = Binding.Service<StartJob>("AWS.DataExchange.StartJob"); |