Method: projects.locations.collections.engines.controls.create

创建控制变量。

默认情况下,一个数据存储区最多允许 1,000 个控制变量。您可以提交申请来调整此限制。如果要创建的 Control 已存在,则返回 ALREADY_EXISTS 错误。

HTTP 请求

POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*}/controls

网址采用 gRPC 转码语法。

路径参数

参数
parent

string

必需。父数据存储区的完整资源名称。格式:projects/{project}/locations/{location}/collections/{collectionId}/dataStores/{dataStoreId}projects/{project}/locations/{location}/collections/{collectionId}/engines/{engineId}

查询参数

参数
controlId

string

必需。要用于控制变量的 ID,该 ID 将成为控制变量资源名称的最后一个组成部分。

此值必须介于 1 到 63 个字符之间。有效字符为 /[az][0-9]-_/.

请求正文

请求正文包含一个 Control 实例。

响应正文

如果成功,响应正文将包含一个新创建的 Control 实例。

授权范围

需要以下 OAuth 范围之一:

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

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

IAM 权限

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

  • discoveryengine.controls.create

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