Method: projects.locations.dataStores.branches.documents.purge

永久刪除分支版本中的所有選取 Document

這項程序為非同步作業。視要刪除的 Document 數量而定,這項作業可能需要數小時才能完成。在刪除作業完成前,DocumentService.GetDocumentDocumentService.ListDocuments 可能仍會傳回部分 Document

如要取得要刪除的 Document 清單,請將 PurgeDocumentsRequest.force 設為 false。

HTTP 要求

POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
parent

string

這是必要旗標,父項資源名稱,例如 projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}

要求主體

要求主體包含下列結構的資料:

JSON 表示法
{
  "filter": string,
  "errorConfig": {
    object (PurgeErrorConfig)
  },
  "force": boolean,

  // Union field source can be only one of the following:
  "gcsSource": {
    object (GcsSource)
  },
  "inlineSource": {
    object (InlineSource)
  }
  // End of list of possible types for union field source.
}
欄位
filter

string

這是必要旗標,篩選要清除的相符文件。目前唯一支援的值是 * (所有項目)。

errorConfig

object (PurgeErrorConfig)

清除期間發生錯誤時,您希望錯誤記錄的位置。

force

boolean

實際執行清除作業。如果 force 設為 false,則傳回預估的清除次數,但不會刪除任何文件。

聯集欄位 source。根據文件 ID 清除文件時,所需的輸入來源。source 只能是下列其中一項:
gcsSource

object (GcsSource)

輸入內容的 Cloud Storage 位置。支援的 dataSchema:* documentId:每行一個有效 Document.id

inlineSource

object (InlineSource)

要清除的輸入內容內嵌來源。

回應主體

如果成功,回應主體會包含 Operation 的執行個體。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite

詳情請參閱Authentication Overview

IAM 權限

需要 parent 資源的下列 IAM 權限:

  • discoveryengine.documents.purge

詳情請參閱 IAM 說明文件