| 1 | import type * as backup from "@distilled.cloud/aws/backup"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for the `DescribeBackupJob` operation (IAM action |
| 7 | * `backup:DescribeBackupJob`). |
| 8 | * |
| 9 | * Returns the details of a backup job by its ID — poll a job started with |
| 10 | * `StartBackupJob` until it completes. Provide the implementation with |
| 11 | * `Effect.provide(AWS.Backup.DescribeBackupJobHttp)`. |
| 12 | * ### Monitoring Backup Jobs |
| 13 | * **Example:** Poll A Backup Job |
| 14 | * ```typescript |
| 15 | * const describeBackupJob = yield* AWS.Backup.DescribeBackupJob(); |
| 16 | * |
| 17 | * const job = yield* describeBackupJob({ BackupJobId: jobId }); |
| 18 | * if (job.State === "COMPLETED") { |
| 19 | * yield* Effect.log(`recovery point: ${job.RecoveryPointArn}`); |
| 20 | * } |
| 21 | * ``` |
| 22 | * |
| 23 | * @binding |
| 24 | */ |
| 25 | export interface DescribeBackupJob extends Binding.Service< |
| 26 | DescribeBackupJob, |
| 27 | "AWS.Backup.DescribeBackupJob", |
| 28 | () => Effect.Effect< |
| 29 | ( |
| 30 | request: backup.DescribeBackupJobInput, |
| 31 | ) => Effect.Effect< |
| 32 | backup.DescribeBackupJobOutput, |
| 33 | backup.DescribeBackupJobError |
| 34 | > |
| 35 | > |
| 36 | > {} |
| 37 | export const DescribeBackupJob = Binding.Service<DescribeBackupJob>( |
| 38 | "AWS.Backup.DescribeBackupJob", |
| 39 | ); |