Accessing the Metadata and User Data of an Instance
You can get information about the configuration of instance by accessing metadata and user data from within the instance itself.
This action enables you to access information that would otherwise be inaccessible inside the instance.
You can also get this information from outside the instance. For more information, see Getting Information About Your Instances.
Accessing the Metadata of an Instance
Before you begin: Access the instance whose metadata you want to access. For more information, see Accessing Your Instances. |
To access the metadata of an instance, type the following command in a terminal of the instance, where CATEGORY is any of the category or category/subcategory available:
$ curl http://169.254.169.254/latest/meta-data/CATEGORY
You can also type the address |
CATEGORY | Description |
---|---|
|
The ID of the OUTSCALE machine image (OMI) used to launch the instance. |
|
The launch index of the instance. For more information, see About Instances > General Information About Instances. |
|
This category contains the following subcategories:
|
|
The primary private DNS of the instance. |
|
The ID of the instance. |
|
The type of instance. |
|
Same as |
|
The primary private IP of the instance. |
|
The primary Media Access Control (MAC) address of the instance. |
|
A list of MAC addresses associated with the instance. |
|
This category contains the following subcategories, where
|
|
This category contains the following subcategories:
|
|
The public DNS of the instance. |
|
The public part of the keypair for the instance. For more information, see About Keypairs. |
|
The ID of the reservation the instance is associated with. |
|
A list of security group names for the instance. For more information, see About Security Groups. |
|
A list of tags associated with the instance. For more information, see About Tags. |
|
The tag Value corresponding to the |
The requested metadata of the instance appears.
Accessing the User Data of an Instance
Before you begin: Access the instance whose user data you want to access. For more information, see Accessing Your Instances. |
To access the user data of an instance, type the following command in a terminal of the instance:
$ curl http://169.254.169.254/latest/user-data
You can also type the address |
The user data of the instance appears.
Related Pages