REST Resource: projects.locations.authorizations

资源:Authorization

Discovery Engine 授权资源。

JSON 表示法
{
  "name": string,
  "displayName": string,

  // Union field authorization_config can be only one of the following:
  "serverSideOauth2": {
    object (ServerSideOAuth2)
  }
  // End of list of possible types for union field authorization_config.
}
字段
name

string

标识符。授权的资源名称。格式:projects/{project}/locations/{location}/authorizations/{authorization}

它必须是采用 UTF-8 编码的字符串,长度限制为 1024 个字符。

displayName

string

必需。授权的显示名称。

必须是采用 UTF-8 编码的字符串,长度限制为 128 个字符。

联合字段 authorization_config。授权配置。authorization_config 只能是下列其中一项:
serverSideOauth2

object (ServerSideOAuth2)

服务器端 OAuth2 配置。

ServerSideOAuth2

OAuth2 配置。

JSON 表示法
{
  "clientId": string,
  "clientSecret": string,
  "tokenUri": string,
  "authorizationUri": string,
  "scopes": [
    string
  ]
}
字段
clientId

string

必需。OAuth2 客户端 ID。

clientSecret

string

必需。OAuth2 客户端密钥。

静态加密。

tokenUri

string

必需。用于将客户端授权交换为访问令牌的 HTTP 端点。

authorizationUri

string

必需。当用户需要授权时,系统会将用户定向到的 URI。应包含成功授权所需的一切信息:OAuth ID、额外标志等。示例:https://accounts.google.com/o/oauth2/v2/auth?clientId=OAUTH_ID&scope=https://www.googleapis.com/auth/calendar.events&responseType=code&access_type=offline&prompt=consent

redirectUri 参数将被 Vertex AI Search 前端覆盖。

scopes[]

string

必需。要请求的范围。示例:https://www.googleapis.com/auth/calendar.events

方法

acquireUserAuthorization

使用存储的刷新令牌(适用于通过最终用户凭据和指定资源识别的用户),并返回生成的访问令牌及其详细信息。

create

创建 Authorization

delete

删除 Authorization

get

获取 Authorization

list

列出 Engine 下的所有 Authorization

patch

更新 Authorization

storeUserAuthorization

将 OAuth 授权凭据换成刷新令牌,并存储刷新令牌和范围。