Skip to content

CancelJob

Source: src/AWS/MediaConvert/CancelJob.ts

Runtime binding for mediaconvert:CancelJob — permanently cancel a submitted transcode job that has not finished (canceled jobs cannot be restarted).

Job ids are server-assigned at runtime, so the binding takes no arguments and grants mediaconvert:CancelJob on *. Provide the implementation with Effect.provide(AWS.MediaConvert.CancelJobHttp).

// init
const cancelJob = yield* AWS.MediaConvert.CancelJob();
// runtime
yield* cancelJob({ Id: jobId }).pipe(
// already finished / already gone — nothing to cancel
Effect.catchTag(["NotFoundException", "ConflictException"], () => Effect.void),
);