REST Resource: projects.locations.authorizations

资源:授权

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 授权凭证交换为刷新令牌,并存储该刷新令牌和范围。