JSPM

  • Created
  • Published
  • Downloads 19551573
  • Score
    100M100P100Q231961F
  • License MIT

Get the metadata from a Google Cloud Platform environment

Package Exports

  • gcp-metadata

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gcp-metadata) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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
})