Version
- Print
- PDF
Version
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in VPC
View the list of available instance metadata versions and the list of top-level categories for each version.
Note
See Using Metadata v2 for more information on how Metadata v2 is called.
Request
The following describes the request format for the endpoint. The request format is as follows:
Call path | Description |
---|---|
/ | View the list of available instance metadata versions |
/{version}/ | View the list of top-level categories provided in each version
|
Examples
See below for an example.
Metadata v1
The following is an example of Metadata v1.
## View the list of instance metadata versions
[root@test-server ~]# curl http://169.254.169.254/
2020-11-18
latest
## View the list of top-level categories provided in the latest version
[root@test-server ~]# curl http://169.254.169.254/latest/
meta-data
[root@test-server ~]#
Metadata v2
The following is an example of Metadata v2.
The second and subsequent requests in the example use the token generated by the first request, assuming it hasn't expired.
# View the list of instance metadata versions
[root@test-server ~]# TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-NCP-METADATA-TOKEN-TTL-SECONDS: 21600"` \
&& curl -H "X-NCP-METADATA-TOKEN: $TOKEN" http://169.254.169.254/
2020-11-18
latest
# View the list of top-level categories provided in the latest version
[root@test-server ~]# curl -H "X-NCP-METADATA-TOKEN: $TOKEN" http://169.254.169.254/latest/
meta-data
[root@test-server ~]#
Was this article helpful?