Version
    • PDF

    Version

    • PDF

    Article summary

    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 pathDescription
    /View the list of available instance metadata versions
    /{version}/View the list of top-level categories provided in each version
    • Use latest to use the latest 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?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.