Method: projects.locations.userStores.batchUpdateUserLicenses

更新用户许可。此方法用于批量向用户分配/取消分配许可。

HTTP 请求

POST https://discoveryengine.googleapis.com/v1/{parent=projects/*/locations/*/userStores/*}:batchUpdateUserLicenses

网址采用 gRPC 转码语法。

路径参数

参数
parent

string

必需。父 [UserStore][] 资源名称,格式为:projects/{project}/locations/{location}/userStores/{userStoreId}

请求正文

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

JSON 表示法
{
  "deleteUnassignedUserLicenses": boolean,

  // Union field source can be only one of the following:
  "inlineSource": {
    object (InlineSource)
  }
  // End of list of possible types for union field source.
}
字段
deleteUnassignedUserLicenses

boolean

可选。如果为 true,则当用户许可移除关联的许可配置时,系统会删除该用户许可。默认值为 false,表示用户许可将更新为未分配状态。

联合字段 source。必需。输入的来源。source 只能是下列其中一项:
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.userStores.batchUpdateUserLicenses

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

InlineSource

针对 userStores.batchUpdateUserLicenses 方法的输入配置的内嵌来源。

JSON 表示法
{
  "userLicenses": [
    {
      object (UserLicense)
    }
  ],
  "updateMask": string
}
字段
userLicenses[]

object (UserLicense)

必需。要更新的用户许可的列表。每个用户许可都必须具有有效的 UserLicense.user_principal

updateMask

string (FieldMask format)

可选。要更新的字段列表。

这是完全限定字段名称的逗号分隔列表。示例:"user.displayName,photo"