| 1 | import type * as SVC from "@distilled.cloud/aws/databrew"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Job } from "./Job.ts"; |
| 5 | |
| 6 | export interface DescribeJobRunRequest extends Omit< |
| 7 | SVC.DescribeJobRunRequest, |
| 8 | "Name" |
| 9 | > {} |
| 10 | |
| 11 | /** |
| 12 | * Runtime binding for `databrew:DescribeJobRun` — reads the state, |
| 13 | * timings, and outputs of one run of the bound DataBrew job. |
| 14 | * ### Observing Job Runs |
| 15 | * **Example:** Poll a Run's State |
| 16 | * ```typescript |
| 17 | * const describeJobRun = yield* AWS.DataBrew.DescribeJobRun(job); |
| 18 | * |
| 19 | * const run = yield* describeJobRun({ RunId: runId }); |
| 20 | * // run.State: "STARTING" | "RUNNING" | "SUCCEEDED" | ... |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface DescribeJobRun extends Binding.Service< |
| 26 | DescribeJobRun, |
| 27 | "AWS.DataBrew.DescribeJobRun", |
| 28 | <J extends Job>( |
| 29 | job: J, |
| 30 | ) => Effect.Effect< |
| 31 | ( |
| 32 | request: DescribeJobRunRequest, |
| 33 | ) => Effect.Effect<SVC.DescribeJobRunResponse, SVC.DescribeJobRunError> |
| 34 | > |
| 35 | > {} |
| 36 | export const DescribeJobRun = Binding.Service<DescribeJobRun>( |
| 37 | "AWS.DataBrew.DescribeJobRun", |
| 38 | ); |