REST Resource: projects.locations.authorizations

Ressource : Authorization

Ressource d'autorisation Discovery Engine.

Représentation 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.
}
Champs
name

string

Identifiant. Nom de ressource de l'autorisation. Format : projects/{project}/locations/{location}/authorizations/{authorization}

Il doit s'agir d'une chaîne encodée au format UTF-8, dont la longueur ne doit pas dépasser 1 024 caractères.

displayName

string

Obligatoire. Nom à afficher de l'autorisation.

Il doit s'agir d'une chaîne encodée au format UTF-8, dont la longueur ne doit pas dépasser 128 caractères.

Champ d'union authorization_config. Configuration de l'autorisation. authorization_config ne peut être qu'un des éléments suivants :
serverSideOauth2

object (ServerSideOAuth2)

Configuration OAuth2 côté serveur.

ServerSideOAuth2

Configuration OAuth2.

Représentation JSON
{
  "clientId": string,
  "clientSecret": string,
  "tokenUri": string,
  "authorizationUri": string,
  "scopes": [
    string
  ]
}
Champs
clientId

string

Obligatoire. ID client OAuth2.

clientSecret

string

Obligatoire. Code secret du client OAuth2.

Chiffrées au repos.

tokenUri

string

Obligatoire. Point de terminaison HTTP qui échange une autorisation client contre un jeton d'accès.

authorizationUri

string

Obligatoire. URI vers lequel l'utilisateur est redirigé lorsqu'il doit autoriser l'accès. Doit inclure tout ce qui est nécessaire pour une autorisation réussie : ID OAuth, indicateurs supplémentaires, etc. Exemple : 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

Le paramètre redirectUri sera remplacé par le frontend Vertex AI Search.

scopes[]

string

Obligatoire. Champs d'application à demander. Exemple : https://www.googleapis.com/auth/calendar.events

Méthodes

acquireUserAuthorization

Utilise le jeton d'actualisation stocké pour l'utilisateur identifié par ses identifiants d'utilisateur final et la ressource donnée, et renvoie le jeton d'accès généré et ses détails.

create

Crée un Authorization.

delete

Supprime un Authorization.

get

Récupère un Authorization.

list

Répertorie tous les Authorization d'un Engine.

patch

Met à jour un Authorization.

storeUserAuthorization

Échange les identifiants d'autorisation OAuth contre un jeton d'actualisation, puis stocke le jeton d'actualisation et les habilitations.