Method: projects.locations.estimateDataSize

估算客户将使用的数据大小。

HTTP 请求

POST https://discoveryengine.googleapis.com/v1alpha/{location=projects/*/locations/*}:estimateDataSize

网址采用 gRPC 转码语法。

路径参数

参数
location

string

必需。位置的完整资源名称,例如 projects/{project}/locations/{location}

请求正文

请求正文中包含结构如下的数据:

JSON 表示法
{

  // Union field data_source can be only one of the following:
  "websiteDataSource": {
    object (WebsiteDataSource)
  },
  "fileDataSource": {
    object (FileDataSource)
  }
  // End of list of possible types for union field data_source.
}
字段
联合字段 data_source。我们要估计其大小的数据源。data_source 只能是下列其中一项:
websiteDataSource

object (WebsiteDataSource)

网站数据。

fileDataSource

object (FileDataSource)

结构化数据或非结构化数据。

响应正文

如果成功,则响应正文包含一个 Operation 实例。

授权范围

需要以下 OAuth 范围之一:

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

如需了解详情,请参阅 Authentication Overview

IAM 权限

需要拥有 location 资源的以下 IAM 权限:

  • discoveryengine.locations.estimateDataSize

如需了解详情,请参阅 IAM 文档

WebsiteDataSource

数据源是我们抓取的一组网站模式,用于获取网站总数。

JSON 表示法
{
  "estimatorUriPatterns": [
    {
      object (EstimatorUriPattern)
    }
  ]
}
字段
estimatorUriPatterns[]

object (EstimatorUriPattern)

必需。用于估计数据大小的 URI 模式。最多允许 10 个模式,否则会抛出 INVALID_ARGUMENT 错误。

EstimatorUriPattern

我们用于抓取的 URI 模式。

JSON 表示法
{
  "providedUriPattern": string,
  "exactMatch": boolean,
  "exclusive": boolean
}
字段
providedUriPattern

string

用户提供的 URI 格式。例如 foo.com/bar/*

exactMatch

boolean

是推断生成的 URI 还是使用提供的确切 URI。

exclusive

boolean

相应模式是否为排除模式。如果设置为 true,则相应模式被视为排他性模式。如果未设置或设为 false,则默认情况下,系统会将相应模式视为包含性模式。

FileDataSource

数据源包含 Cloud Storage 或 BigQuery 中的文件。

JSON 表示法
{

  // Union field source can be only one of the following:
  "gcsSource": {
    object (GcsSource)
  },
  "bigquerySource": {
    object (BigQuerySource)
  }
  // End of list of possible types for union field source.
}
字段
联合字段 source。包含要使用的文件的来源。source 只能是下列其中一项:
gcsSource

object (GcsSource)

输入内容所在的 Cloud Storage 位置。

bigquerySource

object (BigQuerySource)

BigQuery 输入源。