StartBackupJob
Source:
src/AWS/Backup/StartBackupJob.ts
Runtime binding for the StartBackupJob operation (IAM actions
backup:StartBackupJob on the vault ARN + iam:PassRole on the backup
role) — take an on-demand backup of any supported resource from a deployed
Function.
The binding is constructed with the target BackupVault and the
backup role (the IAM role AWS Backup assumes to read the resource and
write the recovery point; its trust policy must allow
backup.amazonaws.com). Both are injected into every runtime request.
Provide the implementation with
Effect.provide(AWS.Backup.StartBackupJobHttp).
Starting Backups
Section titled “Starting Backups”// deploy time — bind the vault and the backup roleconst startBackupJob = yield* AWS.Backup.StartBackupJob(vault, backupRole);
// runtime — snapshot the table before a risky migrationconst tableArn = yield* table.tableArn;const job = yield* startBackupJob({ ResourceArn: tableArn, Lifecycle: { DeleteAfterDays: 7 },});yield* Effect.log(`backup job ${job.BackupJobId} started`);