使用 永久移除資源 $erase - AWS HealthLake

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

使用 永久移除資源 $erase

AWS HealthLake 支援 $erase操作,可永久刪除特定資源及其歷史版本。當您需要執行下列動作時,此操作特別有用:

  • 永久移除個別資源

  • 刪除特定版本歷史記錄

  • 管理個別資源生命週期

  • 符合特定資料移除需求

使用方式

操作$erase可以在兩個層級叫用:

資源執行個體層級

POST [base]/[ResourceType]/[ID]/$erase?deleteAuditEvent=true
版本特定層級

POST [base]/[ResourceType]/[ID]/_history/[VersionID]/$erase

參數

參數 類型 必要 預設 描述
deleteAuditEvent 布林值 false 為 true 時, 會刪除相關聯的稽核事件

範例

範例請求

POST [base]/Patient/example-patient/$erase?deleteAuditEvent=true
回應範例

{ "resourceType": "OperationOutcome", "id": "erase-job", "issue": [ { "severity": "information", "code": "informational", "diagnostics": "Erase job started successfully. Job ID: 12345678-1234-1234-1234-123456789012" } ] }

任務狀態

若要檢查清除任務的狀態:

GET [base]/$erase/[jobId]

操作會傳回任務狀態資訊:

{ "resourceType": "Parameters", "parameter": [ { "name": "jobId", "valueString": "12345678-1234-1234-1234-123456789012" }, { "name": "jobStatus", "valueString": "COMPLETED" }, { "name": "totalResourcesDeleted", "valueInteger": 1 }, { "name": "startTime", "valueInstant": "2023-06-15T10:00:00Z" }, { "name": "endTime", "valueInstant": "2023-06-15T10:05:23Z" } ] }

Behavior (行為)

$erase 操作:

  1. 非同步處理以確保資料完整性

  2. 維護 ACID 交易

  3. 提供任務狀態追蹤

  4. 永久移除指定的資源及其版本

  5. 包括刪除活動的完整稽核記錄

  6. 支援選擇性刪除稽核事件

稽核記錄

$erase 操作會以 DeleteResource 記錄使用者 ID、時間戳記和資源詳細資訊。

限制

  • 清除的資源不會出現在搜尋回應中

  • 處理期間可能會暫時無法存取正在清除的資源

  • 當資源永久移除時,儲存體計量會立即調整