July 2018
Intermediate to advanced
506 pages
16h 2m
English
As mentioned, metadata is made available to running instances through internally resolved API calls to http://metadata.google.internal/computeMetadata/v1/. The API is structured very similarly to a traditional filesystem, where values can be deeply nested.
To perform a query from within a running instance, simply perform an HTTP GET with the required header Metadata-Flavor: Google. The API interprets trailing slashes on resources as directories, causing any nested values for that key to be listed. For example, performing a GET on the base URL http://metadata.google.internal/computeMetadata/v1/ returns the following:
instance/oslogin/project/
This shows that there are three top-level directories that ...