Method: projects.locations.sampleQuerySets.sampleQueries.import

大量匯入多個 SampleQuery。系統可能會刪除現有的範例查詢。

注意:系統可能會成功匯入部分 SampleQuery

HTTP 要求

POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/sampleQuerySets/*}/sampleQueries:import

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

路徑參數

參數
parent

string

這是必要旗標,父項範例查詢集資源名稱,例如 projects/{project}/locations/{location}/sampleQuerySets/{sampleQuerySet}

如果呼叫者沒有權限列出這個範例查詢集下的 SampleQuery,無論這個範例查詢集是否存在,系統都會傳回 PERMISSION_DENIED 錯誤。

要求主體

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

JSON 表示法
{
  "errorConfig": {
    object (ImportErrorConfig)
  },

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

object (ImportErrorConfig)

匯入期間發生錯誤的所需位置。

聯集欄位 source。範例查詢的來源。source 只能是下列其中一項:
inlineSource

object (InlineSource)

範例查詢項目的內嵌來源。

gcsSource

object (GcsSource)

輸入內容的 Cloud Storage 位置。

bigquerySource

object (BigQuerySource)

BigQuery 輸入來源。

回應主體

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

授權範圍

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

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

詳情請參閱Authentication Overview

IAM 權限

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

  • discoveryengine.sampleQueries.import

詳情請參閱 IAM 說明文件

InlineSource

SampleQuery 的內嵌來源。

JSON 表示法
{
  "sampleQueries": [
    {
      object (SampleQuery)
    }
  ]
}
欄位
sampleQueries[]

object (SampleQuery)

這是必要旗標,要匯入的 SampleQuery 清單。最多 1,000 個項目。