| 1 | import type * as transcribe from "@distilled.cloud/aws/transcribe"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `transcribe:GetTranscriptionJob` — read the status and |
| 7 | * result of a batch transcription job started with |
| 8 | * {@link StartTranscriptionJob}. |
| 9 | * |
| 10 | * Account-scoped (no resource to manage): the binding takes no arguments and |
| 11 | * grants the function `transcribe:GetTranscriptionJob` (the action has no |
| 12 | * resource-level IAM). Poll `TranscriptionJob.TranscriptionJobStatus` until |
| 13 | * it reaches `COMPLETED` or `FAILED`. |
| 14 | * |
| 15 | * ### Polling a Transcription Job |
| 16 | * **Example:** Poll a Job to Completion |
| 17 | * ```typescript |
| 18 | * // init |
| 19 | * const getJob = yield* AWS.Transcribe.GetTranscriptionJob(); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { TranscriptionJob } = yield* getJob({ |
| 23 | * TranscriptionJobName: "my-job", |
| 24 | * }); |
| 25 | * const status = TranscriptionJob?.TranscriptionJobStatus; |
| 26 | * ``` |
| 27 | * |
| 28 | * @binding |
| 29 | */ |
| 30 | export interface GetTranscriptionJob extends Binding.Service< |
| 31 | GetTranscriptionJob, |
| 32 | "AWS.Transcribe.GetTranscriptionJob", |
| 33 | () => Effect.Effect< |
| 34 | ( |
| 35 | request: transcribe.GetTranscriptionJobRequest, |
| 36 | ) => Effect.Effect< |
| 37 | transcribe.GetTranscriptionJobResponse, |
| 38 | transcribe.GetTranscriptionJobError |
| 39 | > |
| 40 | > |
| 41 | > {} |
| 42 | export const GetTranscriptionJob = Binding.Service<GetTranscriptionJob>( |
| 43 | "AWS.Transcribe.GetTranscriptionJob", |
| 44 | ); |