Skip to content

GetJob

Source: src/AWS/DataExchange/GetJob.ts

Runtime binding for dataexchange:GetJob.

Reads a job’s state (WAITING, IN_PROGRESS, COMPLETED, ERROR, …) and typed error details — the polling half of every import/export flow. Provide the implementation with Effect.provide(AWS.DataExchange.GetJobHttp).

const getJob = yield* AWS.DataExchange.GetJob();
// runtime
const done = yield* getJob({ JobId: job.Id! }).pipe(
Effect.repeat({
schedule: Schedule.spaced("2 seconds"),
until: (j) => j.State === "COMPLETED" || j.State === "ERROR",
times: 30,
}),
);