Skip to content

StartRestoreJob

Source: src/AWS/Backup/StartRestoreJob.ts

Runtime binding for the StartRestoreJob operation (IAM actions backup:StartRestoreJob + iam:PassRole on the restore role) — restore a recovery point from a deployed Function.

The binding is constructed with the restore role (the IAM role AWS Backup assumes to recreate the resource; its trust policy must allow backup.amazonaws.com), injected as IamRoleArn unless the request overrides it. backup:StartRestoreJob authorizes on the recovery point’s underlying resource ARN, so the grant is on *. Provide the implementation with Effect.provide(AWS.Backup.StartRestoreJobHttp).

const startRestoreJob = yield* AWS.Backup.StartRestoreJob(restoreRole);
const job = yield* startRestoreJob({
RecoveryPointArn: recoveryPointArn,
Metadata: restoreMetadata,
});
yield* Effect.log(`restore job ${job.RestoreJobId} started`);