sailfork / t3code-github / .repos/ alchemy-effect/ packages/ aws/ src/ Backup/ DescribeRestoreJob.ts

import type * as backup from "@distilled.cloud/aws/backup";
import * as Binding from "alchemy/Binding";
import type * as Effect from "effect/Effect";

/**
 * Runtime binding for the `DescribeRestoreJob` operation (IAM action
 * `backup:DescribeRestoreJob`).
 *
 * Returns the details of a restore job by its ID — poll a job started with
 * `StartRestoreJob` until it completes. Provide the implementation with
 * `Effect.provide(AWS.Backup.DescribeRestoreJobHttp)`.
 * ### Restoring Recovery Points
 * **Example:** Poll A Restore Job
 * ```typescript
 * const describeRestoreJob = yield* AWS.Backup.DescribeRestoreJob();
 *
 * const job = yield* describeRestoreJob({ RestoreJobId: jobId });
 * if (job.Status === "COMPLETED") {
 *   yield* Effect.log(`restored: ${job.CreatedResourceArn}`);
 * }
 * ```
 *
 * @binding
 */
export interface DescribeRestoreJob extends Binding.Service<
  DescribeRestoreJob,
  "AWS.Backup.DescribeRestoreJob",
  () => Effect.Effect<
    (
      request: backup.DescribeRestoreJobInput,
    ) => Effect.Effect<backup.DescribeRestoreJobOutput, backup.DescribeRestoreJobError>
  >
> {}
export const DescribeRestoreJob = Binding.Service<DescribeRestoreJob>(
  "AWS.Backup.DescribeRestoreJob",
);