Instance Metadata categories
Instance Metadata categories#
All metadata is returned as text (content type text/plain). A request for a specific metadata resource returns the appropriate value, or a 404 — Not Found HTTP error code if the resource is not available. A request for a general metadata resource (the URI ends with a /
) returns a list of available resources, or a “404 — Not Found” HTTP error code if there is no such resource. The current available version: latest.
The following table lists the categories of instance metadata
Endpoint |
Description |
Example |
---|---|---|
ami-id |
The CMI ID used to launch the instance. |
cmi-XXXXXXXX |
ami-launch-index |
If you started more than one instance at the same time, this value indicates the order in which the instance was launched. The value of the first instance launched is |
<index number> |
block-device-mapping/ami |
The virtual device that contains the |
/dev/<partition id> |
block-device-mapping/root |
The virtual devices or partitions associated with the root devices, or partitions on the virtual device, where the root ( |
/dev/vda |
block-device-mapping/ebs<N> |
The names of the virtual devices associated with an |
/deb/vdb |
instance-type |
Instance type. |
m1.small |
instance-id |
Instance ID. |
i-XXXXXXXX |
hostname |
ID or private DNS of the instance. |
i-XXXXXXXX |
local-hostname |
The local name of the instance. If the instance has more than one network interface, its name will be resolved to the IPv4 address of the first interface, |
ip-XXX-XXX-XXX-XXX.vpc-XXXXXXXX.internal |
local-ipv4 |
The private IPv4 address of the instance. If there are multiple network interfaces, it relates to the |
XXX.XXX.XXX.XXX |
public-hostname |
The public DNS of the interface. If the instance is in a VPC, this category is only returned if the enableDnsHostnames attribute is set to |
c2-XXX-XXX-XXX-XXX.elastic.cloud.ngn.com.tr |
public-keys/<number> |
Public key. Only available if supplied at instance launch time. |
ssh-rsa AAAAB3N… |
public-ipv4 |
The public IPv4 address. If an EIP (Elastic IP) address is associated with the instance, the value returned is the eip address. |
XXX.XXX.XXX.XXX |
placement/availability-zone |
The Availability Zone in which the instance launched. |
ru-msk-comp1p |
reservation-id |
The ID of the group of instances, created by one RunInstances request. |
r-XXXXXXXX |
security-groups |
The names of the security groups applied to the instance. After launch, you can only change security groups of instances running in a VPC. |
sg-XXXXXXXX |
mac |
MAC address of instance’s primary interface. |
XX:XX:XX:XX:XX:XX |
Endpoint |
Description |
Example |
---|---|---|
device-number |
Number of the interface. |
<index number> |
ipv4-associations/<public_ip> |
Private IPv4 address, to which assigned public IPv4 address. |
XXX.XXX.XXX.XXX |
local-hostname |
The local name of the instance. If the instance has more than one network interface, its name will be resolved to the IPv4 address of the first interface, |
ip-XXX-XXX-XXX-XXX.vpc-XXXXXXXX.internal |
local-ipv4s |
The private IPv4 address of the instance. If there are multiple network interfaces, it relates to the |
XXX.XXX.XXX.XXX |
mac |
MAC address of instance’s primary interface. |
XX:XX:XX:XX:XX:XX |
public-hostname |
The public DNS of the interface. If the instance is in a VPC, this category is only returned if the |
c2-XXX-XXX-XXX-XXX.elastic.cloud.ngn.com.tr |
public-ipv4s |
EIP addresses (Elastic IP Addresses) associated with the instance. One instance can have several IPv4 addresses. |
XXX.XXX.XXX.XXX |
security-group-ids |
The IDs of the security groups applied to the instance. After launch, you can only change security groups of instances running in a VPC. |
sg-XXXXXXXX |
security-groups |
The names of the security groups applied to the instance. After launch, you can only change security groups of instances running in a VPC. |
security_group_name |
subnet-id |
The ID of the subnet, in which instance is started. |
subnet-XXXXXXXX |
subnet-ipv4-cidr-block |
The IPv4 address range in CIDR notation for a subnet |
XXX.XXX.XXX.XXX/YY |
vpc-id |
The ID of the VPC, in which instance is launched. |
vpc-XXXXXXXX |
vpc-ipv4-cidr-block |
The IPv4 address range in CIDR notation for a VPC |
XXX.XXX.XXX.XXX/YY |
vpc-ipv4-cidr-blocks |
List of IPv4 address ranges in CIDR notation. |
XXX.XXX.XXX.XXX/YY |