mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-28 10:09:09 +00:00
.. | ||
build/src | ||
LICENSE | ||
package.json | ||
README.md |
gcp-metadata
Get the metadata from a Google Cloud Platform environment
$ npm install --save gcp-metadata
const gcpMetadata = require('gcp-metadata');
Access all metadata
const res = await gcpMetadata.instance();
console.log(res.data); // ... All metadata properties
Access specific properties
const res = await gcpMetadata.instance('hostname');
console.log(res.data) // ...All metadata properties
Access specific properties with query parameters
const res = await gcpMetadata.instance({
property: 'tags',
params: { alt: 'text' }
});
console.log(res.data) // ...Tags as newline-delimited list