Skip to content

StartCopyJob

Source: src/AWS/Backup/StartCopyJob.ts

Runtime binding for the StartCopyJob operation (IAM actions backup:StartCopyJob + backup:CopyIntoBackupVault + iam:PassRole on the copy role) — copy a recovery point from the bound source vault to a destination vault (e.g. cross-region or cross-account disaster recovery).

The binding is constructed with the source BackupVault and the copy role (its trust policy must allow backup.amazonaws.com); the destination vault ARN is a runtime request field. Provide the implementation with Effect.provide(AWS.Backup.StartCopyJobHttp).

const startCopyJob = yield* AWS.Backup.StartCopyJob(vault, backupRole);
const job = yield* startCopyJob({
RecoveryPointArn: recoveryPointArn,
DestinationBackupVaultArn: drVaultArn,
});
yield* Effect.log(`copy job ${job.CopyJobId} started`);