AWS.BackupSearch reference
ExportJob
Section titled “ExportJob”Source:
src/AWS/BackupSearch/ExportJob.ts
An AWS Backup Search export job — transmits the results of a completed
search job to a designated S3 bucket as a .csv file, retaining them
beyond the search job’s seven-day retention. An export job is immutable
once started and cannot be stopped or deleted; its record ages out
server-side.
ExportJob: Exporting Search Results
Section titled “ExportJob: Exporting Search Results”const exportJob = yield* BackupSearch.ExportJob("Results", { searchJobIdentifier: search.searchJobIdentifier, exportSpecification: { s3ExportSpecification: { destinationBucket: bucket.bucketName, destinationPrefix: "backup-search-results/", }, }, roleArn: role.roleArn,});GetSearchJob
Section titled “GetSearchJob”Source:
src/AWS/BackupSearch/GetSearchJob.ts
Runtime binding for backup-search:GetSearchJob.
Retrieves the bound search job’s metadata and progress — its Status
(RUNNING, COMPLETED, STOPPED, FAILED), item/backup counts, and
completion time. BackupSearch emits no EventBridge events, so polling this
operation until Status is terminal is how a consumer knows the results
returned by ListSearchJobResults are final. Provide the implementation
with Effect.provide(AWS.BackupSearch.GetSearchJobHttp).
GetSearchJob: Polling Search Progress
Section titled “GetSearchJob: Polling Search Progress”// init — bind the operation to the search jobconst getSearchJob = yield* AWS.BackupSearch.GetSearchJob(search);
// runtime — poll until the job reaches a terminal statusconst job = yield* getSearchJob().pipe( Effect.repeat({ schedule: Schedule.spaced("5 seconds"), until: (j) => j.Status !== "RUNNING", times: 24, }),);console.log(job.Status, job.SearchProgress?.ItemsMatchedCount);ListSearchJobBackups
Section titled “ListSearchJobBackups”Source:
src/AWS/BackupSearch/ListSearchJobBackups.ts
Runtime binding for backup-search:ListSearchJobBackups.
Pages through the recovery points included in the bound search job, with
each backup’s per-job status — including backups skipped because their
index is not ACTIVE or a permissions issue marked them FAILED. Provide
the implementation with
Effect.provide(AWS.BackupSearch.ListSearchJobBackupsHttp).
ListSearchJobBackups: Reading Searched Backups
Section titled “ListSearchJobBackups: Reading Searched Backups”// init — bind the operation to the search jobconst listSearchJobBackups = yield* AWS.BackupSearch.ListSearchJobBackups(search);
// runtimeconst page = yield* listSearchJobBackups({ MaxResults: 100 });for (const backup of page.Results) { console.log(backup.BackupResourceArn, backup.Status);}ListSearchJobResults
Section titled “ListSearchJobResults”Source:
src/AWS/BackupSearch/ListSearchJobResults.ts
Runtime binding for backup-search:ListSearchJobResults.
Pages through the search results (matched S3 objects / EBS files) of the
bound search job. Results stream in while the job is RUNNING and are
retained for seven days after it completes. Provide the implementation
with Effect.provide(AWS.BackupSearch.ListSearchJobResultsHttp).
ListSearchJobResults: Reading Search Results
Section titled “ListSearchJobResults: Reading Search Results”// init — bind the operation to the search jobconst listSearchJobResults = yield* AWS.BackupSearch.ListSearchJobResults(search);
// runtimeconst page = yield* listSearchJobResults({ MaxResults: 100 });for (const item of page.Results) { if (item.S3ResultItem) console.log(item.S3ResultItem.BackupVaultName);}SearchJob
Section titled “SearchJob”Source:
src/AWS/BackupSearch/SearchJob.ts
An AWS Backup Search job — a data-plane search over AWS Backup recovery
points (S3 and EBS) whose backup indexes are active. A search job is
immutable once started: it runs to completion, retains its results for
seven days, and can only be stopped while RUNNING (destroying the
resource stops a running job; completed jobs age out server-side).
SearchJob: Creating a Search Job
Section titled “SearchJob: Creating a Search Job”Search All S3 Backups
const search = yield* BackupSearch.SearchJob("FindReports", { searchScope: { backupResourceTypes: ["S3"] }, itemFilters: { s3ItemFilters: [ { objectKeys: [{ value: "reports/", operator: "BEGINS_WITH" }] }, ], },});Search Specific Recovery Points
const search = yield* BackupSearch.SearchJob("AuditSearch", { searchScope: { backupResourceTypes: ["EBS"], backupResourceArns: [recoveryPointArn], backupResourceCreationTime: { createdAfter: "2026-01-01T00:00:00Z" }, },});