Difference between revisions of "GCP/Metadata service"
< GCP
Jump to navigation
Jump to search
(Created page with "=[https://cloud.google.com/compute/docs/metadata/querying-metadata Programmatically query metadata]= <source lang=bash> # Query the boot image for the VM curl "http://metadata.google.internal/computeMetadata/v1/instance/image" -H "Metadata-Flavor: Google" # Query metadata directory listings. Any metadata entry ending in a trailing slash is a directory. curl "http://metadata.google.internal/computeMetadata/v1/instance/disks/0/" -H "Metadata-Flavor: Google" device-name in...") |
(No difference)
|
Revision as of 22:48, 30 January 2023
Programmatically query metadata
# Query the boot image for the VM curl "http://metadata.google.internal/computeMetadata/v1/instance/image" -H "Metadata-Flavor: Google" # Query metadata directory listings. Any metadata entry ending in a trailing slash is a directory. curl "http://metadata.google.internal/computeMetadata/v1/instance/disks/0/" -H "Metadata-Flavor: Google" device-name index interface mode type