Package gcp-metadata (5.0.1)

Interfaces

Options

Variables

  BASE_PATH 
  
 = 
  
 "/computeMetadata/v1" 
 
  HEADER_NAME 
  
 = 
  
 "Metadata-Flavor" 
 
  HEADER_VALUE 
  
 = 
  
 "Google" 
 
  HEADERS 
 : 
  
 Readonly 
< { 
  
 "metadata-flavor" 
 := 
 "" 
  
 "google" 
 ; 
 = 
 "" 
  
 } 
 = 
 "" 
> 
  HOST_ADDRESS 
  
 = 
  
 "http://169.254.169.254" 
 
  SECONDARY_HOST_ADDRESS 
  
 = 
  
 "http://metadata.google.internal." 
 

Functions

  export 
  
 declare 
  
 function 
  
 instance 
 

Obtain metadata for the current GCE instance

Parameter
Name
Description
options
string | Options
Returns
Type
Description
Promise <T>
Type Parameter
Type
Description
T
  export 
  
 declare 
  
 function 
  
 isAvailable 
 () 
 : 
  
 Promise 
 

Determine if the metadata server is currently available.

Returns
Type
Description
Promise <boolean>
  export 
  
 declare 
  
 function 
  
 project 
 

Obtain metadata for the current GCP Project.

Parameter
Name
Description
options
string | Options
Returns
Type
Description
Promise <T>
Type Parameter
Type
Description
T
  export 
  
 declare 
  
 function 
  
 requestTimeout 
 () 
 : 
  
 number 
 ; 
 

Obtain the timeout for requests to the metadata server.

Returns
Type
Description
number
  export 
  
 declare 
  
 function 
  
 resetIsAvailableCache 
 () 
 : 
  
 void 
 ; 
 

reset the memoized isAvailable() lookup.

Returns
Type
Description
void
Design a Mobile Site
View Site in Mobile | Classic
Share by: