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

ID。授權的資源名稱。格式: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 授權憑證換取更新權杖,並儲存更新權杖和範圍。