Skip to content

DescribeJobRun

Source: src/AWS/EMRContainers/DescribeJobRun.ts

Runtime binding for emr-containers:DescribeJobRun.

Reads a job run on the bound VirtualCluster — its state (PENDINGRUNNINGCOMPLETED/FAILED/CANCELLED), failure reason, and the resolved driver/configuration. The virtual cluster ID is injected from the binding; pass the job run id returned by StartJobRun. Provide the implementation with Effect.provide(AWS.EMRContainers.DescribeJobRunHttp).

// init
const describeJobRun = yield* AWS.EMRContainers.DescribeJobRun(virtualCluster);
// runtime
const { jobRun } = yield* describeJobRun({ id: jobRunId }).pipe(
Effect.repeat({
schedule: Schedule.spaced("15 seconds"),
until: (r) =>
r.jobRun?.state === "COMPLETED" || r.jobRun?.state === "FAILED",
times: 40,
}),
);