Class Compute (8.7.0)

Inheritance

EventEmitter > AuthClient > OAuth2Client > Compute

Package

google-auth-library

Constructors

(constructor)(options)

  constructor 
 ( 
 options 
 ?: 
  
 ComputeOptions 
 ); 
 

Google Compute Engine service account credentials.

Retrieve access token from the metadata server. See: https://developers.google.com/compute/docs/authentication

Parameter
Name
Description
options

Properties

scopes

  scopes 
 : 
  
 string 
 []; 
 

Methods

fetchIdToken(targetAudience)

  fetchIdToken 
 ( 
 targetAudience 
 : 
  
 string 
 ) 
 : 
  
 Promise<string> 
 ; 
 

Fetches an ID token.

Parameter
Name
Description
targetAudience
string

the audience for the fetched ID token.

Returns
Type
Description
Promise <string>

refreshTokenNoCache(refreshToken)

  protected 
  
 refreshTokenNoCache 
 ( 
 refreshToken 
 ?: 
  
 string 
  
 | 
  
 null 
 ) 
 : 
  
 Promise<GetTokenResponse> 
 ; 
 

Refreshes the access token.

Parameter
Name
Description
refreshToken
string | null

Unused parameter

Returns
Type
Description
Promise < GetTokenResponse >

wrapError(e)

  protected 
  
 wrapError 
 ( 
 e 
 : 
  
 GaxiosError 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name
Description
e
GaxiosError
Returns
Type
Description
void
Design a Mobile Site
View Site in Mobile | Classic
Share by: