Skip to content

Get the metadata from a Google Cloud Platform environment

License

Notifications You must be signed in to change notification settings

nolanmar511/gcp-metadata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gcp-metadata

Get the metadata from a Google Cloud Platform environment

$ npm install --save gcp-metadata
var gcpMetadata = require('gcp-metadata')

Access all metadata

gcpMetadata.instance(function(err, response, metadata) {
  // All metadata properties
})

Access specific properties

gcpMetadata.instance('hostname', function(err, response, metadata) {
  // All metadata properties
})

Access specific properties with query parameters

gcpMetadata.instance({
  property: 'tags',
  qs: { alt: 'text' }
}, function(err, response, metadata) {
  // Tags as newline-delimited list
})

About

Get the metadata from a Google Cloud Platform environment

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%