Accessing the Metadata of Instances

Two types of metadata are stored within your instances: user-defined instance attributes that you can define explicitly while creating instances, and predefined instance metadata fields that are stored by default for all instances.

You can refer to the user-defined instance attributes defined as instance attributes in the structure of an orchestration JSON file at Orchestration Templates. You can also specify the attributes when you upload a private template. The attributes specified in the template are passed on to the instance. See Uploading a Private Template.

You can retrieve an instance's metadata at 192.0.0.192. After you log in to an instance, use the following commands to retrieve the user-defined instance attributes, predefined instance metadata, and generic attributes:

curl http://192.0.0.192/latest/user-data/attribute_key_name

curl http://192.0.0.192/latest/meta-data/attribute_key_name

curl http://192.0.0.192/latest/attributes/attribute_key_name